how to make the broken molecule whole in the output file?

Dear all,
I have a question about the dump command. Can LAMMPS dump a snapshot whose atoms are translation-free directly? All the particles are included in the box for the standard xyz format. And if the xu, yu, zu are used these coordinates may thus be far outside the box size. I only want to make the broken molecule whole in the output file and the coordinates are not scaled. Thank you very much.

Dear all,
I have a question about the dump command. Can LAMMPS dump a snapshot whose atoms are translation-free directly? All the particles are included in the box for the standard xyz format. And if the xu, yu, zu are used these coordinates may thus be far outside the box size. I only want to make the broken molecule whole in the output file and the coordinates are not scaled. Thank you very much.

No. LAMMPS has no support for per molecule wrapped dumps.
Somebody would have to program this.

I would write unwrapped trajectory in a format that contains box information and then use the pbctools plugin in VMD to wrap entire molecules back into the simulation cell

Axel

I would write unwrapped trajectory in a format that contains box information
and then use the pbctools plugin in VMD to wrap entire molecules back into
the simulation cell

Axel

Feel free to ignore this reply. I'm not sure how helpful it is...

For the record, these VMD plugins do a pretty good job to load and
display my unwrapped trajectories (without cutting molecules in half,
or stretching bonds across the unit cell). (I'm not sure you can save
them back in LAMMPS dump format again. Someone correct me if I'm
wrong. I suspect if you want to save your coordinates you must save
your trajectory in one of the more common trajectory formats like PDB,
DCD, Amber CRD, etc... However, with the exception of pizza.py, many
of the popular analysis programs use those formats instead.)

Below I appended a quick list of generic commands that can get you
started visualising your system using VMD. (This is no substitute for
the official documentation.)

I don't know if it matters, but in LAMMPS, I've been adding the the
"ix iy iz" integer cell counters to my dump file using:

dump 1 all custom 1000 FILE.lammpstrj id mol type x y z ix iy iz

(I suppose "xu yu zu" would work fine too. I've never tried that.)

-------- visualizing/unwrapping in VMD ------

If you don't yet have a PSF file which describes your complete system,
you should probably make one. You can do this using VMD with the
topotools plugin.

a) Start VMD
b) Menu Extensions->Tk Console
c) Enter:

topo readlammpsdata YOURFILE.data full
animate write psf YOURFILE.psf

(YOURFILE.data is the name of your lammps DATA file)
Later, to Load a trajectory in VMD:
  Start VMD
  Select menu: File->New Molecule
-Browse to select the PSF file you created above, and load it.
  (Don't close the window yet.)
-Browse to select the trajectory file.
  If necessary, for "file type" select: "LAMMPS Trajectory"
  Load it

----- Wrap the coordinates to the unit cell

a) Start VMD
b) Load the trajectory in VMD (see above)
c) Menu Extensions->Tk Console
d) Enter:

    pbc wrap -compound res -all

Usually that works. If it doesn't, then read the documentation for
pbctoos for more details. pbctools has many options. Optionally, you
can display the box using:

    pbc box

I meant my reply, not Axel's. (Sorry Axel.)