Error on proc 0: Out of range atoms - cannot compute PPPM

Dear Lammpser,

I am permanently facing with this error. please let me know you can help me or not. Actually, I am sure about lattice and pair_style commands as I selected their parameters from text books.

dimension 3
units real
atom_style charge
boundary p p p

#simulation box
region box block 0 10 0 10 0 10 units lattice
create_box 2 box

lattice custom 1 a1 3.786 0.00000 0.00000 a2 0.0000 3.786 0.00000 a3 1.8925 1.8925 4.7570 &
basis 0.1250 0.8750 0.7500 &
basis 0.1250 0.1250 0.2500 &
basis 0.0816 0.3316 0.8368 &
basis 0.9184 0.6684 0.1632 &
basis 0.3316 0.0816 0.3368 &
basis 0.6684 0.9184 0.6632
mass 1 47.86
mass 2 16.00

#cube
region substrate block 0 37.86 0 37.86 0 47.570 units lattice
create_atoms 2 region substrate &
basis 1 1 &
basis 2 1 &
basis 3 2 &
basis 4 2 &
basis 5 2 &
basis 6 2
set type 1 charge 2.196
set type 2 charge -1.098
group substrate region substrate

#–Phase 2----------------------------------------Buckingham Potential-----------------------------------------------

Potential

pair_style buck/coul/long 10.0
pair_coeff 1 1 717647.40 0.154 121.067
pair_coeff 1 2 391049.10 0.194 290.331
pair_coeff 2 2 271716.30 0.234 696.888

kspace_style pppm 0.0001

timestep 5

velocity all create 300 12345 mom yes rot no
fix 1 all nvt temp 300.0 300.0 0.01

thermo 100

thermo_style custom step temp

dump 1 all image 500 image..png type type adiam 1.0 axes yes 0.8 0.02 zoom 1.5 view 80 -30
dump_modify 1 backcolor white boxcolor white acolor 1
2 blue/red/orange/green/cyan/aqua/yellow/red
run 10000
unfix 1

Best regards,

Dear Lammpser,

I am permanently facing with this error. please let me know you can help
me or not.

​this is an error, where you should do some research on your own first.
this has been reported many times (and almost always is an input error).
please have the courtesy and do a proper search through the lammps
documentation and the mailing list archives before posting inquiries like
this one.​ it will help to improve your understanding and self-reliance and
it will make it more likely that you get helpful responses in the future,
since people don't like to have to repeat the same stuff over and over
again.

thanks for your understanding,
      axel.

Dear Lammpser,

I am permanently facing with this error. please let me know you can help
me or not. Actually, I am sure about lattice and pair_style commands as I
selected their parameters from text books.

​i just ran your input and - as expected - there are lots of issues, that
can be easily detected by carefully examining the output and applying
elementary testing/debugging steps. please find comments inline.

dimension 3
units real
atom_style charge
boundary p p p

#simulation box
region box block 0 10 0 10 0 10 units lattice

​so this​ will use the default lattice (simple cubic with 1.0 1.0 1.0
spacing, i.e. it will create a 10x10x10 \AA box. not likely want you want).

create_box 2 box

​and now create a periodic box for that.​

lattice custom 1 a1 3.786 0.00000 0.00000 a2 0.0000 3.786 0.00000
a3 1.8925 1.8925 4.7570 &
basis 0.1250 0.8750 0.7500 &
basis 0.1250 0.1250 0.2500 &
basis 0.0816 0.3316 0.8368 &
basis 0.9184 0.6684 0.1632 &
basis 0.3316 0.0816 0.3368 &
basis 0.6684 0.9184 0.6632
mass 1 47.86
mass 2 16.00

​lattice spacing will be 3.786 3.786 4.7570​
​​

#cube
region substrate block 0 37.86 0 37.86 0 47.570 units lattice

​this now creates a region using the lattice spacing from above while you
obviously don't want that as the resulting region should have dimensions
that - by far - exceed the size of the box (even with units box).

create_atoms 2 region substrate &
basis 1 1 &
basis 2 1 &
basis 3 2 &
basis 4 2 &
basis 5 2 &
basis 6 2
set type 1 charge 2.196
set type 2 charge -1.098
group substrate region substrate

