[lammps-users] regions in restart files?

Hi all,

I am trying to restart an MD run from an equilibrated snapshot written using the write_restart command to continue on with the rest of the simulation (basically using the restart so that I can take the same state and do different things to it without wasting CPU time)

according to the read_restart docs, the fixes in the initial file need to be re-specified if they are to be continued, any new ones need to be provided and that the atom groups are stored. However, I seem to be having some difficulty with my temp/rescale fix:

in the initial file, I specified an interior and exterior atom group, and applied the fix temp/rescale to the exterior group:
fix 1 all nve
fix 2 all temp/rescale 1 300.0 300.0 0.5 1.0 region exterior

However, when I re-specify these fixes in the restart file using the same syntax as above I get the error: ERROR: Fix temp/rescale region ID does not exist

Do I need to re-specify the group as well? Am I doing something wrong?

Thanks,

Dave

David E. Farrell

Graduate Student

Mechanical Engineering

Northwestern University

email: d-farrell2@…435…

David,

You will indeed have to redefine your region as well. Data associated with group definitions is not stored.

Pieter

Hi Pieter,

so, I tried just re-including the region commands, however LAMMPS gave an error of ‘ERROR: Use of region with undefined lattice’ … this seems a little odd as I would expect that to be present in the restart file and that ‘read_restart’ would have set that up, but it sounds like I actually want to use ‘read_data’ to get the geometry information back.

It seems there is a bit more to a restart file than the docs let on…

Dave

Group names and atom assignments to groups are saved
in the restart file, but region info is not. So the input script
that re-runs your problem from a restart file needs to
re-specify the regions. This is true of many other settings
as well (timestep, neighbor list parameters, etc). The
restart file really only stores atom and force field info.

Steve

OK - so I see how that works now, but the restart also seems to want to have a ‘lattice’ command prior to re-defining any groups or regions… but I can’t see how I can do this without essentially losing the geometry and force information I want to use from the restart file.

The particular error I get is: ‘ERROR: Use of region with undefined lattice’

The initial file looks like (just the geometry bits):

Create geometry using internal stuff

lattice diamond 4.0 # set up a diamond lattice, lattice parameter from NPT simulation at zero pressure, target temp
region box block 0 20 0 20 0 60 # set up a 20x20x60 cell box to fill
create_box 2 box # initialize box
create_atoms 2 basis 1 2 basis 2 2 basis 3 2 basis 4 2 basis 5 1 basis 6 1 basis 7 1 basis 8 1 # create atoms

mass 1 12.0 # type 1 = C
mass 2 28.1 # type 2 = Si

Define potential

pair_style tersoff
pair_coeff * * SiC_Devanathan_JNM_1998.tersoff C Si

Groups

region allatoms block INF INF INF INF INF INF
region interior block 2 18 2 18 2 INF
region exterior intersect 2 allatoms interior side out

group interior region interior
group exterior region exterior

My restart file looks like (corresponding to re-setting the geometry region info):

Define potential

pair_style tersoff
pair_coeff * * SiC_Devanathan_JNM_1998.tersoff C Si

Groups

region allatoms block INF INF INF INF INF INF --> this line is where the error is kicked out: ERROR: Use of region with undefined lattice
region interior block 2 18 2 18 2 INF
region exterior intersect 2 allatoms interior side out

group interior region interior
group exterior region exterior

So - I guess my question is… how do I re-specify the regions, if they depend on the original positions of the atoms?

Thanks,

Dave

David,

Try appending ‘units box’ to all your region commands:

Groups

region allatoms block INF INF INF INF INF INF units box
region interior block 2 18 2 18 2 INF units box
region exterior intersect 2 allatoms interior side out units box

I believe lattice is the default.

Pieter