GCMC with coulomb

Dear LAMMPS Users,

I am attempting to perform a simulation of bulk CO2 using fix gcmc. I am using the TRAPPE model for CO2 which has partial charges, leading me to use the “full_energy” option. However, when I run the simulation using anything except pair_style lj/cut or lj/cut/coul/cut, I get a warning about the kspace and the routine inserts zero molecules. Here are the settings that I am using:

units real
atom_style full
pair_style lj/cut/coul/long 14
pair_modify tail yes
bond_style harmonic
angle_style harmonic
kspace_style ewald 0.0001
pair_modify mix arithmetic
boundary p p p

fix 1 C gcmc 5 1000 1000 0 56221 300 0 0.01 mol CO2 pressure 100 fugacity_coeff 0.9 full_energy

The algorithm will work if I use pair_style lj/cut/coul/cut 14 14, but it continues to pack molecules to an unreal density, as if the energy is not being calculated each step for the insertion probability.

Has anyone else encountered this issue?

Thanks,

Evan L.

please _always_ mention the exact version of LAMMPS you are using and
make a test with the very latest patch level to make certain, that you
are not reporting something that has already been addressed.

thanks,
      axel.

There are issues when you have a charge neutral molecule with partial charges (co2 in the TRAPPE model) and use an atomic based cutoff. You can run into a situation where a partial number of atoms that make up one molecule interact with a partial number of atoms that make up another molecule, leading to erroneous energy values. To avoid this issue, you can use a molecular or group based cutoff. That is, all atoms of a molecular interact or none do. The other option is of course to use a kspace solver.

-CBL

The “warning about kspace” is probably routine, although since you did not bother to provide it, I can’t say for sure. Your other complaint, about the density being too high or too low, is impossible to diagnose, because there are approximately 42 different reasons why this might happen, ranging from incomplete equilibration to incorrectly specified potential parameters. If you are really interested in solving this problem, first equilibrate the gas phase at a couple of different pressures for some temperature. Compare to the literature values.

Thank you all for the helpful suggestions. I spent some time doing tests with different versions of LAMMPS and found that the kspace will work with the newest version using coul/long. The coul/cut pair style probably results in large densities due to the fact that it is neglecting long range forces from the coulomb energy or something. Thanks again,

Evan L.