about dumping coordinates

I was wondering which format is better for dumping the trajectories of atoms. There are several options available with their definitions:

x,y,z = unscaled atom coordinates
xs,ys,zs = scaled atom coordinates
xu,yu,zu = unwrapped atom coordinates
xsu,ysu,zsu = scaled unwrapped atom coordinates
ix,iy,iz = box image that the atom is in

For example, when I use x y z xs ys zs, I get Warning: inconsistent image flags.
What would be exactly the application of the scaled coordinates (0-1)?
Which one is usually used for visualization and analysis like autocorrelation function?

Thanks in advance.


I was wondering which format is better for dumping the trajectories of
atoms. There are several options available with their definitions:

x,y,z = unscaled atom coordinates
xs,ys,zs = scaled atom coordinates
xu,yu,zu = unwrapped atom coordinates
xsu,ysu,zsu = scaled unwrapped atom coordinates
ix,iy,iz = box image that the atom is in

For example, when I use x y z xs ys zs, I get Warning: inconsistent image

using scaled and unscaled coordinates together is redundant.
also, none of the dump commands will cause in inconsistent image flags warning.
this would only happen on reading a data file, for example.

flags.

What would be exactly the application of the scaled coordinates (0-1)?

it is a matter of convenience. you can interconvert between scaled and
unscaled coordinates using the box information. similarly you can
reconstruct unwrapped coordinates using box information and image
flags.

Which one is usually used for visualization and analysis like
autocorrelation function?

again, this is a matter of convenience and also depends on the
software that you are using. some software can reconstruct unwrapped
coordinates from wrapped coordinates and image flags plus box
information, other not. it may be convenient to store unscaled
unwrapped coordinates, but scaled wrapped coordinates with image flags
preserve the most precision for a given number of digits in the
output.

axel.

> I was wondering which format is better for dumping the trajectories of
> atoms. There are several options available with their definitions:
>
> x,y,z = unscaled atom coordinates
> xs,ys,zs = scaled atom coordinates
> xu,yu,zu = unwrapped atom coordinates
> xsu,ysu,zsu = scaled unwrapped atom coordinates
> ix,iy,iz = box image that the atom is in
>
>
> For example, when I use x y z xs ys zs, I get Warning: inconsistent image

using scaled and unscaled coordinates together is redundant.
also, none of the dump commands will cause in inconsistent image flags
warning.
this would only happen on reading a data file, for example.

> flags.
>
> What would be exactly the application of the scaled coordinates (0-1)?

it is a matter of convenience. you can interconvert between scaled and
unscaled coordinates using the box information. similarly you can
reconstruct unwrapped coordinates using box information and image
flags.

> Which one is usually used for visualization and analysis like
> autocorrelation function?

again, this is a matter of convenience and also depends on the
software that you are using. some software can reconstruct unwrapped
coordinates from wrapped coordinates and image flags plus box
information, other not. it may be convenient to store unscaled
unwrapped coordinates, but scaled wrapped coordinates with image flags
preserve the most precision for a given number of digits in the
output.

Thank you for your nice explanations.

---Is dumping wrapped and unwrapped coordinates together useless as well?
for example:

dump pro all custom 10000 trj.lammpstrj id mol type element mass q *x y
z* *xu yu zu*

---Which one does VMD load if both wrapped and unwrapped info are available
in the .lammpstrj file?

I mostly use VMD.

Thanks

> I was wondering which format is better for dumping the trajectories of
> atoms. There are several options available with their definitions:
>
> x,y,z = unscaled atom coordinates
> xs,ys,zs = scaled atom coordinates
> xu,yu,zu = unwrapped atom coordinates
> xsu,ysu,zsu = scaled unwrapped atom coordinates
> ix,iy,iz = box image that the atom is in
>
>
> For example, when I use x y z xs ys zs, I get Warning: inconsistent
> image

using scaled and unscaled coordinates together is redundant.
also, none of the dump commands will cause in inconsistent image flags
warning.
this would only happen on reading a data file, for example.

> flags.
>
> What would be exactly the application of the scaled coordinates (0-1)?

it is a matter of convenience. you can interconvert between scaled and
unscaled coordinates using the box information. similarly you can
reconstruct unwrapped coordinates using box information and image
flags.

> Which one is usually used for visualization and analysis like
> autocorrelation function?

again, this is a matter of convenience and also depends on the
software that you are using. some software can reconstruct unwrapped
coordinates from wrapped coordinates and image flags plus box
information, other not. it may be convenient to store unscaled
unwrapped coordinates, but scaled wrapped coordinates with image flags
preserve the most precision for a given number of digits in the
output.

Thank you for your nice explanations.

---Is dumping wrapped and unwrapped coordinates together useless as well?
for example:

dump pro all custom 10000 trj.lammpstrj id mol type element mass q x y z
xu yu zu

---Which one does VMD load if both wrapped and unwrapped info are available
in the .lammpstrj file?

I recommend either using xu yu zu, or using a combination of both x y
z and ix iy iz. (ix iy iz contain information about which unit cell
the atoms are in. Together with x y z you can use this information to
figure out how far an atom has travelled in the course of a long
simulation. But you can alternately do this with xu yu zu as well.)

As Axel said, there's no reason to include BOTH x y z and xu yu zu in
your dump file.

However, if you have already generated a dump file this way already
and you don't want to rerun the simulation, then try loading it in VMD
and see what happens:
- If the atoms appear to remain in the original unit cell, then that
would (probably) mean that VMD is reading the x y z data.
- If not, then VMD is using the xu yu zu data.

I have been using commands like this:
dump 1 all custom 5000 DUMP_FILE.lammpstrj id mol type x y z ix iy iz

VMD has no trouble reading these files, and it puts the atoms in the
correct unit cell. Later on, you can always use "pbc wrap -compound
res -all" to move molecules back to the original periodic boundary
box. (This is a superior way to do it. Otherwise bonds may get
stretched accross the simulation box.) I have not tried using VMD to
read dump files using xu yu zu coordinates. Try it and see.

Cheers

Andrew

Hm. That’s interesting.
Just wanted to add that when both x y z and ux uy uz are used in the dump file:

dump pro all custom 10000 trj.lammpstrj id mol type element mass q x y z xu yu zu

VMD reads the unwrapped coordinates, i.e. ux uy uz (atoms didn’t remain in the simulation box (photo attached)). This happened obviously when ux uy uz were used alone, as well.

Thanks so much for the useful clarifications.

unwrapped.png