[lammps-users] dump xtc

Hello, LAMMPS users,

I have a 2D system in a square box with length L. I dumped my simulation trajectory as a xtc file. Does anyone know what are the ranges of x and y coordinates? are they between -L/2 and L/2? When I tried to use VMD to see my part of my system (by choosing orthographic, not perspective), I could see some particles if I chose x<-L and y < -L. Does LAMMPS take care of periodic boundary conditions when it output the coordinates as xtc format? By the way, I have tried VMD to visualize a pdb file, it works fine to see half of my box.

Have a nice day!

Dongsheng

Hello, LAMMPS users,

hello dongsheng,

I have a 2D system in a square box with
length L. I dumped my simulation trajectory as a xtc file. Does anyone
know what are the ranges of x and y coordinates? are they between -L/2
and L/2? When I tried to use VMD to see my part of my system (by
choosing orthographic, not perspective), I could see some particles if
I chose x<-L and y < -L. Does LAMMPS take care of periodic
boundary conditions when it output the coordinates as xtc format? By

.xtc format stores data in nanometers and not angstrom.
the required conversion is not applied to the box size
when writing coordinates in some cases. i've sent some
patches to steve to fix this a while ago.

those patches were also changing a few portability issues
and some other minor changes, so i guess it was not easy
to fit them into the code at the time.
i'm planning to update them to the lastest version next
week, and hopefully have them updated and integrated this time.

as a workaround, once loaded in VMD you can do (untested):

set mol [molinfo top]
set nf [molinfo $mol get numframes]
for {set i 0} {$i < $nf} {incr i} {
    molinfo $mol set frame $i
    molinfo $mol set {a b c} [vecscale 0.1 [molinfo $mol get {a b c}]]
}

PBC wrapping is done on a per atom basis which may need
some additional postprocessing if you don't like this.
have a look at the pbctools plugin that offers a nice
command line interface to many PBC related tasks.

cheers,
   axel.