I am currently encountering an issue when simulating nitrogen (N₂) molecules inside a flexible MOF using LAMMPS.
The error message I receive is: ERROR on proc 0: Bond atoms 4897 4898 missing on proc 0 at step 1 (src/ntopo_bond_all.cpp:61)
Interestingly, when I apply the same setup (same MOF structure and simulation conditions) to CO₂ molecules, the simulation runs normally without errors. Therefore, I suspect the issue may be related to the N₂ configuration.
I have already tried the following approaches:
- Changing the initial configuration of N₂ molecules.
- Adjusting the neighbor settings (increasing skin distance).
- Disabling the minimization step before dynamics.
However, none of these attempts resolved the issue.
Could you please provide advice or suggestions on what might be causing this problem and how I could fix it?
Thank you very much for your help!
input:
variable RandomSeed equal 720
variable Ndump equal 2000
variable Temp equal 308.0
variable Tdamp equal 100.0
----Initialization----
atom_style full
units real
dimension 3
boundary p p p
box tilt large
----Potential----
pair_style lj/cut/coul/long 12.0
pair_modify shift yes mix arithmetic
bond_style harmonic
angle_style hybrid cosine/periodic harmonic
dihedral_style harmonic
improper_style fourier
dielectric 1.0
special_bonds lj/coul 0.0 0.0 1.0
#flexiblemof
read_data NiMOF.data extra/atom/types 2 extra/bond/types 1 extra/angle/types 1
#N2
read_data N4.data add append offset 4 7 12 3 1 shift 0 0 0 #atom,bond,angle,dihedral,improper
kspace_style pppm 1.0e-6
----------------- Settings Section -----------------
#5 N_N2
#6 X_N2
pair_coeff 5 5 0.0715 3.310
pair_coeff 6 6 0 0
bond_coeff 8 100 0.55 #²Ä¤@Óµ¹«Ü¤j the second is the bond length
angle_coeff 1 cosine/periodic 132.627486 1 4 # O_2 Ni4+2 O_2
angle_coeff 2 cosine/periodic 82.500443 -1 3 # Ni4+2 O_2 C_R
angle_coeff 3 cosine/periodic 40.148109 -1 3 # Ni4+2 O_2 H_
angle_coeff 4 cosine/periodic 68.268875 -1 3 # C_R O_2 H_
angle_coeff 5 cosine/periodic 87.183054 -1 3 # Ni4+2 O_2 C_R
angle_coeff 6 cosine/periodic 67.154061 -1 3 # Ni4+2 O_2 Ni4+2
angle_coeff 7 cosine/periodic 139.329016 -1 3 # O_2 C_R C_R
angle_coeff 8 cosine/periodic 111.297508 -1 3 # C_R C_R C_R
angle_coeff 9 cosine/periodic 57.289016 -1 3 # C_R C_R H_
angle_coeff 10 cosine/periodic 102.183280 -1 3 # C_R C_R C_R
angle_coeff 11 cosine/periodic 206.778426 -1 3 # O_2 C_R O_2
angle_coeff 12 cosine/periodic 137.714246 -1 3 # O_2 C_R C_R
angle_coeff 13 harmonic 1000 180.0
#group MOF id 1:4896
group MOF type 1 2 3 4
group N2 type 5 6
neighbor 6.0 bin
neigh_modify every 1 delay 0 check yes
timestep 0.25
------------- Setup ----------------
compute myTemp all temp
thermo_style custom step etotal pe ke evdwl ecoul epair ebond eangle edihed eimp elong etail temp
thermo_modify flush yes temp myTemp #print¥X mytemp
thermo 500
#----------------- Minimize Section -----------------
dump whole_minimization all xyz 1000 minimization.xyz # Dump every 1000 steps
dump_modify whole_minimization sort id # Sort atoms by ID for better visualization
min_style cg
minimize 1.0e-4 1.0e-6 10000 100000
minimize 1.0e-6 1.0e-8 10000 100000
undump whole_minimization
----------------- Run Section -----------------
velocity all create {Temp} {RandomSeed} dist gaussian
run 0
velocity all scale ${Temp}
– run at constant volume (Nose-Hoover) –
fix 10 all nvt temp 308.0 308.0 100.0
dump dump_adsorbate N2 custom 1 N2_1.xyz id mol type x y z ix iy iz xs ys zs xu yu zu
dump_modify dump_adsorbate element Ni O C H N_N2 X_N2 sort id
dump dump_mof MOF custom 1 NiMOF_1.xyz id mol type x y z
dump_modify dump_mof element Ni O C H N_N2 X_N2 sort id
run 10 (for testing)
#run 100000000
print “nvt end”