LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Error on proc 0: Out of range atoms - cannot compute PPPM
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Error on proc 0: Out of range atoms - cannot compute PPPM


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Mon, 11 Dec 2017 08:01:07 -0500



On Mon, Dec 11, 2017 at 2:48 AM, bahman daneshian <bahmanpbamp@...24...> wrote:
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.​

 

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









 

Bahman Daneshian

On 29 November 2017 at 19:44, Axel Kohlmeyer <akohlmey@...24...> wrote:


On Wed, Nov 29, 2017 at 9:35 AM, bahman daneshian <bahmanpbamp@...24...> wrote:
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.


 
unfix 1

Best regards,

Bahman Daneshian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...655....net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.




--
Dr. Axel Kohlmeyer  akohlmey@...92......  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.