Using dump file as an input file for a new simulation

Hi everyone,

I’m trying to do a simulation by using one of the dump files that I got from a previous simulation as a new input file - so that the initial configuration for this new simulation (say simulation 2) will be the final configuration of a previously done simulation (say simulation 1). I reorganized this dump file and generated topology information again. I also updated the simulation box dimensions based on the dump file. But when I try the run the code I get this error: Bond atoms missing on proc.

All I do is to apply:

fix 1 all npt 300 300 0.01 xyz 1 1 0.1 drag 2
run 20000

to equilibrate the structure at room temperature and pressure.

I checked the problematic bonds that appear to be missing, and they indeed seemed to have a longer bond length than they were supposed to have. However, that is the case in the dump file itself as well. In other words, these bonds seem to have longer lengths than they should during simulation 1 as well, but simulation 1 is completed without any problems.

I’m using periodic boundary conditions, and I learned that the atom positions in dump files sometimes could exceed the periodic boundary conditions. That might be the reason for why some bonds or angles appear to be missing, and I will try using dump_modify command to fix that. However, I’m concerned that this problem still could be related to something else - could it be because of the type of npt that I apply? If you have any other ideas for why something like this could happen it’d be really helpful for me to hear them.

Thank you so much,

Karsu Kilic

why so overly complicated and error prone?

why not write out a final data file with write_data or a restart file
with write_restart at the end of your simulation and then load this in
the beginning of the next?

...or if you absolutely have to use read_dump, then first used the
exact same setup as before and then use read_dump to update the
coordinates. note however, that read_dump can only work well, if you
have written out image flags or unwrapped coordinates. otherwise, you
will read in inconsistent periodic images (and most likely get a
warning about that) and then have all kinds of problems and bad
dynamics.

axel.

Hi Axel,

Because I actually do some modifications on the dump file itself - I delete and replace some of the atoms, so it’s not entirely the same dump file. However, the problematic atoms that seem to have longer bond lengths than they should are the atoms that I have not changed at all.

The idea was to simulate this new version of atoms, and I thought that if I could regenerate the atom coordinates and topology based on this dump file, with the changes I made, I could use those as my new simulation input files. I know that with the new atoms it may not be the exact and correct structure, and that’s why I plan to equilibrate the structure before I do anything else on the system. Do you think it’s not likely that it’ll work?

Thank you,

Karsu Kilic

Hi Axel,

Because I actually do some modifications on the dump file itself

why didn't you say so in the beginning. getting good help from a
mailing list, requires to give sufficiently complete and lucid
information about what you are looking for and the motivation for it.

- I delete and replace some of the atoms, so it's not entirely the same dump file. However, the problematic atoms that seem to have longer bond lengths than they should are the atoms that I have not changed at all.

The idea was to simulate this new version of atoms, and I thought that if I could regenerate the atom coordinates and topology based on this dump file, with the changes I made, I could use those as my new simulation input files. I know that with the new atoms it may not be the exact and correct structure, and that's why I plan to equilibrate the structure before I do anything else on the system. Do you think it's not likely that it'll work?

you are throwing out a lot of useful and important information with no
assurance, that you can regenerate it cleanly and correctly. more
importantly, if you don't have the image flag or unwrapped coordinate
information, you will "loose" bonds due to atom pairs being
unexpectedly displaced.

if you do want to edit your topology, you should read/parse a data
file and then delete/add/update/modify the topology information with
it. that will save you a whole lot of trouble. keep in mind, that you
may also have to retype atoms and update partial charges in the
process. any automated topology building in LAMMPS or other software
is at best a band-aid compared to explicitly setting the information
that you know because you know the structure of the molecules/crystals
involved and the requirements of the force field used. any generic
tool cannot make any assumptions and thus will always be inferior and
more error prone (there is a good reason why I named the topology
building commands in the TopoTools VMD plugin "guessXXX" and not
"findXXX" or "computeXXX").

what you describe sounds (in conjunction of your previous post to the
list) like you want to avoid at all cost the step of building the
topology from your knowledge to avoid doing a bit more complex
programming. but rest assured, "there ain't no such thing as a free
lunch" or in other words: any corners that you are trying to cut at
the beginning will haunt you later in discovering problems that were
not properly caught early on.

axel.

Hi Axel,

I’m sorry that the I provided missing information.

if you do want to edit your topology, you should read/parse a data
file and then delete/add/update/modify the topology information with
it. that will save you a whole lot of trouble. keep in mind, that you
may also have to retype atoms and update partial charges in the
process.

I actually did this - I’ve been working on for a while now to regenerate atom coordinates and topology information correctly. I got several errors because of the mistakes I made while regenerating them, and I fixed a lot of them until I got to this point. I’m still new to LAMMPS and trying to figure out where the problem is - whether it is because of something I don’t know yet about how LAMMPS functions or it is because of a simple mistake I did while regenerating the atom and topology information is not always clear to me.

I didn’t know about image flag and unwrapped atom configuration. I will search for these and understand what they mean. Thank you for your guidance.

Best,

Karsu Kilic

Hi Axel,

I'm sorry that the I provided missing information.

if you do want to edit your topology, you should read/parse a data
file and then delete/add/update/modify the topology information with
it. that will save you a whole lot of trouble. keep in mind, that you
may also have to retype atoms and update partial charges in the
process.

I actually did this - I've been working on for a while now to regenerate atom coordinates and topology information correctly. I got several errors because of the mistakes I made while regenerating them, and I fixed a lot of them until I got to this point. I'm still new to LAMMPS and trying to figure out where the problem is - whether it is because of something I don't know yet about how LAMMPS functions or it is because of a simple mistake I did while regenerating the atom and topology information is not always clear to me.

this issue can be easily avoided by working on trivially simple
examples where each example just tests only a single feature and
gradually building from that.

in general, you should not "regenerate" topology information, but just
store it with atoms when reading/parsing a data file and then you can
easily and efficiently augment and modify it. the aforementioned
TopoTools plugin for example allows such modifications (only
adding/removing atoms is a bit tricky, since VMD expects a fixed
number of atoms, but that can be worked around) and provides an
abstraction of the underlying data structures in VMD, which are much
more tedious to modify directly (that is what software is good for).

I didn't know about image flag and unwrapped atom configuration. I will search for these and understand what they mean. Thank you for your guidance.

i am confused. why do you try to do something rather complex and
complicated, if you have not yet understood well enough how the
underlying MD code operates? again, i believe you are making your life
needlessly difficult. it would be much easier to first study how to do
MD simulations of simpler systems with LAMMPS well. this way, again,
you have to worry much less about whether your lack of understanding
of LAMMPS is causing a problem or a bug or unwanted feature in your
tool. it may look like a diversion, but it will pay off in the long
run.

axel.

Regenerate is not the right word that’s true, sorry for the confusion.

The simulations I have done so far with LAMMPS were very specific and well set, so I haven’t had any problems with them. This is my first time trying something different with it. I’m trying to learn along the way, and you’re right that I should have started with something simpler.

I edited the topology and atom coordinates just like how you described. I thought that it might work, because the initial configuration geometry for a simulation doesn’t have to be perfectly fixed based on my experience. I was planning to refine it by equilibrating the structure. Normally I start the simulation with a certain number of precursors and free atoms that are randomly scattered inside the simulation box. Now the only difference is that I want start with a different configuration (the configuration I was hoping to take from the dump file) with the addition of some portion of the atoms being changed.

I’ll try simulating simpler networks to see where the problem is.

Best,

Karsu Kilic

Hi Karsu

The following recent discussion may be partially relevant (especially the end)

https://sourceforge.net/p/lammps/mailman/message/36591802/