Keyword "region" causes incorrect GCMC simulations.

Dear All.

I am using the Lammps (8 Aug 2014) Ubuntu version.

I have two single layer graphenes, with the size 5x5 nm2 and the distance between them in Z direction is 2 nm. First, I run the GCMC simulations for the adsorption of CO2 (single-site model) in between these two graphenes, using the periodic boundary condition for the x y directions, and fixing the walls in Z direction. In this case, the adsorbed amount of CO2 is correct. However, when I define a specific region, following:

region 1 block 15.0 35.0 10.0 40.0 0.0 20.0 units box

Then I add this region into the fix_gcmc command: (this is the only change in fix_gcmc line)

fix 5 CO2 gcmc 200 5000000 1000000 1 98734 300.0 -0.5 2.0 region 1 pressure 1.0 fugacity_coeff 1.0

It is found the adsorbed density of CO2 obtained in this specific region is much higher than that obtained for the whole slit space (without the keyword region).

I figured this may be a small bug in gcmc module. Below is my input file:

First test for DCV-GCMC simulations

units real

timestep 0.1

boundary p p f

neighbor 2.0 bin

neigh_modify every 10 check yes

atom_style atomic

#atom_modify sort 0 0

#bond_style none

#special_bonds lj/coul 0.0 0.0 0.0

pair_style lj/cut 15.0

read_data data.dcv-gra2

pair_coeff 1 1 0.47676 3.75

pair_coeff 2 2 0.0 0.0

pair_coeff 1 2 0.16284 3.575

#kspace_style ewald 1.0e-4

group CO2 type 1

#group CO2 molecule 1:45

#group CO2_d dynamic CO2

group CNT type 2

velocity CO2 create 300.0 9584

region 1 block 15 35 10 40 0.0 20 units box

#region 2 block 0 40 0 40 150 195 units box

group CO2_r1 dynamic CO2 region 1

variable numco2 equal count(CO2)

fix 4 CNT setforce 0.0 0.0 0.0

fix 5 CO2 gcmc 2000 5000000 1000000 1 98734 300.0 -0.5 2.0 region 1 pressure 1.0 fugacity_coeff 1.0

#fix 6 CO2 gcmc 2000 1000 1000 0 38234 300.0 -0.5 5.0 mol CO2_temp_low region 2 pressure 1.0 fugacity_coeff 1.0

fix 7 CO2 nvt temp 300 300 5

#fix 1 CO2 rigid/nvt molecule temp 300 300 10

thermo 100

compute_modify thermo_temp dynamic yes # the number of CO2 in the system will fluctuate

compute thermo_temp_1 CO2 temp

thermo_style custom step c_thermo_temp_1 v_numco2

thermo_modify lost/bond ignore lost ignore

dump 1 all xyz 50000 Trajectory.xyz

dump 2 all image 10000 dump.*.jpg type type

run 10

undump 1

dump 1 all xyz 100 Trajectory2.xyz

run 100

Paul can look into this.

Steve

While it is possible that there is an issue with the region option of the fix GCMC command, it is also possible that there is an issue with your test problem or analysis of your results. In order to help you track it down, I would need you to send me more details about the test problem you’re using to do your code verification exercise, and your “data.dcv-gra2” data file as well.

Please make sure you understand the details about how fix GCMC’s region keyword works (see the fix GCMC documentation: http://lammps.sandia.gov/doc/fix_gcmc.html ). Especially note that GCMC insertions must happen within the specified region, but subsequent GCMC translations or MD moves may move your CO2 molecules outside of the specified region.

Paul