Forum Navigation
You need to log in to create posts and topics.

Combine datasets that contains the same particle ID

Dear Ovito Community,

I am kind of new to this and i'm just using the Ovito free version.  The situation that I have encountered is the following.  I am currently trying to combine two datasets (for LAMMPS), the first contains 4 particle type, thus ID from #1 to #4 and the second one two particle types, #1 and #2.  Maybe i'm doing something wrong but it seems the default behavior of ovito is to assume that the particles are the same even though they obviously not and just share the same ID.  Is there any way to go around this?

Hi,

Just so I understand you correctly, you would like the combined dataset to have particle type id's ranging from 1 to 6 then? In OVITO Basic you could offset the Particle Type Id's in the first file by 2 by using a Compute Property Modifier with the settings shown in attached screenshot.
After that, you can add the Combine Datasets Modifier to your pipeline as you did before.

 

Uploaded files:
  • compute-property.png

Dear Constanze,

Thanks a lot for your explanation.  I'm now wondering if the same is applicable for the Bond type and Angle type ID, so that when the merged file is created the bonds and angle from the two datasets stay different and don't get overwritten.  Thanks in advance!

Hi Andrea,

For the Bond Type ID's you could again us a Compute Property modifier (operate on: Bonds), but I'm afraid that you can not modify the Angle type ID's.

Are you aware of the offset option for the read_data command of LAMMPS though? I think that it could solve your problem.
https://docs.lammps.org/read_data.html

新的OVITO微信频道!
New for our users in China: OVITO on WeChat 

Official OVITO WeChat channel operated by Foshan Diesi Technology Co., Ltd.