#--Phase 2----------------------------------------Buckingham
Potential-----------------------------------------------
# Potential

pair_style buck/coul/long 10.0
pair_coeff 1 1 717647.40 0.154 121.067
pair_coeff 1 2 391049.10 0.194 290.331
pair_coeff 2 2 271716.30 0.234 696.888

kspace_style pppm 0.0001

timestep 5

​this looks like a rather aggressive choice of time step for this kind of
system. specifically if you are having problems, it is usually a good idea
to reduce it.

if you want to confirm, that you have create a proper geometry it is always
a good idea to write out a data or dump file at this point and a) visualize
them and check for correctness, especially with periodicity added and b)
manually check a few coordinates for correctness.

next step should be to run a minimization. if your geometry is good, then
there should not be significant changes. however, your system changes
*massively* and starts with a gigantic positive pressure that turns into a
gigantic negative pressure after minimization. that is a strong indication
that something is seriously wrong here.
you should also see that your system is not neutral. that doesn't make
sense for entering a crystal structure. it *should* be neutral.

velocity all create 300 12345 mom yes rot no
fix 1 all nvt temp 300.0 300.0 0.01

thermo 100

thermo_style custom step temp

​turning off useful diagonostics like energies and pressure is a bad idea.
you are essentially running your simulation "blind". ignoring bad news does
not make it go away.​

dump 1 all image 500 image.*.png type type adiam 1.0 axes yes 0.8 0.02
zoom 1.5 view 80 -30
dump_modify 1 backcolor white boxcolor white acolor 1*2
blue/red/orange/green/cyan/aqua/yellow/red
run 10000

​at this point having the pppm error is inevitable. the GI-GO​ principle
applies. unless you feed LAMMPS meaningful input, it will not be able to
compute meaningful results.

all of the above should be standard protocol when setting up a new system.
claiming, that you took data from a textbook is no proof that you are
setting up your system correctly. as shown above, there are many obvious
issues. you need to improve your skills of how to confirm that commands are
actually producing the correct effect.

axel.

Dear Lammps Users,

Although I have corrected my input file, I am permanently facing with this error. Unfortunately atomic basis in the lattice command was incorrect which has been corrected in this file. in addition, I corrected positive advices provided by Axel as well. However, I am still facing with this error:

Error on proc 0 : out of range atoms- cannot compute PPPM.

You can find the modified file as below. I am thinking there is something wrong with the neighbor and neigh-modify commands. please let me know your opinion as well.

dimension 3

units real
atom_style charge
boundary p p p

#simulation box
region box block 0 15.144 0 15.144 0 38.056 units box #4tims size of a unitcell(just for test)
create_box 2 box #2 is number of atomss

lattice custom 1 a1 3.786 0.00000 0.00000 a2 0.0000 3.786 0.00000 a3 0 0 9.514 &
basis 0.0000 0.0000 0.0000 &
basis 0.0000 0.5000 0.2500 &
basis 0.5000 0.5000 0.5000 &
basis 0.5000 0.0000 0.7500 &
basis 0.0000 0.0000 0.2080 &
basis 0.0000 0.5000 0.4580 &
basis 0.5000 0.0000 0.5420 &
basis 0.5000 0.5000 0.2920 &
basis 0.5000 0.5000 0.7080 &
basis 0.5000 0.0000 0.9580 &
basis 0.0000 0.5000 0.0420 &
basis 0.0000 0.0000 0.7920

#cube
region substrate block 0 4 0 4 0 4 units lattice #4 unitcell(just for test)
create_atoms 1 region substrate &
basis 1 1 &
basis 2 1 &
basis 3 1 &
basis 4 1 &
basis 5 2 &
basis 6 2 &
basis 7 2 &
basis 8 2 &
basis 9 2 &
basis 10 2 &
basis 11 2 &
basis 12 2

mass 1 47.86
mass 2 15.99940
set type 1 charge 2.196
set type 2 charge -1.098

group substrate region substrate

#–Phase 2----------------------------------------Buckingham Potential--------------------------

