[lammps-users] Atom count is inconsistent, cannot write restart file

Hi, Steve:

I am running a model with 10k+ atoms, however, when it starts to run, the error comes as "Atom count is inconsistent, cannot write restart file
". Looking into the menu, it shows some atoms were lost… How could it be & how to solve it? Thanks.

The log.lammps file:

LAMMPS (21 May 2008)

MnO Nanowire, 28A thick, 6050 atoms

Initialization

units real
atom_style atomic
boundary p p p

Atom definition

read_data PE.inp
orthogonal box = (0 0 0) to (78 80 25.308)
1 by 1 by 1 processor grid
12080 atoms
12080 velocities
###read_restart restart.MnO.*

Setting

Atomic group

group bottom type 1 3
2456 atoms in group bottom
group mainbody type 2 4
9624 atoms in group mainbody

Forcefield

pair_style lj/class2 10.0
pair_coeff 1 1 0.054 4.0
pair_coeff 1 2 0.054 4.0
pair_coeff 1 3 0.104 3.4655
pair_coeff 1 4 0.104 3.4655
pair_coeff 2 2 0.054 4.0
pair_coeff 2 3 0.104 3.4655
pair_coeff 2 4 0.104 3.4655
pair_coeff 3 3 0.02 2.995
pair_coeff 3 4 0.02 2.995
pair_coeff 4 4 0.02 2.995

Parameter of simulation

neighbor 0.3 bin
neigh_modify every 50 delay 0 check yes
timestep 2.0
##fix 1 all npt 300. 300. 100. xyz 0.0 0.0 1000.0
fix 1 all nvt 300. 300. 100.

#Set frozen atoms
fix freeze_atoms bottom setforce 0.0 0.0 0.0

Output

dump mydump all custom 500 dump.PE tag type x y z vx vy vz fx fy fz
thermo 500
restart 500 restart.PE

Run the simulation

run 500
Memory usage per processor = 19.8284 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 71151528 0 71151528 94060501
ERROR: Atom count is inconsistent, cannot write restart file

1 Like

Maybe because you only allow it to reneighbor every 50 timesteps?
I would reneighbor (or allow it too) often, and print out more
thermo. Your pressure is extremely high, which probably
means your system is ill-behaved.

Steve

2009/9/2 Scott Starlight <[email protected]>:

Hi, Steve:

Thanks for your informaiton. I found there are some over-close atomic pairs in my system, which might cause the abnormally high energy. Therefore, it needs to run a Monte carlo simulation before MD run. How to run it with Lammps?

Thanks!
Scott

Dear scott,
Instead of running MC, you could run minimization which will remove the over-close atomic pairs in the system

2009/9/29 Scott Starlight <[email protected]…8…>

LAMMPS does not do Metropolis MC. As Vikas said,
you can minimize first, or run dynamics with an
option like fix nve/limit, to get rid of overlaps.

Steve

2009/9/29 Scott Starlight <[email protected]>:

Hi Steve & LAMMPS users:

I am suing Material studio to visualize the atomic positions of LAMMPS output. There is a tool “lmp2arc” to convert dump file to .arc for MS use. As the dump file always records the atom position for time=0 intially. The “lmp2arc” gives multiple frames with time=0, N, 2N …, while only the frame of time=0 can be visualized unless manually adjust. Therefore, I have two quesitons:

  1. How to make dump file not output atom infomation at time=0?
  2. Is it possible to visualize the multiple framed .arc file? This might be out-of-scope for LAMMPS, hopefully to get help from users with similar experience.

Thanks!
Scott

I don't know how MS uses arc files, but you can have LAMMPS
create its dump file in various ways. Skipping frame 0 is not
typical, but if you want frames every 100 steps, I suppose you could

setup ...
run 100
dump 1 all atom 100 file.foo
run 9900

Then the first frame will be at step 100.

You could also use a filename with a * in it, and get one frame
per file. Then you could assemble those however you wish
for lmp2arc to produce however many arc files you wish.

Steve

2009/10/22 Scott Starlight <[email protected]>:

Hi, Steve & users:

I am running a thermodynamic simulation with Polyethylene bulk by class2 forcefield. However, I found the atomic position was never changed during the run. I doubt the problem lies in the setting of “fix” but unable to figure out. The dump file always output the same position, velocity & force. Anybody can offer a help?

Here is the output of log. & dump file:

log.lammps output:
LAMMPS (7 Jul 2009)

Initialization

units real
atom_style full
boundary p p p

Forcefield

pair_style lj/class2 8
bond_style class2
angle_style class2
dihedral_style class2
improper_style class2

Atom definition

read_data PE.inp
2 = max bonds/atom
6 = max angles/atom
9 = max dihedrals/atom
4 = max impropers/atom
orthogonal box = (0 0 0) to (32 80 20.4328)
2 by 4 by 1 processor grid
4952 atoms
4428 bonds
7932 angles
10534 dihedrals
4888 impropers
4 = max # of 1-2 neighbors
6 = max # of 1-3 neighbors
12 = max # of 1-4 neighbors
16 = max # of special neighbors

Parameter of simulation

neighbor 3 bin
neigh_modify every 1 delay 0 check yes
timestep 2.0

Set condition

region bottom_r block INF INF 0 9.9999 INF INF side in units box
region therm_r block INF INF 10 25 INF INF side in units box
region slider_r block INF INF 60 70 INF INF side in units box
group bottom_g region bottom_r
882 atoms in group bottom_g
group therm_g region therm_r
1304 atoms in group therm_g
group slider_g region slider_r
758 atoms in group slider_g

velocity all create 300.0 4928459 rot yes dist gaussian
fix therm_f all temp/rescale 100 300. 300. 20 1.0

Output

