understanding rerun so I can debug an warning on my output



I am needing to rerun a trajectory to compute the center of mass(COM) for two groups in a molecule.

I am trying to output the COM to the out put file.

However the output has an accompanying line with the warning “inconsistent image flags” with every output

I want to address this warning as I need my COM to be correct in the rerun as well as produce an output file without the warning in order to use the file in program in which it requires COM to be right after one another


12 3 4 12 3 7

12 4 3 12 3 5

without the warning wedged in-between.


Anyways my question lies in some ideas of how can I debug this error/warning.

Right now input file reads in a restart file using “read_restart”

I define all my potentials and groups and then get to where I believe my source of error and confusion lie

compute A_CoM antrecene com
compute P_CoM pyrene com

thermo_style custom c_A_CoM[1] c_A_CoM[2] c_A_CoM[3] c_P_CoM[1] c_P_CoM[2] c_P_CoM[3] # variables written to the output

thermo ${out} # how often writes to output

dump 3 linker custom ${dumptrj} npt_NR_folding.lammpstrj id type xs ys zs # writes trajectory in normal format

rerun npt_NR_eps17_300ns_link.lammpstrj first 1000 every 1000 dump x y z box yes scaled no format native

I believe what is happening is that the input file is reading from the restart file to set up the simulation box then gets to rerun in which reads the trajectory file like read_dump and the uses the trajectories to map output in which is inconsistent with the initial
coordinates given from the read_restart file. If this is the point can someone direct me towards a solution to write a better input file for a rerun?

If the warning is unrelated and I need to search elsewhere for a answer let me know as well

Much Appreciated

Michael Goytia

Graduate Student
University of Utah Chemistry Department

You could also just sed/awk/grep your output…

Something like

lmp -in | grep -v “WARNING: Inconsistent image flags”

should do the trick.

Then again, you might as well fix the problem. I think you can put a change_box command somewhere between where you read the restart file and rerun the dump file to set it to image flags consistent with the dump file:

I don’t know if it’s easy to fix the snapshots that you

already have, but if your dump files had been written with

the image flags (ix, iy, iz in dump custom) the

the read dump command, which rerun uses, can

read back in the image flags for each snapshot.

See the read_dump doc page for details.