Hello,
I’m trying to simulate a MOF + CO2 system using gcmc. For the co2 molecules im using the fix rigid/nvt/small. The problem is that when a molecule is inserted in the system (sometimes in the thermo output the number of accepted mc insertions is still zero), I get errors such as “Out of range atoms - cannot compute PPPM”. I understand this could be because the molecules are inserted too close to the MOF structure and the forces/energies are too high.
I tried using overlap_cutoff, but I get the warning:
Energy of old configuration in fix gcmc is > MAXENERGYTEST
if the cutoff is too big (more than 2 angstroms), and it just makes the co2 amount drop (I guess it just rejects every insertion attempt). Otherwise, if smaller than that, it doesnt solve the problem.
Im using the 17 Apr 2024 version (I also tried with 2 Aug 2023 - Update 3). I tried with different MOF structures (with bigger pore size) and force fields (Dreiding and UFF, with parameters given by the lammps_interface software), using rigid/nve/small with Langevin thermostat, smaller timesteps and tfac values… neither worked.
Here is a small version of the input script, not using a fix on the mof (rigid structure). In this particular case, two molecules are added to the system (the first one is a good example of why the system can be breaking, it “pops out” when inserted, good to see in ovito) before it breaks. This is the best case I could get to, otherwise not a single molecule would be inserted.
###################### SYSTEM CREATION ######################
units real
atom_style full
boundary p p p
pair_style lj/cut/coul/long 12
bond_style harmonic
angle_style hybrid cosine/squared harmonic
dihedral_style charmm
improper_style umbrella
special_bonds dreiding
dielectric 1.0
box tilt large
read_data thermo.data
neigh_modify every 1 delay 0 check yes
kspace_style pppm 1e-6
pair_modify tail yes mix arithmetic
molecule co2_mol CO2.txt
###################### SIMULATION ######################
group co2 type 6 7
compute co2T co2 temp
compute_modify co2T dynamic/dof yes
dump dp1 co2 atom 100 dump.lammpstrj
dump dp2 all atom 100 all.lammpstrj
fix co2nvt co2 rigid/nvt/small molecule temp 293 293 100 mol co2_mol
fix_modify co2nvt temp co2T
fix co2gcmc co2 gcmc 200 5 0 0 5342 293 -5 0.5 mol co2_mol full_energy tfac_insert 1.6 group co2 rigid co2nvt overlap_cutoff 1.5
variable iacc equal f_co2gcmc[4]/(f_co2gcmc[3]+0.1)
variable dacc equal f_co2gcmc[6]/(f_co2gcmc[5]+0.1)
thermo_style custom step atoms c_co2T v_iacc v_dacc
thermo 200
timestep 0.1
run 100000
The files for CO2.txt and thermo.data are in my drive (sorry I cant upload files here yet).
Any suggestion on how to improve the input? I’m still learning how to use LAMMPS, so maybe I’m missing something. Thanks a lot.
PS: This problem disappears when I use the regular nvt fix (flexible co2) and works perfectly fine, even without the overlap keyword, I don’t completely understand why. But I would like to use the rigid model if possible, that’s why im asking for advise here.
Also, sorry for opening the topic and closing, I thought I fixed it for a moment and I wanted to check.