dump output all custom 499 dump.PE.* id type xs ys zs vx vy vz fx fy fz mol
thermo 500
restart 1000 restart.PE

Run the simulation

run 1000
Memory usage per processor = 8.32907 Mbytes
Step Temp E_pair E_mol TotEng Press
0 299.91372 8.5745489e+09 883.019 8.5745542e+09 3.3726002e+10
500 299.91372 8.5745489e+09 883.019 8.5745542e+09 3.3726002e+10
1000 299.91372 8.5745489e+09 883.019 8.5745542e+09 3.3726002e+10

Dump:
Step 0:
ITEM: ATOMS id type xs ys zs vx vy vz fx fy fz mol
1 1 0.310934 0.0275542 0.121629 0.0302643 0.0227654 -0.00551094 120.36 -1626.76 -13.2738 0
2 2 0.31062 0.0384892 0.152952 0.00478656 -0.0104211 -0.000775059 203008 -695013 1.6215e+06 0
3 3 0.347833 0.049173 0.136139 0.00381897 -0.000166829 0.0112863 1242.66 542.321 226.887 0
4 1 0.311946 0.0327121 0.202834 -0.00472025 -0.0141008 -0.0158433 136.402 -1612.72 4.65099 0
5 1 0.278921 0.0439027 0.152144 -0.0195911 0.0102865 0.0314105 -1633.68 247.126 894.931 0
6 1 0.342732 0.0530099 0.087486 -0.00380919 -0.0100594 -0.00894974 41.7817 50.4694 -63.6658 0

Step 499:
1 1 0.310934 0.0275542 0.121629 0.0302643 0.0227654 -0.00551094 120.36 -1626.76 -13.2738 0
2 2 0.31062 0.0384892 0.152952 0.00478656 -0.0104211 -0.000775059 203008 -695013 1.6215e+06 0
3 3 0.347833 0.049173 0.136139 0.00381897 -0.000166829 0.0112863 1242.66 542.321 226.887 0
4 1 0.311946 0.0327121 0.202834 -0.00472025 -0.0141008 -0.0158433 136.402 -1612.72 4.65099 0
5 1 0.278921 0.0439027 0.152144 -0.0195911 0.0102865 0.0314105 -1633.68 247.126 894.931 0
6 1 0.342732 0.0530099 0.087486 -0.00380919 -0.0100594 -0.00894974 41.7817 50.4694 -63.6658 0

I don;t see a time integration fix like fix nve.
So the atoms won't move.

Steve

2009/11/4 Scott Starlight <[email protected]>:

Dear Steve & users:

As my understanding, to set constant velocity to a group of atoms, it is to set the initial velocity via “velocity” command, then zero out the force during timesteping via “fix setforce”. However, I need these froce information. Therefore, is there a way to keep the constant velocity of atoms during timestepings without change the force? say, reset the velocity every time step?

Thanks!
Scott

One additional:

I want to set the constant velocity of group atoms only in one linear direction (-x), other directions are free of such constrain. Therefore, the fix nve/noforce command doesn’t seem fit.

Thanks!
Scott

Try fix nve/noforce.

Steve

2009/11/20 Scott Starlight <[email protected]>:

Hi, Steve:

Actually, I am only setting constant velocity in one direction (+x), other two linear directions (+y,z) were treated as normal case. Possible to deal it?

I guess you'd have to comment out lines in fix nve or fix nve/noforce if
you want to treat one dimension differently than the others.

Steve

2009/11/21 Scott Starlight <[email protected]>:

Dear Lammps-user:

I met a problem when using command fix nve/no force with minize command. I set a rigid part, named as ‘slider’. I run a three-step jobs, with 1) minimize the whole structure; 2) run MD wih press down the slider as a rigid body; 3) hold the slider staionary to run equilibration. It works well for the first two step. However, when set the slider stationary with zero out the velocity & fix nve/noforce. The slider atoms were spread out without control. It seems of running a minization process again before the 2nd MD run. My input is as below with key command highlighted. Any suggestions?

Thanks in advance!
Scott

Initialization

units real
atom_style full
boundary p p p

Forcefield

pair_style lj/class2/coul/cut 10.
bond_style class2
angle_style class2
dihedral_style class2
improper_style class2

Atom definition

read_data PM.inp

Parameter of simulation

neighbor 5 bin
neigh_modify every 10 delay 0 check yes
timestep 0.1

Set condition


region slider_r block INF INF INF INF 50.500 63 side in units box
group slider_g region slider_r

velocity slider_g set 0.0 0.0 0.0 sum no units box

fix slider_1 slider_g rigid single torque 1 off off off
fix slider_2 slider_g aveforce 0.0 0.0 -0.1

fix 3 slider_g nve

minimize 1.0e-3 1.0e-5 100 1000

Press down the hard slider

run 500000

Hold the slider

unfix slider_1
unfix slider_2

velocity slider_g set 0.0 0.0 0.0 sum no units box

fix 10 slider_g nve/noforce

run 500000

From the doc page for fix nve/noforce:

This fix is not invoked during energy minimization.

That's b/c it's a time integration fix. Most fixes in
LAMMPS are not relevant to minimization. Any that
are, are documented. You might try fix setforce which
does work with minimization.

Steve

2010/9/13 Scott Starlight <[email protected]>:

Thanks, Steve.

However, I only need a minization at the beginning. Afterwards, I need to run time integration works of molecular dynamics. How to stop the minimize in compulsory & start a time integration work?

Thanks!
Scott

I'm not sure what you're asking. If you use a minimize
command followed by a run command you will do
dynamics after minimization. Earlier, I thought you
were asking why atoms were not nailed down during
the minimization. If you were expecting fix nve/noforce
to do that, it doesn't.

Steve

2010/9/14 Scott Starlight <[email protected]>: