[lammps-users] post-process about H-bond analysis with VMD

Dear all,

I’m simulating a system with water and graphene in it. I dump the trj file out with lammps (such as water.lammpstrj).

I want to use VMD for analyzing H-bonds in the system, but trj file made by lammps just don’t have ‘OW’ ‘HW1’ ‘SOL’ label for water molecules.

I know I can write code to convert it. But I want to know if there is any simple ways to do this.

Thanks a lot!
xiong

The dump cfg command lets you assign labels to atom types,
but that produces output files in the CFG format. Maybe
there are tools out there that convert CFG files to a VMD-compatible
format.

Steve

dear xiong,

please note, that this is much more a VMD question rather than a
LAMMPS question. you might have better luck with future questions
along these lines on the VMD mailing list.

Dear all,

   I'm simulating a system with water and graphene in it\. I dump the trj

file out with lammps (such as water.lammpstrj).
I want to use VMD for analyzing H-bonds in the system, but trj file made by
lammps just don't have 'OW' 'HW1' 'SOL' label for water molecules.

so what? you can assign them easily from within VMD using
some simple scripting. if your water oxygens are atom type 1
and your water hydrogens are atom type 2, then you can do
at the vmd command line prompt.

set sel [atomselect top {type 1}]
$sel set type OW
$sel set resname SOL
$sel set name OW
$sel delete

set sel [atomselect top {type 2}]
$sel set type HW
$sel set resname SOL
$sel set name HW
$sel delete

...and similarly for your other components in the system, too.

you can then store this information in a topology file type.

e.g. with:

animate write psf mysystem.psf

and then load this .psf file before you load the first trajectory file.

overall, you may also want to first load the overall topology information
through the topotools plugin. the latest version of it with also improvements
to the lammps trajectory reader are in the latest VMD test release version.

cheers,
   axel.