About gcmc

Dear lammps developers

I really appreciate you for the simple example of gcmc you gave me which greatly contribute to my understanding of gcmc. Now I want to simulation the sorption of Ar on graphite, and I wrote an input file but it didn’t operate for some errors. The following is my input files and the out, I hope you can help me address that. Looking forward for your reply . Thanks !

With regards !

Chi

Nanjing University, PRC.

in.Ar

units real
atom_style atomic
boundary p p p
read_data data.graphite

lattice none 0.1
region box block 0 200 0 200 0 200
create_box 1 box

mass 2 39
pair_style lj/cut 10.0
pair_coeff 1 1 0 0 10.0
pair_coeff 2 2 0.185 3.868 10.0
pair_coeff 1 2 0.1394 3.9095 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

dump 1 all custom 100 dump.kr.lammpstrj id type x y z
run 10000

data.graphite

Created on Nov 3 2014 by Mengjia & Chi- graphite

128 atoms
0 bonds
0 angles
0 dihedrals
0 impropers

2 atom types
0 bond types
0 angle types
0 dihedral types
0 improper types

0.000000 20.000000 xlo xhi
0.000000 20.000000 ylo yhi
0.000000 20.000000 zlo zhi

Masses

1 12.0110 # C
2 39.0 # Ar

Pair Coeffs

Atoms

