GCMC_Lost_Atom_Error

Dear Lammps developers and users,

I am new to LAMMPS and have a basic question on GCMC fix. I wrote a simple LAMMPS code (attached here) to model the adsorption of carbon atoms on the surface of a metallic nanoparticle (e.g., a nickel nanoparticle here). GCMC has been widely used for studying vapor deposition (e.g., 10.1103/PhysRevLett.115.205502).

I need to insert and remove carbon atoms within a shell region around the surface of the nanoparticle. (Here, I defined a sphere with a specified inner and outer diameter).

However, when I activate the GCMC fix, I face an error (i.e., ERROR: Lost atoms: original 1289 current 218 (…/thermo.cpp:438)).

When I disable the “fix gcmc” command in the code, I don’t get any errors. To resolve the issue, I turned off the MC movement in the GCMC fix, and also changed the potential value (mu) as well as other parameters. Unfortunately, none of these steps resolved the problem, and I still face the error. I am using the version of lammps/20Nov2019 + MPI. I have attached the code and the potential I am using.

I checked the topics on “GCMC for atom adsorption instead of molecule one” but couldn’t find a similar issue posted by other users. I do appreciate it if someone tells me how to fix this issue.

Bests,

Hossein

LAMMPS Code:

variable T universe 500 600 #Temperature
variable R universe 1 2 #Run Step
variable D universe 3 3 #particle diameter nm
variable O universe 33 43 #outer shell in A
variable I universe 27 37 #inner shell in A
label my_loop
units metal
atom_style atomic
dimension 3
boundary p p p
lattice fcc 3.52
read_data Ni_NPs_dp$D_annealed.txt
mass 1 12.011 # C
mass 2 58.710 # Ni
group carbon_impurities type 1
group Ni_NPs_grp type 2
pair_style hybrid airebo 3 0 0 eam morse 4.0
pair_coeff * * airebo CH.airebo C NULL
pair_coeff 2 2 eam Ni_u3.eam
pair_coeff 1 2 morse 0.433 3.244 2.316 4
minimize 1e-8 1e-8 1000 100000
velocity all create 300 25489521 mom no rot no
fix fix_1_2 all nvt temp 300 300 50
fix fix_3_additiona5_3 Ni_NPs_grp recenter INIT INIT INIT units box
fix fix_3_additiona5_2 Ni_NPs_grp momentum 1 angular
neighbor 2 bin
neigh_modify every 10 delay 0 check no
thermo_style custom step time temp ke pe
thermo 2000
run 5000
#----------------------------------------------------------------------
unfix fix_1_2
fix fix_1_3 all nvt temp 300 $T 25
run 60000
#----------------------------------------------------------------------
unfix fix_1_3
fix fix_1_4 all nvt temp $T $T 25
run 60000
#----------------------------------------------------------------------
unfix fix_1_4
region spr_in_reg sphere 0 0 0 55 units box
region spr_out_reg sphere 0 0 0 95 units box
region shell_insert_del_reg intersect 2 spr_out_reg spr_in_reg
group shell_insert_del_grp region shell_insert_del_reg

fix fix_1_5 all nvt temp $T $T 50
fix my_gcmc_1 carbon_impurities gcmc 10 100 100 1 2949445 $T -5.5 0.1 group carbon_impurities

timestep 0.25
dump vdump_1 all custom 20000 ROOT_$R_MD_NiC_VD_dp_$D_$T_K_xyz id type x y z
run 100000
#----------------------------------------------------------------------
undump dump_1
unfix fix_1_5
unfix deposit_atoms_VD_MD1
unfix fix_3_additiona5_3
unfix fix_3_additiona5_2
unfix my_NVT_Ni
clear
next T R A D B U W
jump Deposition_in.lammps my_loop

Deposition_in.lammps (2.5 KB)
CH.airebo (904.9 KB)
Ni_u3.eam (35.6 KB)
Ni_NPs_dp3_annealed.txt (31.1 KB)

The most likely explanation for the error is that you are inserting too many atoms too quickly. With each MC move or insertion/deletion, you may add potential energy to the system that will have to be dissipated during subsequent MD steps or atoms will accumulate large forces which can lead to numerical instabilities of the time integration.

A possibly contributing issue, but not the main cause, are your too infrequent neighbor list updates. I would suggest to switch to a conservative setting of:

neigh_modify every 1 delay 0 check yes

Also, it may be worth updating to the latest version of LAMMPS which has bugs fixed and improvements included.

1 Like

For your smaller spherical region, region spr_in_reg you want to include the keyword side out. As you wrote it, the intersection of the two spheres is just the smaller sphere, which heavily intersects with the nanoparticle.

2 Likes