[lammps-users] problem in restarting simulation

Dear lammps users,

I am using “angle_style hybrid class2 harmonic” in my simulation. I have made an
equillibration run and wrote the restart file by the command write_restart. Now I want
to restart the simulation using this restart file. If I see the ASCII format of this restart file, it does not have the information for angle potential. So I need to specify them. Since I am using class2 potential I need to specify the “BondBond Coeffs” and “BondAngle Coeffs” in the data file only. So how will I restart my simulation? Can anybody send me some suggestions. Any suggestions and comments will be highly appreciated. Thank you in advance.

kind regards
Bhaskar

When you convert your restart file to a data file (presumably with
the restart2data tool), you'll need to paste in the BondBond lines,
etc that were in your original data file for the class2 potential.

I suppose we could make the bond, angle, etc hybrid potentials
write out this info into the restart file, so you wouldn't have to do this.

We avoided this for pair hybrid b/c of the complexity of some pair
potentials, but bond, angle, etc are not as complicated.

Steve

Dear LAMMPS,

when I replicate a system of linear polymers from a restart file, I receive errors on bonds too long. I guess that before replicating the system, the replicate command does not release the periodic boundary conditions such that bonded atoms in the same molecules are placed close together. Is that the case here? If yes, could you give a fix for that soon?

Thank you,
-Trung

The replicate command should recognize bonds that cross
periodic boundaries and do the right thing. But you need to
have the image flags correct. Can you use it on a system you
read in from a data file? I would start from that and see
if you can get it to work as you expect.

Steve

Thank you, Steve.

It works well when I use restart2data to create a data file and read it in.

Just my curiosity, in the atom_vec_bond.cpp (I use atom_style bond), I see that both pack_restart() and unpack_restart() involve the image flags. Why does read_restart still give errors when used with replicate?

Best regards,
-Trung

Quoting Steve Plimpton <[email protected]>:

Dear sir,

I have tested the way you suggested, pasting the BondBond Coeffs etc. line from the data file of the prev. run in the data file got from restrart file(restart2data). While restarting the simulation I am reading this data file(got from restart2data) using read_data command only. Although the simulation is running, I am not sure whether it is really restarting the simulation or it is running a new simulation taking the last configuration as the new configuration. Could you please make my confusion clear or is there any other way to restart? Any suggestions and comments will be highly appreciated. Thank you in advance.

kind regards
Bhaskar

Dear sir,

Please ignore my prev query. It has been resolved. To check whether the restarting is done properly or not the following steps are to be followed:

(1) Make a run of 20 steps with the initial configuration.

(2) Make another run of 10 steps with the initial configuration

(3) Take the restart file from the run (2) and convert it to ascii format and paste in the BondBond Coeffs etc. lines from the prev. run data file in to it. Then restart the run (2) for 10 steps and this is run (3). This third run will have 11-20th steps.

Now compare the energies of run (3) with the run (1) from 11th step to 20th step. If the energies are equal then it is confirmed that the simulation has been restarted properly.

kind regards
bhaskar

If you can post a simple, small example of something
that doesn't work with read_restart + replicate, I'll look at
it. In principle, it should work.

Steve

Hi Steve,

this is the example that does not run with read_restart and replicate. The restart file was generated by lammps-25Jan08 on Mac OS 10.4.

Thank you,
-Trung

Quoting Steve Plimpton <[email protected]>:

in.txt (886 Bytes)

restart_9000000.txt (110 KB)

Can you rerun your problem with the most current version
of LAMMPS? It won't read your restart file due to it being
in an older format.

Steve

Hi Steve,

this is the restart file produced by lammps-13Aug08. I also attach the initial data file.

Thanks,

-Trung

Quoting Steve Plimpton <[email protected]>:

in.txt (1.11 KB)

restart_9000000.txt (101 KB)

data.txt (28.2 KB)

I figured out what the problem is with your earlier email.
It is that you are running fix rigid, writing a restart file, then
trying to replicate the system from the restart file.

This comment in the manual applies (doc/fix_rigid.html)

IMPORTANT NOTE: The periodic image flags of atoms in rigid bodies are
modified when the center-of-mass of the rigid body moves across a
periodic boundary. They are not incremented/decremented as they would
be for non-rigid atoms. This change does not affect dynamics, but
means that any diagnostic computation based on the atomic image flag
values must be adjusted accordingly. For example, the fix msd will not
compute the expected mean-squared displacement for such atoms, and the
image flag values written to a dump file will be different than they
would be if the atoms were not in a rigid body.

What is happening is that the periodic image flags for atoms in a rigid body
are not what the replicate command expects and hence it can
not create new bonds appropriately.

I'd have to think whether it is easy or posible to fix this, b/c the
replicate command doesn't really know
anything about rigid bodies. Since there are other ways to generate a
replicated
system (e.g. write your own pre-processing code that uses a restart or
data file),
I'm inclined to just flag this as a restriction on using the replicate command
in conjunction with fix rigid (if there are bonds between 2 rigid bodies).

Also, I see that your data file defines bonds between atoms within some of
the rigid bodies. These might also cause problems for the replicate command.
These bonds are unneeded since the body is rigid. However even if you
get rid of these I think you will still have the problem for bonds between atoms
in 2 different rigid bodies.

Does this make sense? Do you have some other work-around to create the systems
you want?

Steve