[lammps-users] Cannot apply the stress fields with NPT

Hi all,

Hope this email finds you well.

Recently I was trying to apply compressive stress fields with NPT however I got an error “Out of range atoms - cannot compute PPPM”. The part log.lammps file is attached below. Please let me know whether you have any suggestions. Thanks.

Error message from LAMMPS output:

Per MPI rank memory allocation (min/avg/max) = 135.3 | 136.3 | 137.8 Mbytes

Step PotEng KinEng Lx Ly Lz Press v_p1 v_p2 v_p3 v_p4 v_p5 v_p6 Volume v_beta Temp

0 25683532 1923588.6 6.5531676 1581.5019 1528.6133 27.881681 0.01055317 -0.008669054 -0.010359449 0.0069118395 -0.0056889151 -0.012314752 15842315 90.064399 384.12172

ERROR on proc 214: Out of range atoms - cannot compute PPPM (…/pppm.cpp:1936)

Last command: run 500000

ERROR on proc 57: Out of range atoms - cannot compute PPPM (…/pppm.cpp:1936)

Last command: run 500000

LOG.LAMMPS

LAMMPS (7 Aug 2019)

package gpu 1

package gpu 4 neigh no

units real

dimension 3

processors * * *

boundary p p p

atom_style full

bond_style harmonic

angle_style harmonic

dihedral_style harmonic

improper_style harmonic

box tilt large

ATOM DEFINITION

read_restart restart.dynamic.560000

restoring atom style full from restart

triclinic box = (-0.00575032 -21.692 -12.8687) to (6.54742 1559.81 1515.74) with tilt (-0.000379431 -1.71813 -0.00964283)

1 by 20 by 18 MPI processor grid

restoring pair style buck/coul/long/gpu from restart

restoring bond style harmonic from restart

restoring angle style harmonic from restart

restoring dihedral style harmonic from restart

restoring improper style harmonic from restart

1680000 atoms

1680000 bonds

2880000 angles

5280000 dihedrals

480000 impropers

4 = max # of 1-2 neighbors

8 = max # of 1-3 neighbors

18 = max # of special neighbors

special bonds CPU = 0.0223102 secs

pair_style born/coul/long 15.0

kspace_style pppm 1.0e-4

include pair_born.dat

special_bonds lj/coul 0.0 0.0 1.0 dihedral yes

4 = max # of 1-2 neighbors

8 = max # of 1-3 neighbors

18 = max # of special neighbors

special bonds CPU = 0.0348831 secs

suffix off

kspace_style pppm 1.0e-6

neighbor 2.0 bin

neigh_modify delay 0 every 1 check yes one 10000 page 100000

variable deform_temp equal 384

fix 1 all npt temp 384 384 1000 x 49346.163336 49346.163336 50000 y 73115.093035 73115.093035 50000 z 58404.293123 58404.293123 50000

Resetting global fix info from restart file:

fix style: npt, fix ID: 1

restart 1000 restart.npt.*

run 500000

PPPM initialization …

using 12-bit tables for long-range coulomb (…/kspace.cpp:323)

G vector (1/distance) = 0.218857

grid = 16 800 768

stencil order = 5

estimated absolute RMS force accuracy = 0.000372743

estimated relative force accuracy = 1.1225e-06

using double precision KISS FFT

3d grid and FFT values/proc = 57575 38400

All restart file global fix info was re-assigned

Neighbor list info …

update every 1 steps, delay 0 steps, check yes

max neighbors/atom: 10000, page size: 100000

master list distance cutoff = 17

ghost atom cutoff = 17

binsize = 8.5, bins = 1 187 180

1 neighbor lists, perpetual/occasional/extra = 1 0 0

(1) pair buck/coul/long/gpu, perpetual

attributes: full, newton off

pair build: full/bin

stencil: full/bin/3d

bin: standard

WARNING: Bond/angle/dihedral extent > half of periodic box length (…/domain.cpp:901)

Per MPI rank memory allocation

Sincerely,
Joe

can you restart from the restart file successfully with fix nvt instead of fix npt?
was the restart system equilibrated for the pressure in your fix npt command?
if not, you may need to ramp up the pressure instead of applying it immediately.

you may also need to increase your communication cutoff, if that does not help.
you may also want to try running pppm not on the GPU but on the CPU and only the pair style on the GPU.

Axel.

Dr. Kohlmeyer,

Thanks for your suggestions.

1.can you restart from the restart file successfully with fix nvt instead of fix npt?
I can restart the simulation with NVT or very small pressure, say, no more than 100 atm with NPT.

2.was the restart system equilibrated for the pressure in your fix npt command?
The system is not equilibrated for the pressure I applied.

  1. if not, you may need to ramp up the pressure instead of applying it immediately.
    Even if I apply the pressure gradually rather than immediately, I got the same error without log.lammps output.