1 1 1 0 0.000 0.709 0 0 0 0
2 1 1 0 1.228 2.836 0 0 0 0
3 1 1 0 0.000 3.545 0 0 0 0
4 1 1 0 1.228 1.418 0 0 0 0
5 1 1 0 2.456 0.709 0 0 0 0
6 1 1 0 3.684 2.836 0 0 0 0
7 1 1 0 2.456 3.545 0 0 0 0
8 1 1 0 3.684 1.418 0 0 0 0
9 1 1 0 4.912 0.709 0 0 0 0
10 1 1 0 6.140 2.836 0 0 0 0
11 1 1 0 4.912 3.545 0 0 0 0
12 1 1 0 6.140 1.418 0 0 0 0
13 1 1 0 7.368 0.709 0 0 0 0
14 1 1 0 8.596 2.836 0 0 0 0
15 1 1 0 7.368 3.545 0 0 0 0
16 1 1 0 8.596 1.418 0 0 0 0
17 1 1 0 9.824 0.709 0 0 0 0
18 1 1 0 11.052 2.836 0 0 0 0
19 1 1 0 9.824 3.545 0 0 0 0
20 1 1 0 11.052 1.418 0 0 0 0
21 1 1 0 12.280 0.709 0 0 0 0
22 1 1 0 13.508 2.836 0 0 0 0
23 1 1 0 12.280 3.545 0 0 0 0
24 1 1 0 13.508 1.418 0 0 0 0
25 1 1 0 14.736 0.709 0 0 0 0
26 1 1 0 15.964 2.836 0 0 0 0
27 1 1 0 14.736 3.545 0 0 0 0
28 1 1 0 15.964 1.418 0 0 0 0
29 1 1 0 17.192 0.709 0 0 0 0
30 1 1 0 18.420 2.836 0 0 0 0
31 1 1 0 17.192 3.545 0 0 0 0
32 1 1 0 18.420 1.418 0 0 0 0
33 1 1 0 0.000 4.963 0 0 0 0
34 1 1 0 1.228 7.090 0 0 0 0
35 1 1 0 0.000 7.799 0 0 0 0
36 1 1 0 1.228 5.672 0 0 0 0
37 1 1 0 2.456 4.963 0 0 0 0
38 1 1 0 3.684 7.090 0 0 0 0
39 1 1 0 2.456 7.799 0 0 0 0
40 1 1 0 3.684 5.672 0 0 0 0
41 1 1 0 4.912 4.963 0 0 0 0
42 1 1 0 6.140 7.090 0 0 0 0
43 1 1 0 4.912 7.799 0 0 0 0
44 1 1 0 6.140 5.672 0 0 0 0
45 1 1 0 7.368 4.963 0 0 0 0
46 1 1 0 8.596 7.090 0 0 0 0
47 1 1 0 7.368 7.799 0 0 0 0
48 1 1 0 8.596 5.672 0 0 0 0
49 1 1 0 9.824 4.963 0 0 0 0
50 1 1 0 11.052 7.090 0 0 0 0
51 1 1 0 9.824 7.799 0 0 0 0
52 1 1 0 11.052 5.672 0 0 0 0
53 1 1 0 12.280 4.963 0 0 0 0
54 1 1 0 13.508 7.090 0 0 0 0
55 1 1 0 12.280 7.799 0 0 0 0
56 1 1 0 13.508 5.672 0 0 0 0
57 1 1 0 14.736 4.963 0 0 0 0
58 1 1 0 15.964 7.090 0 0 0 0
59 1 1 0 14.736 7.799 0 0 0 0
60 1 1 0 15.964 5.672 0 0 0 0
61 1 1 0 17.192 4.963 0 0 0 0
62 1 1 0 18.420 7.090 0 0 0 0
63 1 1 0 17.192 7.799 0 0 0 0
64 1 1 0 18.420 5.672 0 0 0 0
65 1 1 0 0.000 9.217 0 0 0 0
66 1 1 0 1.228 11.344 0 0 0 0
67 1 1 0 0.000 12.053 0 0 0 0
68 1 1 0 1.228 9.926 0 0 0 0
69 1 1 0 2.456 9.217 0 0 0 0
70 1 1 0 3.684 11.344 0 0 0 0
71 1 1 0 2.456 12.053 0 0 0 0
72 1 1 0 3.684 9.926 0 0 0 0
73 1 1 0 4.912 9.217 0 0 0 0
74 1 1 0 6.140 11.344 0 0 0 0
75 1 1 0 4.912 12.053 0 0 0 0
76 1 1 0 6.140 9.926 0 0 0 0
77 1 1 0 7.368 9.217 0 0 0 0
78 1 1 0 8.596 11.344 0 0 0 0
79 1 1 0 7.368 12.053 0 0 0 0
80 1 1 0 8.596 9.926 0 0 0 0
81 1 1 0 9.824 9.217 0 0 0 0
82 1 1 0 11.052 11.344 0 0 0 0
83 1 1 0 9.824 12.053 0 0 0 0
84 1 1 0 11.052 9.926 0 0 0 0
85 1 1 0 12.280 9.217 0 0 0 0
86 1 1 0 13.508 11.344 0 0 0 0
87 1 1 0 12.280 12.053 0 0 0 0
88 1 1 0 13.508 9.926 0 0 0 0
89 1 1 0 14.736 9.217 0 0 0 0
90 1 1 0 15.964 11.344 0 0 0 0
91 1 1 0 14.736 12.053 0 0 0 0
92 1 1 0 15.964 9.926 0 0 0 0
93 1 1 0 17.192 9.217 0 0 0 0
94 1 1 0 18.420 11.344 0 0 0 0
95 1 1 0 17.192 12.053 0 0 0 0
96 1 1 0 18.420 9.926 0 0 0 0
97 1 1 0 0.000 13.471 0 0 0 0
98 1 1 0 1.228 15.598 0 0 0 0
99 1 1 0 0.000 16.307 0 0 0 0
100 1 1 0 1.228 14.180 0 0 0 0
101 1 1 0 2.456 13.471 0 0 0 0
102 1 1 0 3.684 15.598 0 0 0 0
103 1 1 0 2.456 16.307 0 0 0 0
104 1 1 0 3.684 14.180 0 0 0 0
105 1 1 0 4.912 13.471 0 0 0 0
106 1 1 0 6.140 15.598 0 0 0 0
107 1 1 0 4.912 16.307 0 0 0 0
108 1 1 0 6.140 14.180 0 0 0 0
109 1 1 0 7.368 13.471 0 0 0 0
110 1 1 0 8.596 15.598 0 0 0 0
111 1 1 0 7.368 16.307 0 0 0 0
112 1 1 0 8.596 14.180 0 0 0 0
113 1 1 0 9.824 13.471 0 0 0 0
114 1 1 0 11.052 15.598 0 0 0 0
115 1 1 0 9.824 16.307 0 0 0 0
116 1 1 0 11.052 14.180 0 0 0 0
117 1 1 0 12.280 13.471 0 0 0 0
118 1 1 0 13.508 15.598 0 0 0 0
119 1 1 0 12.280 16.307 0 0 0 0
120 1 1 0 13.508 14.180 0 0 0 0
121 1 1 0 14.736 13.471 0 0 0 0
122 1 1 0 15.964 15.598 0 0 0 0
123 1 1 0 14.736 16.307 0 0 0 0
124 1 1 0 15.964 14.180 0 0 0 0
125 1 1 0 17.192 13.471 0 0 0 0
126 1 1 0 18.420 15.598 0 0 0 0
127 1 1 0 17.192 16.307 0 0 0 0
128 1 1 0 18.420 14.180 0 0 0 0

log.lammps

LAMMPS (1 Feb 2014)
WARNING: OMP_NUM_THREADS environment is not set. (…/comm.cpp:100)
using 1 OpenMP thread(s) per MPI task
units real
atom_style atomic
boundary p p p
read_data data.graphite
orthogonal box = (0 0 0) to (20 20 20)
1 by 1 by 1 MPI processor grid
reading atoms …
ERROR: Incorrect atom format in data file (…/atom.cpp:655)

out

LAMMPS (1 Feb 2014)
WARNING: OMP_NUM_THREADS environment is not set. (…/comm.cpp:100)
using 1 OpenMP thread(s) per MPI task
Reading data file …
orthogonal box = (0 0 0) to (20 20 20)
1 by 1 by 1 MPI processor grid
reading atoms …
ERROR: Incorrect atom format in data file (…/atom.cpp:655)

Looks like this isn’t an issue with fix GCMC, but rather a problem with your data file. The error message you are getting tells you this:

ERROR: Incorrect atom format in data file (…/atom.cpp:655)

Paul