Dear Lammps users,
I have a problem of lost atom error using the kspace_modify slab command.
I’m simulating a slab system for a thermodynamic integration calculation. It is made of a rigid surface parameterized using OPLS-AA force field on the bottom of a cubic box surrounded by 14K SPC/E water molecules. The surface presents some carboxylic groups on it and the corresponding counterions are dissolved in the water medium in order to neutralize the total charge. The surface has been kept rigid by means of setting its starting velocity to zero, the force on its atoms set to zero using the corresponding fix and by applying the fix rigid command.
The system has been correctly equilibrated in NPT conditions by adjusting only the z dimension of the box for 0.1 ns without any problem. Then an harmonic wall was placed correspondingly to the upper z edge of the simulation box and the PPPM solver was switched for the slab geometry. The boundary conditions was set as “p p f”. Before starting the production run, a 20 ps equilibration run was done.
After around 0.2 ns the simulation stops due to a lost atom error. By checking its index, it correspond to the last atom in the system. At the beginning I thought that it was due to the fact that I used a fix wall/reflect together with rigid water molecules, but I had the same problem with the harmonic wall.
I attached a copy of the input script and the simulation output. The configurations are too big to be sent to the mailing list.
Thank you in advance.
Davide
conf.tgz (227 KB)
dear davide,
Dear Lammps users,
I have a problem of lost atom error using the kspace_modify slab command.
do you lose atoms _only_ if you turn on the slab correction?
or is the kspace_modify keyword simply the last change before
you run "production"?
it is not clear from the rest of your post.
thanks,
axel.
Hi Axel,
I’m sorry for the lack of clarity.
I suppose it is related to the kspace_modify because, together with the obvious change in the integrator (from NPT to NVT), the pbc and the presence of the wall, the remaining part of the simulation is the same as the NPT equilibration run.
What seems strange to me is that it appears after a lot of timesteps and always with the last atom (due to the fact that this is for thermodynamic integration, I have a set of uncorrelated simulations).
Please, let me know if something is already unclear.
Thanks.
Davide
Hi Axel,
I'm sorry for the lack of clarity.
I suppose it is related to the kspace_modify because, together with the
obvious change in the integrator (from NPT to NVT), the pbc and the presence
of the wall, the remaining part of the simulation is the same as the NPT
equilibration run.
well, in order to find the cause, i would recommend to run
tests where you add or remove those features in steps.
that will help to narrow it down. it is difficult to debug these
kind of problems without running tests.
What seems strange to me is that it appears after a lot of timesteps and
always with the last atom (due to the fact that this is for thermodynamic
integration, I have a set of uncorrelated simulations).
depending on how you created your system, there may be a reason
for singling out the last atoms. some correlations are not alwys obvious.
cheers,
axel.
The only test I can perform is to switch from NPT to NVT. All the other features are linked together because I cannot use PPPM in a non-periodic system without using the kspace_modify and I cannot create a wall in a periodic direction.
I’ll let you know.
Thanks.
DV
The only test I can perform is to switch from NPT to NVT. All the other
features are linked together because I cannot use PPPM in a non-periodic
system without using the kspace_modify and I cannot create a wall in a
periodic direction.
you could also run just coulomb with cutoff instead of pppm.
after all, this is not about doing a perfect simulation, but to
determine where it goes wrong.
axel.
Why don't you set thermo_modify lost ignore, and allow the system to
lose atoms. Then if you viz it and monitor the dump files, you will
see where the atoms are going when they get lost, and can decide
if/why that is a problem.
Steve
Dear Steve,
I also tried that way, but I can obviously follow the atom until it disappears from the dump file (moreover VMD stops to load the trajectory when the number of atom changes on the trajectory). However, I cannot see anything that could suggest why it disappears. It is a water hydrogen in the water bulk, away from the surface and the harmonic wall and not crossing the periodic box boundaries. I also tried to add a compute ke/atom, pe/atom and displace/atom on a group containing only this atom and I obtained non-null results also after lammps warn me about the atom loose. Probably an artifact, also if the values seem reasonable…
I also followed the Axel suggestion and I found that the lost atom warning appears when I start to use the top wall, so it doesn’t seem to be related to the kspace_modify slab as I thought before. If I continue in the npt ensamble as during the equilibration or at nvt with pbc along all the three directions, everything goes fine.
DV
Dear Steve,
I also tried that way, but I can obviously follow the atom until it
disappears from the dump file (moreover VMD stops to load the trajectory
when the number of atom changes on the trajectory). However, I cannot see
anything that could suggest why it disappears. It is a water hydrogen in the
water bulk, away from the surface and the harmonic wall and not crossing the
periodic box boundaries. I also tried to add a compute ke/atom, pe/atom and
displace/atom on a group containing only this atom and I obtained non-null
results also after lammps warn me about the atom loose. Probably an
artifact, also if the values seem reasonable...
I also followed the Axel suggestion and I found that the lost atom warning
appears when I start to use the top wall, so it doesn't seem to be related
to the kspace_modify slab as I thought before. If I continue in the npt
ensamble as during the equilibration or at nvt with pbc along all the three
directions, everything goes fine.
hmmm... perhaps the wall is too close?
axel.
No, the wall is not too close because I increased the z dimension of the box by 2 angstrom in order to obtain a correct pressure and water density. If that was the problem, I would expect a sample “explosion” during the first stages of the simulation, not after 200 ps. Moreover not all the simulations of my set of simulations loose the atom.
DV
No, the wall is not too close because I increased the z dimension of the box
by 2 angstrom in order to obtain a correct pressure and water density. If
that was the problem, I would expect a sample "explosion" during the first
stages of the simulation, not after 200 ps. Moreover not all the simulations
of my set of simulations loose the atom.
then the best way to proceed is to try to construct a "minimal"
input, i.e. something that can be run easily on a local machine,
if needed, with a debugger attached to reproduce the faulty behavior.
i am not 100% convinced that there is not a simpler explanation,
but the nature of the problem you describe warrants a closer look
from a second set of eyes.
cheers,
axel.
I’m afraid about the first law of debugging: the foolishness of a bug is exponentially proportional to the time required to find it.
I’ll try to see what I can do.
Thanks
DV
I'm afraid about the first law of debugging: the foolishness of a bug is
exponentially proportional to the time required to find it.
true. but you always have to look at the benefit: if it turns
out to be something simple, then it is very likely that you'll
never forget it and thus never make the same mistake again.
i've made a lot of blunders in my career so far and from most
of them i have benefited a lot, but only on the next project. 
cheers,
axel.
Are you using fix wall/reflect with fix shake for the waters?
That might be a problem. See the restriction on the fix wall/reflect
doc page about using fix rigid. It might also apply to fix shake. The
problem being that wall/reflect will do something dramatic to one
atom in the water when it crosses the boundary, which SHAKE will
try to correct. I imagine it could fail in some scenarios.
A soft wall would be better.
Steve
I was using it only at the beginning. When I have seen the lost atom error, I thought it was related to that, so I replaced the wall/reflect with wall/harmonic with an harmonic constant equal to 20 and 1 angstrom cutoff. However, the problem persisted. Moreover, the incriminated atom is far away from the wall.
DV
If you are saying an atom far from the wall becomes suddenly lost,
then presumably it is being blown out of the box. You need to monitor
the forces on that atom. You can print them every timestep, as well
as its position, up to the time it is lost.
Steve
I also tried that, together with calculating the atom potential and kinetic energy, by creating a group containing only the atom with the id specified in the error message. However, no sudden variation of those quantities are evident.
As I previously mentioned to Axel, strangely the force and energies values are computed also after the atom have been lost and their values seems reasonable.
DV
Did you also print its position and velocity? If it becomes "lost"
it must be because it leaves the simulation box.
Steve