[lammps-users] Producing dump file that can be read with read_data command

I am looking to produce a dump file that will contain all information on bonding, angles and dihedrals of all the atoms in the system that I can read in using the read_data command.

I have a data file that I read in, which I run an NPT simulation to get my fluid to the correct density. I want to be then able to output this data, in the same format as I read it in, so I can then add my surface layer manually and run an NVT simulation on the resulting surface+fluid layer.

I'm not sure how to do this in LAMMPS - there was a small paragraph in the manual but I don't really understand how to implement this.

Thank You,
Michael.

Why not use the write_restart or restart commands, and then use restart2data from the tools directory to convert the restart file into a data file?

–AEI

I don't know what you mean by "all information". In addition
to Ahmed's suggestion, you can use dump local to dump out
the current snapshot's bond, angle, dihedral angle, etc.

Steve

I don't know what you mean by "all information". In addition
to Ahmed's suggestion, you can use dump local to dump out
the current snapshot's bond, angle, dihedral angle, etc.

i think that would be overkill. since the topology for a classical
model (ignoring bond swapping and reaxff for now) doesn't
change, simply updating the data file with the latest coordinates
should already do the trick. this is something that could be
easily scripted (in text mode) in VMD. if a topology/data file
does not exist, it can be generated from restart2data as stated.

the process would then simply become:

vmd -dispdev text -e process_restart.tcl

with process_restart.tcl being something like this:

package require topotools 1.1
namespace import ::TopoTools::*

set mol1 [topo readlammpsdata data.myproject full]
mol addfile myproject.dump type lammpstrj waitfor all

set mol2 [topo readlammpsdata data.myaddon full]

set mol3 [mergemols [list $mol1 $mol2]]

topo writelammpsdata data.combined full -molid $mol3

the only problem with this approach is that VMD doesn't
know much about atom types and parameters and how to
combine them. there may be some additional scripting
needed, e.g. mapping the numeric atom types from lammps
into symbolic ones before merging and then having lammps
convert them back and look up parameters from a (scripted)
database. this is roughly the approach that i am doing when
building topology/data files for coarse grain simulations.

cheers,
   axel.