unwrapping periodic images

Hello,

I would like to use write_data to write out the ending configuration of a run with the periodic images wrapped by using the following command:

set atom * image 0 0 0

However, when I then run another simulation with this newly generated data file, I experience bad dynamics with missing atom/bond/angle errors unless I use a very very small time step such as 0.0001 fs. I did a test rerunning the write_data with ‘set atom * image 0 0 0’ and without, and the the run without wrapped periodic images was able to run fine without problems. Am I not wrapping the coordinates correctly with ‘set atom * image 0 0 0’? There seems to be atoms close to overlapping.

On another topic, I am having trouble using the write_restart and read_restart function. I get errors such as :
‘ERROR on proc 0: Invalid variable name’

for every processor I use when I try to read_restart from a restart file. This is the case regardless of how many processors I use. What is the proper way to read in the restart?

Thank you in advance for your time!

Jo

Hello,

I would like to use write_data to write out the ending configuration of a run with the periodic images wrapped by using the following command:

set atom * image 0 0 0

However, when I then run another simulation with this newly generated data file, I experience bad dynamics with missing atom/bond/angle errors unless I use a very very small time step such as 0.0001 fs. I did a test rerunning the write_data with 'set atom * image 0 0 0' and without, and the the run without wrapped periodic images was able to run fine without problems. Am I not wrapping the coordinates correctly with 'set atom * image 0 0 0'? There seems to be atoms close to overlapping.

the problem is, that you have a molecular system, and when a molecule
is straddling a box boundary, setting all image flags to the same
value will make them inconsistent, i.e. you will create very long
bonds, which will result in very large forces trying the pull the atom
back close to the original location. when re-running the data file
where you set all image flags to 0, you should be seeing a warning
about inconsistent image flags.

On another topic, I am having trouble using the write_restart and read_restart function. I get errors such as :
'ERROR on proc 0: Invalid variable name'
for every processor I use when I try to read_restart from a restart file. This is the case regardless of how many processors I use. What is the proper way to read in the restart?

this error cannot be caused by the restart functionality, but is (very
obviously) due to incorrect use of variables. since there is
insufficient information here, it is not possible to provide further
assistance. the proper way how to read in a restart is documented in
the LAMMPS manual (where else?).

axel.