4.you may also need to increase your communication cutoff, if that does not help.
I thought changing cutoff would change the physics?

5.you may also want to try running pppm not on the GPU but on the CPU and only the pair style on the GPU.
I did not run pppm on the GPU because of the “suffix off” command before I call the pppm. Please let me know if this is not what you are referring to.

Sincerely,
Joe

Dr. Kohlmeyer,

Thanks for your suggestions.

1.can you restart from the restart file successfully with fix nvt instead of fix npt?
I can restart the simulation with NVT or very small pressure, say, no more than 100 atm with NPT.

ok. that sounds good, but also provides a hint what may be the origin of your problems: you appear to have very asymmetric box dimensions. lx is very small compared to ly and lz, so you may get instabilities in x because of very large pressure fluctuations.

please also note that the long-range solvers like ewald or pppm are the most accurate for cubic box geometries and become increasingly inaccurate (because of how they are derived) the farther away from that a box geometry is.

please also note this warning:
WARNING: Bond/angle/dihedral extent > half of periodic box length (…/domain.cpp:901)

because your box in x is so much shorter than the cutoff, the neighbor list code may select the wrong periodic copy of bond/angle/dihedral atoms. that can be a problem as well.

2.was the restart system equilibrated for the pressure in your fix npt command?
The system is not equilibrated for the pressure I applied.

ok.

  1. if not, you may need to ramp up the pressure instead of applying it immediately.
    Even if I apply the pressure gradually rather than immediately, I got the same error without log.lammps output.

instantly? or eventually?
if instantly, then I recommend changing the fix id for fix npt. since you are changing the fix npt settings, LAMMPS may corrupt the internal state by restoring restart data that does not match the fix settings.

4.you may also need to increase your communication cutoff, if that does not help.
I thought changing cutoff would change the physics?

i am talking about the communication cutoff, NOT the interaction cutoff. check out the comm_modify command.

5.you may also want to try running pppm not on the GPU but on the CPU and only the pair style on the GPU.
I did not run pppm on the GPU because of the “suffix off” command before I call the pppm. Please let me know if this is not what you are referring to.

ok.

Dr. Kohlmeyer,

Thanks for your email. The error is because the LAMMS re-enabled the fx npt from the last simulation which doesn’t match the current fix npt. Now the simulation can run. However, when I apply the stress field, the system cannot reach the target stresses even with 600000 timesteps, 600 ps. Does any modification help it reach the target state faster?

Sincerely,
Joe

Dr. Kohlmeyer,

Thanks for your email. The error is because the LAMMS re-enabled the fx npt from the last simulation which doesn’t match the current fix npt. Now the simulation can run. However, when I apply the stress field, the system cannot reach the target stresses even with 600000 timesteps, 600 ps. Does any modification help it reach the target state faster?

two things:

  1. you must not look at instantaneous pressure, but time averaged, especially in x direction.

  2. you can try with a shorter time constant, e.g. 10000 instead of 50000. but one big problem is the “uneven” shape of your box. you will have very high pressure fluctuations in x-direction and they will cause larger (relative) box adjustments, which will likely have an impact on y and z as well. so for very large pressures, this may not be possible to resolve.
    you could try to replicate the system in x a few times to have a longer box in that direction.

as mentioned before, I would be very concerned in general that your “uneven” box shape can very much negatively affect the accuracy of your results for multiple reasons.
is there a particular reason why y and z have to be this large and x this extremely small?

axel.

Dr. Kohlmeyer,

I don’t understand your first comment clearly.

I need to have large dimensions in y and z. And to reduce the total number of atmos, I keep the x-dimension short.

Sincerely,
Joe

Sincerely,
Joe

Dr. Kohlmeyer,

I don’t understand your first comment clearly.

pressure fluctuates. and it fluctuates more with shorter box dimensions and box length adjustments on shorter dimensions will cause much larger changes in pressure.

if you don’t collect averaged pressure values (using a running average via fix ave/time), you may misjudge how close of far your system from the desired target is.

I need to have large dimensions in y and z. And to reduce the total number of atmos, I keep the x-dimension short.

why this large? why not a quarter of that size? or one 10th? it would still be a very large system.
i would consider your x-dimension too short (by quite a large margin). your cutoff is almost 3x as large, that means a large number of your interactions in x directions are actually with periodic copies of the atoms themselves. that cannot lead to good statistics. you are trading a high risk of getting unstable simulations and low accuracy for speed.

I would make some tests on how much the convergence and results change if you double or triple or quadruple the system in x for data you have already collected.
there may be mitigating circumstances that lead to error cancellation, but I would already be concerned that the application of a long-range solver that is most accurate for a cubic geometry would lead to accuracy issues in this case.

axel.

Dr. Kohlmeyer,

Thanks for your suggestion. I will adjust the dimensions.

Sincerely,
Joe

Please don’t just take my word for it, but make some tests to verify whether my gut feeling is right or not.