Hi Axel,
Thanks for your quick response,
I use the 29Oct2020 version lammps on a high performance computer (UF hipergator). I think it a linux platform.
I know it require a large amount of memory because the job was failed due to out of memory. The memory should be enough since I had many MD job with same number of atoms. I think it gradually increased, because if I required a larger amount of memory, the MC simulation could run longer. I required about ten times larger memory for the MC simulation than a MD simulation with same amount of atoms.
I just created an toy model. The memory I required is 200Mb and 300Mb. The job with 300Mb can run longer than the job with 200Mb(both of them would failed due to out of memory)
The input file is :
#Create log file
variable A string “0”
variable InputName string “in.mc.test”
log log.MC.test
print “With new displace_atoms.cpp” screen yes
#Units and boundary conditions
units lj
atom_style atomic
atom_modify map array sort 0 0.0
#Variables to build parameters
units lj
atom_style atomic
atom_modify map array sort 0 0.0
dimension 2
lattice hex 1
region box block 0 20 0 20 -0.5 0.5
create_box 5 box
create_atoms 5 box
mass 1 1.0
mass 2 1.1
mass 3 1.2
mass 4 1.3
mass 5 1.4
pair_style lj/cut 2.5
pair_coeff * * 1.0 1.0 2.5
pair_modify shift yes
neighbor 0.3 bin
neigh_modify delay 0 every 1 check yes
#Define output frequency and styles
thermo 1
thermo_style custom step temp epair etotal lx ly lz yz xz xy
#get original energy
run 0
variable ETotal equal “pe”
variable ETotal0 equal ${ETotal}
variable EChange equal “(etotal-v_ETotal0)”
#####Monte Carlo
##region to do monte carlo
fix ED all print 1 “${EChange}” append “EDelta.txt” screen “no”
#Randomly select swap atom type
variable random1 equal floor(random(1.0,5.9999999,52344625))
variable random2 equal floor(random(1.0,5.9999999,84646342))
variable RunMC loop 1 15000
label MC
label RandomType
variable r1 equal {random1}
variable r2 equal {random2}
if “{r1} >= {r2}” then &
"jump in.mc.test RandomType "
print “{r1}"
print "{r2}”
fix mc all atom/swap 1 100 141239 300 ke yes types {r1} {r2}
run 1
unfix mc
next RunMC
jump in.mc.test MC