pair_style buck/coul/long 15.0
pair_coeff 1 1 717647.40 0.154 121.067
pair_coeff 1 2 391049.10 0.194 290.331
pair_coeff 2 2 271716.30 0.234 696.888

neighbor 2.0 bin # skin distance for real units is by default 2.0
neigh_modify every 1 delay 0 check yes

kspace_style pppm 0.0001

#----Phase 3-------------------------------------Initial Equilibration at 300K ----------------------------------------

timestep 5.0 # default dt=1fs in Real units

velocity substrate create 300 12345 mom yes rot no
fix 1 substrate nvt temp 300.0 300.0 0.01

thermo 10

dump 1 all image 500 image..png type type adiam 1.0 axes yes 0.8 0.02 zoom 1.5 view 80 -30
dump_modify 1 backcolor white boxcolor white acolor 1
2 blue/red/orange/green/cyan/aqua/yellow/red
run 10000
unfix 1

Actually, now, I am almost pretty sure that the atomic basis in lattice command are right as I checked them several times even by monitoring them.

Looking forward to hearing from you
Yours Sincerely,
Bahman Daneshian

Dear Lammps Users,

Although I have corrected my input file, I am permanently facing with this
error. Unfortunately atomic basis in the lattice command was incorrect
which has been corrected in this file. in addition, I corrected positive
advices provided by Axel as well. However, I am still facing with this
error:

Error on proc 0 : out of range atoms- cannot compute PPPM.

You can find the modified file as below. I am thinking there is something
wrong with the neighbor and neigh-modify commands. please let me know your
opinion as well.

​there is nothing wrong with your neighbor/neigh_modify commands.
have you tested, whether your simulation runs stable with a shorter time
step?
have you tested, whether your input runs a stable MD with just fix nve and
no thermostat?​

​axel.​

Dear Axel,

Thank you very much for your helpful advice regarding changing the fix command to NVE. Actually, it works correctly with fix NVE. However, the equilibrium temp is around 150K which I think can be attributed to the small size of this system.

with the best regards,
Bahman Daneshian

Dear Axel,

Thank you very much for your helpful advice regarding changing the fix
command to NVE. Actually, it works correctly with fix NVE.

​so what does this tell you about where the problem with your input could
be?​

However, the equilibrium temp is around 150K which I think can be
attributed to the small size of this system.

​i don't think so. the explanation for that is different. but it is a good
sign, as it indicates that your initial structure is very close to the
minimal, i.e. 0K geometry.

axel.​

​so what does this tell you about where the problem with your input could be?​

Actually, I remember that in NVT as well as NPT ensembles, damping factor value usually caused larger expansion and shrinkage in the atomic structure rather than NVE ensembles. Therefore, I guess the atomic larger fluctuations caused by thermostating may cause atoms to loose and consequently this Error.

​i don’t think so. the explanation for that is different. but it is a good sign, as it indicates that your initial structure is very close to the minimal, i.e. 0K geometry.

So, Maybe it is better to apply atomic basics with higher precision accuracy.

​so what does this tell you about where the problem with your input could
be?​

Actually, I remember that in NVT as well as NPT ensembles, damping factor
value usually caused larger expansion and shrinkage in the atomic structure
rather than NVE ensembles. Therefore, I guess the atomic larger
fluctuations caused by thermostating may cause atoms to loose and
consequently this Error.

​no. this makes no sense and has no foundation in physics. in fix nvt there
are no volume changes anyway.​ this is pure speculation and wrong.

​i don't think so. the explanation for that is different. but it is a good
sign, as it indicates that your initial structure is very close to the
minimal, i.e. 0K geometry.

So, Maybe it is better to apply atomic basics with higher precision
accuracy.

​that makes no sense, too.

axel.​

so what does this tell you about where the problem with your input could be?​

Dr. Axel, I found the problem. the problem was the Tdamp value. After detail studying the lammps doc, I found out that the typical Tdamp factor must be around 100 times of the selected time step. So, now the model works correctly at 300K by nvt system. thank you very much for your helpful advices.

Yours Sincerely,
Bahman