Hello Lammps,
I want to exchange the position of 2 particles of different types at each step and calculate the energy.
Here the resume of some part of my code.
atom_modify map array sort 0 0.0
# Simulation variables
....
#
units metal
atom_style atomic
read_data glass_2400.dat
# Interatomic potential information.
neighbor 4.0 bin
neigh_modify every 1 check no
#############
variable xi equal x[v_i]
variable yi equal y[v_i]
variable zi equal z[v_i]
variable xj equal x[v_j]
variable yj equal y[v_j]
variable zj equal z[v_j]
variable ii loop 1 1000000
label defloop
print "##### LOOP STEP ${ii}"
variable i equal ${irandom}
variable j equal ${irandom}
variable x0 equal ${xi}
variable y0 equal ${yi}
variable z0 equal ${zi}
set atom $i x ${xj}
set atom $i y ${yj}
set atom $i z ${zj}
set atom $j x ${x0}
set atom $j y ${y0}
set atom $j z ${z0}
run 1
if a criterion is not satisfied i put back the particle
"set atom $j x ${xi}" &
"set atom $j y ${yi}" &
"set atom $j z ${zi}" &
"set atom $i x ${x0}" &
"set atom $i y ${y0}" &
"set atom $i z ${z0}"
next ii
jump SELF defloop
label endloop
#####################################################
If i launch this code in 1,2,4,16 core is ok, for more than 16 i get this error:
Per MPI rank memory allocation (min/avg/max) = 324 | 324 | 324.1 Mbytes
Step Temp PotEng Fmax Press v_e v_elast
ERROR: Lost atoms: original 1000 current 998 (../thermo.cpp:435)
Last command: run 1
which i believe is a communication error. I am calculating the energy at each exchange of position and also the neighbor list. Do you have any idea of what is going on and how to check the correctness of the code?
Thank you very much for your help, kind regards