Dump command and VMD Hbonds analyzor

Dear lammps user
I want to compute hbonds with VMD. I wonder what kind of dump style should I use to import to VMD and use this analyzer?
I cannot identify “selection 1” in hydrogen bonds input options in VMD. I think it might relates to my dump trajectory. Here is my dump command:
dump 1 all custom 50000 dump.traj id mol type x y z

Do you know which style and args should I use?

Thank you so much for your consideration.


Firstly, try your selection in the representation section of VMD. When you are sure of that, then use it for H-bond calculations.

Your dump file should work for your purpose. However, I use this command, and it works for me.

dump 1 all custom 5000 traj.lammpstrj id mol type element mass q xu yu zu x y z ix iy iz

Thank you so much Xiaolin

I used your dump script, but I could not count Hbonds with VMD.

I might did wrong procedure by VMD. I think it is related to choosing selections in VMD. How can I make sure about that?

Should I use H and O atom selection in hbonds plug-in? (I want to calculate Hbonds inside a box of water)


You have many options to do your selections. For your purpose, you can select O or H atoms based on atom mass, charge, or type, etc.
Please see the VMD manual, and also this page.
In the “Graphical Representations” window, test your selection in the “Selected Atoms” area. When you make sure that your selection is correct, then use it in the H-bond analysis.