# Ask for example of fix gcmc

Dear all,

I want to use the fix gcmc to calculate the adsorption of gas in a box or on a surface. Could anyone share an example of fix gcmc for the latest version of Lammps ?

Thanks a lot

best wishes,
Jinhong

Dear all,

I want to use the fix gcmc to calculate the adsorption of gas in a box or on
a surface. Could anyone share an example of fix gcmc for the latest version
of Lammps ?

what is wrong with the examples given in the documentation?
http://lammps.sandia.gov/doc/fix_gcmc.html

Here’s a simple example that uses fix gcmc and works with the current version of LAMMPS. See below.

Paul

units real

atom_style atomic

boundary p p p

lattice fcc 0.1

region box block 0 1000 0 1000 0 1000

create_box 1 box

mass 1 83.80

pair_style lj/cut 10.0

pair_coeff 1 1 0.337824 3.69 10.0

thermo 100

compute_modify thermo_temp dynamic yes

variable chempot equal -2000

variable density equal atoms/vol

variable specdensity equal v_density1.39156E-251e27

variable chempotkcal equal \${chempot}/503.219

fix 2 all gcmc 1 100 100 1 29494 300.0 \${chempotkcal} 0.5

thermo_style custom step atoms f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] temp pe ke etotal press vol v_chempot v_specdensity

run 100000

Here’s a simple example that uses fix gcmc and works with the current version of LAMMPS. See below.

Paul

units real

atom_style atomic

boundary p p p

lattice fcc 0.1

region box block 0 1000 0 1000 0 1000

create_box 1 box

mass 1 83.80

pair_style lj/cut 10.0

pair_coeff 1 1 0.337824 3.69 10.0

thermo 100

compute_modify thermo_temp dynamic yes

variable chempot equal -2000

variable density equal atoms/vol

variable specdensity equal v_density1.39156E-251e27

variable chempotkcal equal \${chempot}/503.219

fix 2 all gcmc 1 100 100 1 29494 300.0 \${chempotkcal} 0.5

thermo_style custom step atoms f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] f_2[6] temp pe ke etotal press vol v_chempot v_specdensity

run 100000

f_2[1] etc are optional and are for output diagnostic purposes only. Please see the documentation for their meaning and details.

I do have a zeolite example that I can send later on.

Paul

I’m attaching example input that uses fix gcmc on a zeolite system.

Paul

init.data (138 KB)

zif.in (557 Bytes)