[lammps-users] restart file missing atoms?

Hi all,

In a new method I have been coding up, at the end of a run, I want the code to automatically output a dump file and a restart file. The code is meant to run on multiple partitions, but only one outputs this information.

I am able to get that to happen (using lines 273-283 of the attached file), and the dump file looks correct. However, the binary restart file seems to be missing atoms. I can’t sort out where they could have ‘gone’ - the kinetic energies and timesteps don’t indicate atoms flying away. However, when I just put a ‘write_restart’ line after my function call in the input file, all works fine - the restart file is complete. Am I missing some step in calling the code that does the output - I copied it from a similar section of code in min_cg.cpp?



David E. Farrell

Graduate Student

Mechanical Engineering

Northwestern University

email: [email protected]…435…

run_PRD.cpp (10.5 KB)

Got the problem sorted… needed to call the functions to enforce the PBCs prior to writing the restart file - the restart files were complete but when read, there were atoms outside the box but no errors indicating that could be the source of the problem. things seem to be working right now.


So the restart file wasn't missing atoms. Rather the problem
was when you read in the restart file, that it didn't assign
some atoms correctly b/c they were outside the box?


That appears to have been the case. I am guessing because my output didn’t always line up with a step where the PBCs were enforced (the atoms were only outside the box by a small amount).