GCMC question

Dear LAMMPS users and developers,

I am trying to find out how to do GCMC using LAMMPS. I am using the lammps-28Jun14 version with
the most recent version of fix_gcmc.cpp which was obtained from GitHub.
My system is made of some carbon material and water molecules. I want to see the adsorption of CO2 molecules
in this system. My system consists of 10 atomtypes. So my data file contains 12 atomtypes because
CO2 molecule contributes 2 more atomtypes. In the data file the relavant part is as follows:

Masses

    1 12.0110 # C_2
    2 12.0110 # C_R
    3 12.0110 # C_3
    4 1.0080 # H_
    5 15.9994 # O_2
    6 15.9994 # O_R
    7 1.0080 # H___A
    8 15.9994 # O_3
    9 15.9994 # OW
   10 1.0080 # HW
   11 12.0110 # C of CO2
   12 15.9994 # O of CO2

In my input file the relavant part is folows:

molecule 9999 co2.txt
group co2 molecule 9999

fix 2 all nvt temp 298.0 298.0 100.0
fix 3 co2 gcmc 1 10 10 10 123456 298.0 -0.5 0.1 mol 9999 maxangle 180 pressure 0.15

In my file 'co2.txt' the atom types for CO2 are given as follows:

Types

   1 1
   2 2
   3 2

In my input file I set the 'type' = 10 for fix_gcmc so that the atom type (1 and 2) in 'co2.txt' can be converted to 11 and 12, respectively.
Are these correct way to do a GCMC simulation? What I found strange is that, when I insert 'printf' in the function Molecule::compute_mass(),
I found that the masses of the three atoms of CO2 are all 12.0110.
(I am attaching my files.)

Sincerely,
Kijeong Kwac

in.gcmc (2.78 KB)

gcmc.data (951 KB)

co2.txt (418 Bytes)

Dear LAMMPS users and developers,

I am trying to find out how to do GCMC using LAMMPS. I am using the lammps-28Jun14 version with
the most recent version of fix_gcmc.cpp which was obtained from GitHub.

it is generally not considered a good practice to mix and match files
from different versions. while the developers usually make an effort
to retain compatibility of LAMMPS input scripts and file formats
unless there are very good reasons for a change, this is less true for
internal programming interfaces and particularly their semantics.

My system is made of some carbon material and water molecules. I want to see the adsorption of CO2 molecules
in this system. My system consists of 10 atomtypes. So my data file contains 12 atomtypes because
CO2 molecule contributes 2 more atomtypes. In the data file the relavant part is as follows:

Masses

    1 12.0110 # C_2
    2 12.0110 # C_R
    3 12.0110 # C_3
    4 1.0080 # H_
    5 15.9994 # O_2
    6 15.9994 # O_R
    7 1.0080 # H___A
    8 15.9994 # O_3
    9 15.9994 # OW
   10 1.0080 # HW
   11 12.0110 # C of CO2
   12 15.9994 # O of CO2

In my input file the relavant part is folows:

molecule 9999 co2.txt
group co2 molecule 9999

fix 2 all nvt temp 298.0 298.0 100.0
fix 3 co2 gcmc 1 10 10 10 123456 298.0 -0.5 0.1 mol 9999 maxangle 180 pressure 0.15

In my file 'co2.txt' the atom types for CO2 are given as follows:

Types

   1 1
   2 2
   3 2

In my input file I set the 'type' = 10 for fix_gcmc so that the atom type (1 and 2) in 'co2.txt' can be converted to 11 and 12, respectively.

please re-read the "IMPORTANT NOTE"s in the documentation of the
molecule command. the atom types used in the molecule file refer to
globally defined atom types (same for bond types etc.). so using atom
types 11 and 12 and an offset of 0 in the fix gcmc command would be
more adequate.

Are these correct way to do a GCMC simulation? What I found strange is that, when I insert 'printf' in the function Molecule::compute_mass(),
I found that the masses of the three atoms of CO2 are all 12.0110.

yes, because that is what you have defined. LAMMPS follows very
literally what you ask for. as a rule, computer programs don't have
"common sense" or understand people's intentions. :wink:

(I am attaching my files.)

thanks. it is much appreciated that they are set up for quick testing
(even though it wasn't necessary in this case). i wish more people
would make that effort, it makes looking into issues so much easier.

axel.

Paul may want to comment on your GCMC Qs.

Steve

Try using types 11 and 12 in your molecule file for C and O, and 0 for the type in your fix GCMC command. Then your printf output should be what you expect.

Paul