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

Is OVITO able to render targeted molecule in a complex system from the lammpstrj files?

Dear  Dr.Kalcher,

I bulit molecule system which has 100 molecules and I dump the trajetory of all molecules. But I wish to render trajetory of targeted molecules (e.g. MoleculeIdentifier == 1). Is OVITO able to do this?

Best Regards


Dear Yuanqi,

I'm not sure if I understand your question correctly, but it sounds like you would like to filter your system and show only one specific molecule out of 100 molecules. If your atoms are associated with the "Molecule Identifier" property (have a look in the data inspector if you are not sure), then you should be able to do the following:

  1. Add a Expression Selection modifier to the data pipeline and enter the expression MoleculeIdentifier != 1. This should select all atoms belonging to molecules other than molecule 1.
  2. Then add a Delete Selected modifier to the pipeline to remove or hide the currently selected atoms.

Does that solve your problem? Let me know if you need further assistance.


Dear Alex,
I understand what you said and I think it is helpful. I now know I made a mistake that I dump the lammpstrj as atom type and no
molecule ID was associated. So, I can not use MoleculeIdentifier in Expression Selection .
Thanks for your guides.
Best Regards

Right, please make sure the LAMMPS dump command used to produce the trajectory file includes the mol atom attribute.

Note, however, that this is only necessary if you intend to open the LAMMPS dump file in OVITO directly. It should not be necessary if you first open the LAMMPS data file (which typically contains the molecule IDs) and then use the Load Trajectory function to load the information stored in the LAMMPS dump trajectory file. If you use that latter approach, OVITO combines the static molecule IDs from the data file with the dynamic atom trajectories from the dump file, and you should be able to select atoms based on their molecule IDs.

Dear Alex,

It is a great idea. You are so smart and kind. I am really grateful for your guide. Before reading your post,  I am trying to dump the lammpstrj again but contains mol ID. It will take a long time and waste much CPU time. I think I can well address this problem now. Thanks again.

Best Regards


New for our users in China: OVITO on WeChat 

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