Hi,
I want to re-calculate the grid of pppm during run fix npt, because I use packmol to generate the initial structure and need to compact a very large simulation box. Due to the size of box changing dramatically, it always throws out of compute error. I try to use run 2000000 start 0 stop 2000000 every 10000 NULL pre no post no
to force resetup system every 10000 ts and keep temperature linearly raise from 400K-100K, but it told me run 2000000 start 0 stop 2000000 every 10000 NULL pre no post no
.
I wonder what is the appropriate solution to deal with this pppm problem, which I think the key point is recalculate the grid of reciprocal space.
Thanks!
There is no such error message in LAMMPS. Please be precise and accurate.
Using fix npt to shrink your system to a desired density is not necessarily a good idea.
How about using fix nvt and then fix deform? If you know your approximate target density you will get there reliably. Of course, you have to do it slow enough (specifically when the system is getting closer to the target density and thus interactions get stronger and particularly the repulsions) and with a small enough timestep so you have a stable time integration. At this point it is rather irrelevant that the PPPM forces are not very accurate.
Then you would unfix the fix deform command run for some time with fix nvt again. This will re-initialize PPPM for the given volume and now with accurate forces your system can equilibrate at the given density/volume. This can continue for some time until you have reached equilibrium. Depending on how much you system is “jammed”, you may need to do this step at elevated temperature and then need to slowly cool down and relax to the target temperature.
Next stage would be a change from fix nvt to fix npt. At this point the PPPM forces should be accurate and the pressure well consistent with the density and thus no problems with inaccurate pressure pushing the system volume into the wrong direction. You can then continue until the pressure is consistent with the requested value and the system has reached the density that is consistent with your force parameters for the given conditions. This kind of simulation protocol should be rather conservative and avoid the problems that you are speculating may cause you trouble.
What is the “it” and how did it “tell” you this?
I apologize for my mistake. The corrected description is:
- The error from pppm is
Out of range atoms - cannot compute PPPM
- When I try to use
run 2000000 start 0 stop 2000000 every 10000 NULL pre no post no
, the lammps error message is ERROR: Run command stop value is before end of run (src/run.cpp:129)
. I want to do is raising up temperature from 400K-1000K during 2000000 timesteps, and re-setup pppm every 10000.
Thanks for your advise!! I will try nvt+defrom right now! (My molecule is generated from ambertools and it is large and stiff, so I have to use a very large box at the begining and relax it.)
From the docs:
“Note that style pppm only computes the grid size at the beginning of a simulation, so if the length or triclinic tilt of the simulation cell increases dramatically during the course of the simulation, the accuracy of the simulation may degrade. … One way to handle this issue if you have a long simulation where the box size changes dramatically, is to break it into shorter simulations (multiple run commands).”
Another option would be to use a Wolf or DSF summation while you are equilibrating then switch to PPPM for production, see pair_style coul/cut command — LAMMPS documentation.
Thanks for your kind help! I break the run into small pieces it seems to work. I will try to use wolf and DSF style later!
1 Like