Merge pull request #568 from akohlmey/fix_gcmc_parallel_workaround

Workaround for data corruption when using fix gcmc in parallel with shake or fix rigid
This commit is contained in:
sjplimp 2017-07-13 11:23:49 -06:00 committed by GitHub
commit e58bcd8b4a
12 changed files with 998 additions and 277 deletions

View File

@ -383,6 +383,9 @@ called. Reneighboring is required.
Can be run in parallel, but aspects of the GCMC part will not scale
well in parallel. Only usable for 3D simulations.
When using fix gcmc in combination with fix shake or fix rigid,
only gcmc exchange moves are supported.
Note that very lengthy simulations involving insertions/deletions of
billions of gas molecules may run out of atom or molecule IDs and
trigger an error, so it is better to run multiple shorter-duration

62
examples/gcmc/H2O.txt Normal file
View File

@ -0,0 +1,62 @@
# CO2 molecule file. TraPPE model.
3 atoms
2 bonds
1 angles
Coords
1 1.12456 0.09298 1.27452
2 1.53683 0.75606 1.89928
3 0.49482 0.56390 0.65678
Types
1 1
2 2
3 2
Charges
1 -0.8472
2 0.4236
3 0.4236
Bonds
1 1 1 2
2 1 1 3
Angles
1 1 2 1 3
Shake Flags
1 1
2 1
3 1
Shake Atoms
1 1 2 3
2 1 2 3
3 1 2 3
Shake Bond Types
1 1 1 1
2 1 1 1
3 1 1 1
Special Bond Counts
1 2 0 0
2 1 1 0
3 1 1 0
Special Bonds
1 2 3
2 1 3
3 1 2

View File

@ -64,7 +64,7 @@ fix_modify myrigidnvt dynamic/dof no
# gcmc
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
fix mygcmc all gcmc 100 100 100 0 54341 ${temp} ${mu} ${disp} mol &
fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol &
co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
# output

88
examples/gcmc/in.gcmc.h2o Normal file
View File

@ -0,0 +1,88 @@
# fix gcmc example with fix shake
# variables available on command line
variable mu index -8.1
variable disp index 0.5
variable temp index 338.0
variable lbox index 10.0
variable spacing index 5.0
# global model settings
units real
atom_style full
boundary p p p
pair_style lj/cut/coul/long 14
pair_modify mix arithmetic tail yes
kspace_style ewald 0.0001
bond_style harmonic
angle_style harmonic
# box, start molecules on simple cubic lattice
lattice sc ${spacing}
region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box
create_box 2 box &
bond/types 1 &
angle/types 1 &
extra/bond/per/atom 2 &
extra/angle/per/atom 1 &
extra/special/per/atom 2
# we can load multiple molecule templates, but don't have to use them all
molecule co2mol CO2.txt
molecule h2omol H2O.txt
create_atoms 0 box mol h2omol 464563 units box
# rigid SPC/E water model
pair_coeff 1 1 0.15535 3.166
pair_coeff * 2 0.0000 0.0000
bond_coeff 1 1000 1.0
angle_coeff 1 100 109.47
# masses
mass 1 15.9994
mass 2 1.0
# MD settings
group h2o type 1 2
neighbor 2.0 bin
neigh_modify every 1 delay 1 check yes
velocity all create ${temp} 54654
timestep 1.0
minimize 0.0 0.0 100 1000
reset_timestep 0
# rigid constraints with thermostat
fix mynvt all nvt temp ${temp} ${temp} 100
fix wshake all shake 0.0001 50 0 b 1 a 1 mol h2omol
# gcmc
run 1000
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol &
h2omol tfac_insert ${tfac} group h2o shake wshake
# output
variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
compute_modify thermo_temp dynamic/dof yes
thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc
thermo 1000
# run
run 20000

View File

@ -1,179 +0,0 @@
LAMMPS (17 Mar 2017)
# GCMC for CO2 molecular fluid, rigid/small/nvt dynamics
# Rigid CO2 TraPPE model
# [Potoff and J.I. Siepmann, Vapor-liquid equilibria of
# mixtures containing alkanes, carbon dioxide and
# nitrogen AIChE J., 47,1676-1682 (2001)].
# variables available on command line
variable mu index -8.1
variable disp index 0.5
variable temp index 338.0
variable lbox index 10.0
variable spacing index 5.0
# global model settings
units real
atom_style full
boundary p p p
pair_style lj/cut/coul/long 14
pair_modify mix arithmetic tail yes
kspace_style ewald 0.0001
bond_style harmonic
angle_style harmonic
# box, start molecules on simple cubic lattice
lattice sc ${spacing}
lattice sc 5.0
Lattice spacing in x,y,z = 5 5 5
region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box
region box block 0 10.0 0 ${lbox} 0 ${lbox} units box
region box block 0 10.0 0 10.0 0 ${lbox} units box
region box block 0 10.0 0 10.0 0 10.0 units box
create_box 2 box bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2
Created orthogonal box = (0 0 0) to (10 10 10)
1 by 2 by 2 MPI processor grid
molecule co2mol CO2.txt
Read molecule co2mol:
3 atoms with 2 types
2 bonds with 1 types
1 angles with 1 types
0 dihedrals with 0 types
0 impropers with 0 types
create_atoms 0 box mol co2mol 464563 units box
Created 24 atoms
# rigid CO2 TraPPE model
pair_coeff 1 1 0.053649 2.8
pair_coeff 2 2 0.156973 3.05
bond_coeff 1 0 1.16
angle_coeff 1 0 180
# masses
mass 1 12.0107
mass 2 15.9994
# MD settings
group co2 type 1 2
24 atoms in group co2
neighbor 2.0 bin
neigh_modify every 1 delay 10 check yes
velocity all create ${temp} 54654
velocity all create 338.0 54654
timestep 1.0
# rigid constraints with thermostat
fix myrigidnvt all rigid/nvt/small molecule temp ${temp} ${temp} 100 mol co2mol
fix myrigidnvt all rigid/nvt/small molecule temp 338.0 ${temp} 100 mol co2mol
fix myrigidnvt all rigid/nvt/small molecule temp 338.0 338.0 100 mol co2mol
8 rigid bodies with 24 atoms
1.16 = max distance from body owner to body atom
fix_modify myrigidnvt dynamic/dof no
# gcmc
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
fix mygcmc all gcmc 100 100 100 0 54341 ${temp} ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 100 0 54341 338.0 ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert 1.66666666666667 group co2 rigid myrigidnvt
# output
variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
compute_modify thermo_temp dynamic/dof yes
thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc
thermo 1000
# run
run 20000
Ewald initialization ...
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
G vector (1/distance) = 0.164636
estimated absolute RMS force accuracy = 0.0332064
estimated relative force accuracy = 0.0001
KSpace vectors: actual max1d max3d = 16 2 62
kxmax kymax kzmax = 2 2 2
WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:439)
0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc
0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc
WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (../neighbor.cpp:472)
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 16
ghost atom cutoff = 16
binsize = 8, bins = 2 2 2
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 15.4 | 15.4 | 15.4 Mbytes
Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc
0 386.52184 23582.465 -3.2433417 14.209828 0.5846359 24 0 0 0 0
WARNING: Using kspace solver on system with no charge (../kspace.cpp:289)
1000 760.80877 -39.270882 -3.5239626 12.851016 0.29231795 12 0.24161633 0.22984103 0.71087092 0.85283311
2000 308.0739 -255.061 -20.411926 14.386853 0.73079488 30 0.26075352 0.24898725 0.73128383 0.88590474
3000 432.34358 -1361.3278 -12.644057 15.894387 0.5846359 24 0.21121583 0.21051229 0.70036003 0.86735027
4000 631.524 -63.488785 -3.6517158 13.804656 0.36539744 15 0.22486443 0.22886173 0.72358173 0.87172606
5000 730.61244 -1029.284 -6.2144028 19.600352 0.43847693 18 0.23017182 0.22740779 0.72281887 0.87820845
6000 752.43412 503.4547 -3.7053679 16.447663 0.36539744 15 0.22943971 0.226183 0.71450085 0.87447436
7000 660.68448 828.51735 -10.592278 21.006666 0.51155641 21 0.24702096 0.24218506 0.71815602 0.8740222
8000 331.58822 -621.22187 -5.3705759 7.2482776 0.36539744 15 0.23211903 0.22906813 0.70281376 0.86269411
9000 413.91538 869.51669 -11.28701 15.216905 0.5846359 24 0.23246466 0.22923961 0.70832684 0.86244176
10000 242.20861 -808.23311 -5.4533937 5.2945044 0.36539744 15 0.22024676 0.22031775 0.70785097 0.85712561
11000 348.20046 -372.16895 -3.4663358 7.6114092 0.36539744 15 0.2252033 0.22688969 0.71513402 0.86123263
12000 251.99682 303.30092 -18.58289 11.768089 0.73079488 30 0.20916844 0.21068047 0.694787 0.84635875
13000 306.83592 -1582.0137 -20.810287 14.329041 0.73079488 30 0.19494837 0.196527 0.67554784 0.83056119
14000 476.57411 268.94927 -14.185859 19.888076 0.65771539 27 0.19779631 0.20016859 0.67957528 0.83375167
15000 267.03534 730.71183 -9.3348616 9.8171066 0.5846359 24 0.19468305 0.19814971 0.68032974 0.83810439
16000 639.83235 2190.3244 -9.6666503 26.701062 0.65771539 27 0.19520687 0.19848997 0.68514387 0.84100361
17000 2237.1203 -222.59057 -0.18248834 4.4456205 0.073079488 3 0.20412446 0.20757814 0.69175318 0.8434939
18000 754.44841 205.54694 -10.501943 27.736031 0.5846359 24 0.2129422 0.21508015 0.69665031 0.84758331
19000 1610.1148 1293.6003 -0.20849836 3.1996309 0.073079488 3 0.22061668 0.22356929 0.69949369 0.84851405
20000 231.61458 -39.696514 -4.6452226 5.0629266 0.36539744 15 0.21984893 0.22246517 0.69914635 0.85058457
Loop time of 21.1019 on 4 procs for 20000 steps with 15 atoms
Performance: 81.888 ns/day, 0.293 hours/ns, 947.781 timesteps/s
98.9% CPU use with 4 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.31897 | 0.41973 | 0.49748 | 10.1 | 1.99
Bond | 0.014808 | 0.015063 | 0.015289 | 0.2 | 0.07
Kspace | 0.3813 | 0.46228 | 0.56585 | 9.8 | 2.19
Neigh | 0.049173 | 0.050043 | 0.050868 | 0.3 | 0.24
Comm | 0.9755 | 0.99686 | 1.0205 | 1.9 | 4.72
Output | 0.0014546 | 0.0015051 | 0.0016098 | 0.2 | 0.01
Modify | 19.043 | 19.062 | 19.085 | 0.4 | 90.33
Other | | 0.09438 | | | 0.45
Nlocal: 3.75 ave 6 max 3 min
Histogram: 3 0 0 0 0 0 0 0 0 1
Nghost: 876.5 ave 937 max 818 min
Histogram: 1 1 0 0 0 0 0 0 1 1
Neighs: 490.5 ave 647 max 363 min
Histogram: 1 0 1 0 0 1 0 0 0 1
Total # of neighbors = 1962
Ave neighs/atom = 130.8
Ave special neighs/atom = 2
Neighbor list builds = 40070
Dangerous builds = 115
Total wall time: 0:00:21

View File

@ -1,4 +1,5 @@
LAMMPS (17 Mar 2017)
LAMMPS (6 Jul 2017)
using 1 OpenMP thread(s) per MPI task
# GCMC for CO2 molecular fluid, rigid/small/nvt dynamics
# Rigid CO2 TraPPE model
# [Potoff and J.I. Siepmann, Vapor-liquid equilibria of
@ -80,11 +81,11 @@ fix_modify myrigidnvt dynamic/dof no
# gcmc
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
fix mygcmc all gcmc 100 100 100 0 54341 ${temp} ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 100 0 54341 338.0 ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 100 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert 1.66666666666667 group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 0 0 54341 338.0 ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert 1.66666666666667 group co2 rigid myrigidnvt
# output
@ -106,7 +107,7 @@ WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
estimated relative force accuracy = 0.0001
KSpace vectors: actual max1d max3d = 16 2 62
kxmax kymax kzmax = 2 2 2
WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:439)
WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:445)
0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc
0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc
WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (../neighbor.cpp:472)
@ -122,56 +123,58 @@ Neighbor list info ...
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 15.61 | 15.61 | 15.61 Mbytes
Per MPI rank memory allocation (min/avg/max) = 15.62 | 15.62 | 15.62 Mbytes
Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc
0 364.27579 4238.8631 -9.6809388 13.391989 0.5846359 24 0 0 0 0
1000 311.39835 -327.93481 -8.6795381 9.9010062 0.51155641 21 0.13302848 0.12331626 0.6894397 0.90997852
WARNING: Using kspace solver on system with no charge (../kspace.cpp:289)
2000 905.66812 319.43347 -0.50350961 6.2991241 0.14615898 6 0.20952183 0.20430213 0.71797992 0.92626683
3000 275.57393 -719.89718 -26.534978 14.238181 0.80387436 33 0.21291069 0.20460696 0.72899202 0.9133259
4000 254.70771 -245.01902 -20.981537 13.160079 0.80387436 33 0.17245726 0.16974613 0.70145764 0.90542759
5000 96.073601 -517.98124 -34.019065 5.441166 0.87695385 36 0.14174575 0.13607057 0.6776754 0.90155771
6000 397.57265 148.92645 -7.2012893 10.665797 0.43847693 18 0.12299956 0.1202471 0.66165464 0.90274793
7000 455.4271 -347.44181 -5.9244703 12.217875 0.43847693 18 0.15182038 0.14791307 0.67904236 0.90560829
8000 301.03124 -627.45324 -13.251012 11.066909 0.5846359 24 0.16687346 0.16315516 0.6936719 0.91129375
9000 256.5747 -565.67983 -17.814128 11.981874 0.73079488 30 0.15458482 0.15131825 0.68966283 0.90993975
10000 443.60076 89.586912 -6.077863 11.900606 0.43847693 18 0.16092552 0.16020353 0.69882461 0.91422145
11000 436.43777 64.412921 -6.7128469 11.708443 0.43847693 18 0.17453966 0.17480683 0.70679243 0.91369445
12000 594.42207 849.07743 -3.3708621 10.040536 0.29231795 12 0.17461606 0.17568622 0.71175869 0.91333367
13000 426.85849 -1093.1334 -17.524618 17.813377 0.65771539 27 0.17742896 0.17792831 0.71363306 0.91450124
14000 317.75995 336.31107 -10.46774 11.681912 0.5846359 24 0.18331181 0.18427921 0.71715557 0.91652256
15000 272.65129 317.50536 -26.428336 14.087176 0.80387436 33 0.17449167 0.175957 0.71122398 0.91528038
16000 344.28567 -577.91079 -18.177927 16.077919 0.73079488 30 0.1661682 0.16781514 0.70485136 0.91508882
17000 134.55928 -193.5668 -30.297136 7.6208177 0.87695385 36 0.15965609 0.1605036 0.69658104 0.9140445
18000 231.87302 -446.07671 -14.875027 9.6763722 0.65771539 27 0.15270985 0.15351831 0.69002918 0.91372795
19000 328.6835 -280.22365 -20.001303 16.982214 0.80387436 33 0.15201017 0.15272181 0.69023195 0.91272534
20000 0 -20.39554 -0.14872889 -0 0 0 0.15600204 0.15750795 0.69503275 0.9138765
Loop time of 30.9008 on 1 procs for 20000 steps with 0 atoms
1000 420.43475 1722.4052 -9.6956123 15.456579 0.5846359 24 0.20879341 0.20713005 0 0
2000 302.29516 -547.83641 -22.017674 14.11699 0.73079488 30 0.1742478 0.1678018 0 0
3000 316.6934 -1080.2672 -8.2218891 10.069364 0.51155641 21 0.13544917 0.13720634 0 0
4000 246.81618 -679.83642 -14.577244 10.29997 0.65771539 27 0.1568939 0.15860229 0 0
5000 260.22849 -896.29914 -16.097593 10.859684 0.65771539 27 0.13138744 0.13547049 0 0
6000 291.70796 -1521.99 -22.303136 13.622574 0.73079488 30 0.12615476 0.12717694 0 0
7000 236.02638 -599.92186 -27.580831 13.367447 0.87695385 36 0.119703 0.12145398 0 0
8000 321.45341 688.10577 -10.09204 11.817696 0.5846359 24 0.10917411 0.11032646 0 0
9000 502.85382 -302.31056 -0.22330142 0.99927447 0.073079488 3 0.1254105 0.12905828 0 0
10000 249.98239 -510.0091 -32.815145 15.399767 0.95003334 39 0.1274504 0.12875623 0 0
11000 247.59424 -1129.0274 -25.320205 12.792544 0.80387436 33 0.11739076 0.11916784 0 0
12000 0 -20.39554 -0.14872889 -0 0 0 0.1254933 0.12920375 0 0
13000 1272.2738 -474.79484 -0.29450485 8.8489483 0.14615898 6 0.13767133 0.14112496 0 0
14000 516.54246 -36.296516 -5.0012009 11.291243 0.36539744 15 0.15632744 0.15955377 0 0
15000 307.09233 1951.9301 -14.820362 12.815375 0.65771539 27 0.15393544 0.15716192 0 0
16000 198.31989 -559.48443 -30.459487 11.231925 0.87695385 36 0.1482565 0.15025652 0 0
17000 246.99311 657.85683 -18.579206 11.53442 0.73079488 30 0.14143958 0.14375423 0 0
18000 467.13468 167.03738 -1.0945268 5.569759 0.21923846 9 0.13847359 0.14098533 0 0
19000 359.54027 -1413.5407 -12.156233 13.217895 0.5846359 24 0.15169146 0.15294205 0 0
20000 227.79597 -1204.5652 -23.24144 10.637925 0.73079488 30 0.14917199 0.15022946 0 0
Loop time of 20.153 on 1 procs for 20000 steps with 30 atoms
Performance: 55.921 ns/day, 0.429 hours/ns, 647.233 timesteps/s
99.8% CPU use with 1 MPI tasks x no OpenMP threads
Performance: 85.744 ns/day, 0.280 hours/ns, 992.408 timesteps/s
99.3% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 2.1985 | 2.1985 | 2.1985 | 0.0 | 7.11
Bond | 0.029596 | 0.029596 | 0.029596 | 0.0 | 0.10
Kspace | 0.23123 | 0.23123 | 0.23123 | 0.0 | 0.75
Neigh | 0.16141 | 0.16141 | 0.16141 | 0.0 | 0.52
Comm | 0.20628 | 0.20628 | 0.20628 | 0.0 | 0.67
Output | 0.00068831 | 0.00068831 | 0.00068831 | 0.0 | 0.00
Modify | 28.022 | 28.022 | 28.022 | 0.0 | 90.69
Other | | 0.05058 | | | 0.16
Pair | 2.5352 | 2.5352 | 2.5352 | 0.0 | 12.58
Bond | 0.026112 | 0.026112 | 0.026112 | 0.0 | 0.13
Kspace | 0.25 | 0.25 | 0.25 | 0.0 | 1.24
Neigh | 0.10364 | 0.10364 | 0.10364 | 0.0 | 0.51
Comm | 0.22907 | 0.22907 | 0.22907 | 0.0 | 1.14
Output | 0.0013065 | 0.0013065 | 0.0013065 | 0.0 | 0.01
Modify | 16.957 | 16.957 | 16.957 | 0.0 | 84.14
Other | | 0.05061 | | | 0.25
Nlocal: 0 ave 0 max 0 min
Nlocal: 30 ave 30 max 30 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 0 ave 0 max 0 min
Nghost: 2310 ave 2310 max 2310 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Neighs: 7736 ave 7736 max 7736 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Neighbor list builds = 40367
Dangerous builds = 118
Total # of neighbors = 7736
Ave neighs/atom = 257.867
Ave special neighs/atom = 2
Neighbor list builds = 20349
Dangerous builds = 0
Total wall time: 0:00:30
Total wall time: 0:00:20

View File

@ -0,0 +1,180 @@
LAMMPS (6 Jul 2017)
using 1 OpenMP thread(s) per MPI task
# GCMC for CO2 molecular fluid, rigid/small/nvt dynamics
# Rigid CO2 TraPPE model
# [Potoff and J.I. Siepmann, Vapor-liquid equilibria of
# mixtures containing alkanes, carbon dioxide and
# nitrogen AIChE J., 47,1676-1682 (2001)].
# variables available on command line
variable mu index -8.1
variable disp index 0.5
variable temp index 338.0
variable lbox index 10.0
variable spacing index 5.0
# global model settings
units real
atom_style full
boundary p p p
pair_style lj/cut/coul/long 14
pair_modify mix arithmetic tail yes
kspace_style ewald 0.0001
bond_style harmonic
angle_style harmonic
# box, start molecules on simple cubic lattice
lattice sc ${spacing}
lattice sc 5.0
Lattice spacing in x,y,z = 5 5 5
region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box
region box block 0 10.0 0 ${lbox} 0 ${lbox} units box
region box block 0 10.0 0 10.0 0 ${lbox} units box
region box block 0 10.0 0 10.0 0 10.0 units box
create_box 2 box bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2
Created orthogonal box = (0 0 0) to (10 10 10)
1 by 2 by 2 MPI processor grid
molecule co2mol CO2.txt
Read molecule co2mol:
3 atoms with 2 types
2 bonds with 1 types
1 angles with 1 types
0 dihedrals with 0 types
0 impropers with 0 types
create_atoms 0 box mol co2mol 464563 units box
Created 24 atoms
# rigid CO2 TraPPE model
pair_coeff 1 1 0.053649 2.8
pair_coeff 2 2 0.156973 3.05
bond_coeff 1 0 1.16
angle_coeff 1 0 180
# masses
mass 1 12.0107
mass 2 15.9994
# MD settings
group co2 type 1 2
24 atoms in group co2
neighbor 2.0 bin
neigh_modify every 1 delay 10 check yes
velocity all create ${temp} 54654
velocity all create 338.0 54654
timestep 1.0
# rigid constraints with thermostat
fix myrigidnvt all rigid/nvt/small molecule temp ${temp} ${temp} 100 mol co2mol
fix myrigidnvt all rigid/nvt/small molecule temp 338.0 ${temp} 100 mol co2mol
fix myrigidnvt all rigid/nvt/small molecule temp 338.0 338.0 100 mol co2mol
8 rigid bodies with 24 atoms
1.16 = max distance from body owner to body atom
fix_modify myrigidnvt dynamic/dof no
# gcmc
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 0 0 54341 338.0 ${mu} ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 ${disp} mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert ${tfac} group co2 rigid myrigidnvt
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol co2mol tfac_insert 1.66666666666667 group co2 rigid myrigidnvt
# output
variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
compute_modify thermo_temp dynamic/dof yes
thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc
thermo 1000
# run
run 20000
Ewald initialization ...
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
G vector (1/distance) = 0.164636
estimated absolute RMS force accuracy = 0.0332064
estimated relative force accuracy = 0.0001
KSpace vectors: actual max1d max3d = 16 2 62
kxmax kymax kzmax = 2 2 2
WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:445)
0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc
0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc
WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (../neighbor.cpp:472)
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 16
ghost atom cutoff = 16
binsize = 8, bins = 2 2 2
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 15.41 | 15.41 | 15.41 Mbytes
Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc
0 386.52184 23582.465 -3.2433417 14.209828 0.5846359 24 0 0 0 0
WARNING: Using kspace solver on system with no charge (../kspace.cpp:289)
1000 335.66829 -3.7743052 -4.6268612 7.3374649 0.36539744 15 0.20601899 0.20787963 0 0
2000 459.73529 238.91592 -0.42937831 5.4815343 0.21923846 9 0.30392058 0.30105616 0 0
3000 255.47773 -479.67802 -36.850434 15.738299 0.95003334 39 0.22220744 0.2197582 0 0
4000 182.70803 -1059.2262 -43.044833 12.163134 1.0231128 42 0.16781689 0.16716177 0 0
5000 234.00907 -1821.0444 -46.04795 15.578317 1.0231128 42 0.13498091 0.13704201 0 0
6000 163.42759 -774.67294 -49.686261 11.691518 1.0961923 45 0.11401677 0.11296973 0 0
7000 171.64616 -355.23516 -49.323434 12.27947 1.0961923 45 0.098302308 0.098552065 0 0
8000 251.29791 -905.47863 -37.841209 15.480807 0.95003334 39 0.086856972 0.08638658 0 0
9000 143.69498 -849.95393 -49.073188 10.279858 1.0961923 45 0.078261061 0.077955243 0 0
10000 239.35727 -1158.1879 -43.562047 15.934355 1.0231128 42 0.070789792 0.070807529 0 0
11000 169.51213 -1574.7885 -51.125228 12.126803 1.0961923 45 0.065008734 0.06498871 0 0
12000 181.39739 160.11631 -46.850937 12.977068 1.0961923 45 0.059648717 0.059514803 0 0
13000 164.14601 -1107.7629 -50.726722 11.742914 1.0961923 45 0.055207333 0.055097701 0 0
14000 287.26285 418.51463 -41.664766 19.123497 1.0231128 42 0.051346789 0.051222285 0 0
15000 256.94593 -532.36615 -41.651618 17.105257 1.0231128 42 0.047870301 0.047861685 0 0
16000 166.92132 151.15933 -39.957018 11.11219 1.0231128 42 0.045205599 0.045042211 0 0
17000 163.22452 -1299.8119 -42.677558 10.866089 1.0231128 42 0.043122086 0.042993687 0 0
18000 158.01154 475.77329 -48.803162 11.304057 1.0961923 45 0.041016683 0.040647229 0 0
19000 138.49297 -1585.1508 -47.517099 9.9077098 1.0961923 45 0.038929287 0.038436764 0 0
20000 173.84439 -1362.6301 -53.002743 12.436731 1.0961923 45 0.036973919 0.036523816 0 0
Loop time of 31.8386 on 4 procs for 20000 steps with 45 atoms
Performance: 54.274 ns/day, 0.442 hours/ns, 628.168 timesteps/s
98.5% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 1.1546 | 1.6687 | 2.1338 | 29.5 | 5.24
Bond | 0.019769 | 0.020369 | 0.02132 | 0.4 | 0.06
Kspace | 0.53392 | 0.99911 | 1.5116 | 37.8 | 3.14
Neigh | 0.06737 | 0.067842 | 0.068412 | 0.2 | 0.21
Comm | 1.9408 | 1.9582 | 1.9733 | 1.1 | 6.15
Output | 0.0019503 | 0.0020472 | 0.0022476 | 0.3 | 0.01
Modify | 26.974 | 26.99 | 27.001 | 0.2 | 84.77
Other | | 0.1322 | | | 0.42
Nlocal: 11.25 ave 14 max 8 min
Histogram: 1 0 0 0 0 1 1 0 0 1
Nghost: 2639.75 ave 2656 max 2617 min
Histogram: 1 0 0 0 0 0 2 0 0 1
Neighs: 4320 ave 5824 max 2201 min
Histogram: 1 0 0 0 0 0 1 1 0 1
Total # of neighbors = 17280
Ave neighs/atom = 384
Ave special neighs/atom = 2
Neighbor list builds = 20394
Dangerous builds = 0
Total wall time: 0:00:31

View File

@ -0,0 +1,281 @@
LAMMPS (6 Jul 2017)
using 1 OpenMP thread(s) per MPI task
# fix gcmc example with fix shake
# variables available on command line
variable mu index -8.1
variable disp index 0.5
variable temp index 338.0
variable lbox index 10.0
variable spacing index 5.0
# global model settings
units real
atom_style full
boundary p p p
pair_style lj/cut/coul/long 14
pair_modify mix arithmetic tail yes
kspace_style ewald 0.0001
bond_style harmonic
angle_style harmonic
# box, start molecules on simple cubic lattice
lattice sc ${spacing}
lattice sc 5.0
Lattice spacing in x,y,z = 5 5 5
region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box
region box block 0 10.0 0 ${lbox} 0 ${lbox} units box
region box block 0 10.0 0 10.0 0 ${lbox} units box
region box block 0 10.0 0 10.0 0 10.0 units box
create_box 2 box bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2
Created orthogonal box = (0 0 0) to (10 10 10)
1 by 1 by 1 MPI processor grid
# we can load multiple molecule templates, but don't have to use them all
molecule co2mol CO2.txt
Read molecule co2mol:
3 atoms with 2 types
2 bonds with 1 types
1 angles with 1 types
0 dihedrals with 0 types
0 impropers with 0 types
molecule h2omol H2O.txt
Read molecule h2omol:
3 atoms with 2 types
2 bonds with 1 types
1 angles with 1 types
0 dihedrals with 0 types
0 impropers with 0 types
create_atoms 0 box mol h2omol 464563 units box
Created 24 atoms
# rigid SPC/E water model
pair_coeff 1 1 0.15535 3.166
pair_coeff * 2 0.0000 0.0000
bond_coeff 1 1000 1.0
angle_coeff 1 100 109.47
# masses
mass 1 15.9994
mass 2 1.0
# MD settings
group h2o type 1 2
24 atoms in group h2o
neighbor 2.0 bin
neigh_modify every 1 delay 1 check yes
velocity all create ${temp} 54654
velocity all create 338.0 54654
timestep 1.0
minimize 0.0 0.0 100 1000
WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (../min.cpp:168)
Ewald initialization ...
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
G vector (1/distance) = 0.170448
estimated absolute RMS force accuracy = 0.0332064
estimated relative force accuracy = 0.0001
KSpace vectors: actual max1d max3d = 16 2 62
kxmax kymax kzmax = 2 2 2
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 16
ghost atom cutoff = 16
binsize = 8, bins = 2 2 2
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 11.88 | 11.88 | 11.88 Mbytes
Step Temp E_pair E_mol TotEng Press
0 338 -4.1890564 9.2628112e-06 18.98377 739.06991
100 338 -30.182886 0.85607237 -6.1539961 -2535.3207
Loop time of 0.0525794 on 1 procs for 100 steps with 24 atoms
99.4% CPU use with 1 MPI tasks x 1 OpenMP threads
Minimization stats:
Stopping criterion = max iterations
Energy initial, next-to-last, final =
-4.18904713252 -28.9258064504 -29.3268133965
Force two-norm initial, final = 18.0027 42.4511
Force max component initial, final = 5.8993 16.0523
Final line search alpha, max atom move = 0.00353207 0.056698
Iterations, force evaluations = 100 238
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.044199 | 0.044199 | 0.044199 | 0.0 | 84.06
Bond | 0.00049019 | 0.00049019 | 0.00049019 | 0.0 | 0.93
Kspace | 0.0031631 | 0.0031631 | 0.0031631 | 0.0 | 6.02
Neigh | 0.00046444 | 0.00046444 | 0.00046444 | 0.0 | 0.88
Comm | 0.0034101 | 0.0034101 | 0.0034101 | 0.0 | 6.49
Output | 1.9073e-05 | 1.9073e-05 | 1.9073e-05 | 0.0 | 0.04
Modify | 0 | 0 | 0 | 0.0 | 0.00
Other | | 0.0008333 | | | 1.58
Nlocal: 24 ave 24 max 24 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 2047 ave 2047 max 2047 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 4936 ave 4936 max 4936 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 4936
Ave neighs/atom = 205.667
Ave special neighs/atom = 2
Neighbor list builds = 2
Dangerous builds = 0
reset_timestep 0
# rigid constraints with thermostat
fix mynvt all nvt temp ${temp} ${temp} 100
fix mynvt all nvt temp 338.0 ${temp} 100
fix mynvt all nvt temp 338.0 338.0 100
fix wshake all shake 0.0001 50 0 b 1 a 1 mol h2omol
0 = # of size 2 clusters
0 = # of size 3 clusters
0 = # of size 4 clusters
8 = # of frozen angles
# gcmc
run 1000
Ewald initialization ...
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
G vector (1/distance) = 0.170448
estimated absolute RMS force accuracy = 0.0332064
estimated relative force accuracy = 0.0001
KSpace vectors: actual max1d max3d = 16 2 62
kxmax kymax kzmax = 2 2 2
Per MPI rank memory allocation (min/avg/max) = 11.63 | 11.63 | 11.63 Mbytes
Step Temp E_pair E_mol TotEng Press
0 518.26667 -30.182886 0 -7.0100684 993.1985
1000 326.9865 -62.258445 0 -47.638175 -5.3440813
Loop time of 0.14263 on 1 procs for 1000 steps with 24 atoms
Performance: 605.764 ns/day, 0.040 hours/ns, 7011.155 timesteps/s
99.5% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.10849 | 0.10849 | 0.10849 | 0.0 | 76.07
Bond | 0.00015426 | 0.00015426 | 0.00015426 | 0.0 | 0.11
Kspace | 0.01205 | 0.01205 | 0.01205 | 0.0 | 8.45
Neigh | 0.0046577 | 0.0046577 | 0.0046577 | 0.0 | 3.27
Comm | 0.011531 | 0.011531 | 0.011531 | 0.0 | 8.08
Output | 1.6212e-05 | 1.6212e-05 | 1.6212e-05 | 0.0 | 0.01
Modify | 0.0037699 | 0.0037699 | 0.0037699 | 0.0 | 2.64
Other | | 0.001957 | | | 1.37
Nlocal: 24 ave 24 max 24 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 1660 ave 1660 max 1660 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 5112 ave 5112 max 5112 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 5112
Ave neighs/atom = 213
Ave special neighs/atom = 2
Neighbor list builds = 25
Dangerous builds = 0
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake
fix mygcmc all gcmc 100 100 0 0 54341 338.0 ${mu} ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol h2omol tfac_insert ${tfac} group h2o shake wshake
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol h2omol tfac_insert 1.66666666666667 group h2o shake wshake
# output
variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
compute_modify thermo_temp dynamic/dof yes
thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc
thermo 1000
# run
run 20000
Ewald initialization ...
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
G vector (1/distance) = 0.170448
estimated absolute RMS force accuracy = 0.0332064
estimated relative force accuracy = 0.0001
KSpace vectors: actual max1d max3d = 16 2 62
kxmax kymax kzmax = 2 2 2
WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:445)
0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc
0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc
WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (../neighbor.cpp:472)
Per MPI rank memory allocation (min/avg/max) = 11.63 | 11.63 | 11.63 Mbytes
Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc
1000 326.9865 -4.3509713 -62.258445 14.62027 0.23910963 24 0 0 0 0
2000 116.99793 -5344.1527 -286.61595 17.088682 0.74721761 75 0.048183096 0.013941446 0 0
3000 106.86746 -3920.4926 -361.60598 18.794545 0.89666113 90 0.035637919 0.012768883 0 0
4000 75.002668 540.46846 -414.8511 14.531966 0.98632724 99 0.025963651 0.0093451705 0 0
5000 79.924788 -2131.1173 -437.21216 15.962121 1.0162159 102 0.019879728 0.0070418993 0 0
6000 95.552773 -3647.0233 -438.24276 19.083253 1.0162159 102 0.015753613 0.0056885133 0 0
7000 79.501736 -2071.5369 -440.77351 15.877631 1.0162159 102 0.01326216 0.0046915318 0 0
8000 62.567091 -3102.9616 -442.21884 12.495541 1.0162159 102 0.011305503 0.0040437885 0 0
9000 68.324047 -3812.7866 -440.46835 13.645287 1.0162159 102 0.0099549538 0.0035157329 0 0
10000 83.857631 -2158.2659 -444.8183 16.747566 1.0162159 102 0.0088200922 0.0031354281 0 0
11000 68.350984 -2084.0789 -440.14081 13.650667 1.0162159 102 0.0081331455 0.0030247424 0 0
12000 76.867315 -1585.6723 -443.36199 15.3515 1.0162159 102 0.0073845932 0.0027532534 0 0
13000 59.74266 -2211.0211 -446.07791 11.931462 1.0162159 102 0.0067756276 0.0025213898 0 0
14000 81.154979 -907.0176 -441.53368 16.207808 1.0162159 102 0.0062527642 0.0023280719 0 0
15000 66.814346 -2804.5134 -455.80704 13.7421 1.0461046 105 0.0059590528 0.0021576214 0 0
16000 71.42983 -3930.4004 -458.43218 14.691394 1.0461046 105 0.0055547473 0.0020163729 0 0
17000 89.624855 -3569.8136 -455.18164 18.433672 1.0461046 105 0.0052173265 0.0018867687 0 0
18000 63.519962 -1882.8157 -456.58939 13.064525 1.0461046 105 0.0049082049 0.0017765986 0 0
19000 71.872698 -2243.5046 -454.93359 14.782481 1.0461046 105 0.0046439115 0.0016748361 0 0
20000 73.660765 -2285.3173 -476.35473 15.589381 1.0759934 108 0.0045124933 0.0015837653 0 0
21000 95.675868 987.92089 -475.46736 20.248603 1.0759934 108 0.004285814 0.0015049513 0 0
Loop time of 226.155 on 1 procs for 20000 steps with 108 atoms
Performance: 7.641 ns/day, 3.141 hours/ns, 88.435 timesteps/s
99.2% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 38.053 | 38.053 | 38.053 | 0.0 | 16.83
Bond | 0.089673 | 0.089673 | 0.089673 | 0.0 | 0.04
Kspace | 0.92778 | 0.92778 | 0.92778 | 0.0 | 0.41
Neigh | 1.2619 | 1.2619 | 1.2619 | 0.0 | 0.56
Comm | 0.97483 | 0.97483 | 0.97483 | 0.0 | 0.43
Output | 0.0013306 | 0.0013306 | 0.0013306 | 0.0 | 0.00
Modify | 184.68 | 184.68 | 184.68 | 0.0 | 81.66
Other | | 0.171 | | | 0.08
Nlocal: 108 ave 108 max 108 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 7850 ave 7850 max 7850 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 99828 ave 99828 max 99828 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 99828
Ave neighs/atom = 924.333
Ave special neighs/atom = 2
Neighbor list builds = 20439
Dangerous builds = 0
Total wall time: 0:03:46

View File

@ -0,0 +1,281 @@
LAMMPS (6 Jul 2017)
using 1 OpenMP thread(s) per MPI task
# fix gcmc example with fix shake
# variables available on command line
variable mu index -8.1
variable disp index 0.5
variable temp index 338.0
variable lbox index 10.0
variable spacing index 5.0
# global model settings
units real
atom_style full
boundary p p p
pair_style lj/cut/coul/long 14
pair_modify mix arithmetic tail yes
kspace_style ewald 0.0001
bond_style harmonic
angle_style harmonic
# box, start molecules on simple cubic lattice
lattice sc ${spacing}
lattice sc 5.0
Lattice spacing in x,y,z = 5 5 5
region box block 0 ${lbox} 0 ${lbox} 0 ${lbox} units box
region box block 0 10.0 0 ${lbox} 0 ${lbox} units box
region box block 0 10.0 0 10.0 0 ${lbox} units box
region box block 0 10.0 0 10.0 0 10.0 units box
create_box 2 box bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2
Created orthogonal box = (0 0 0) to (10 10 10)
1 by 2 by 2 MPI processor grid
# we can load multiple molecule templates, but don't have to use them all
molecule co2mol CO2.txt
Read molecule co2mol:
3 atoms with 2 types
2 bonds with 1 types
1 angles with 1 types
0 dihedrals with 0 types
0 impropers with 0 types
molecule h2omol H2O.txt
Read molecule h2omol:
3 atoms with 2 types
2 bonds with 1 types
1 angles with 1 types
0 dihedrals with 0 types
0 impropers with 0 types
create_atoms 0 box mol h2omol 464563 units box
Created 24 atoms
# rigid SPC/E water model
pair_coeff 1 1 0.15535 3.166
pair_coeff * 2 0.0000 0.0000
bond_coeff 1 1000 1.0
angle_coeff 1 100 109.47
# masses
mass 1 15.9994
mass 2 1.0
# MD settings
group h2o type 1 2
24 atoms in group h2o
neighbor 2.0 bin
neigh_modify every 1 delay 1 check yes
velocity all create ${temp} 54654
velocity all create 338.0 54654
timestep 1.0
minimize 0.0 0.0 100 1000
WARNING: Using 'neigh_modify every 1 delay 0 check yes' setting during minimization (../min.cpp:168)
Ewald initialization ...
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
G vector (1/distance) = 0.170448
estimated absolute RMS force accuracy = 0.0332064
estimated relative force accuracy = 0.0001
KSpace vectors: actual max1d max3d = 16 2 62
kxmax kymax kzmax = 2 2 2
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 16
ghost atom cutoff = 16
binsize = 8, bins = 2 2 2
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut/coul/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 11.85 | 11.85 | 11.85 Mbytes
Step Temp E_pair E_mol TotEng Press
0 338 -4.9610706 9.2628112e-06 18.211756 730.90791
100 338 -15.742442 0.14954269 7.579918 -637.49568
Loop time of 0.0828406 on 4 procs for 100 steps with 24 atoms
98.7% CPU use with 4 MPI tasks x 1 OpenMP threads
Minimization stats:
Stopping criterion = max iterations
Energy initial, next-to-last, final =
-4.96106135393 -15.5388622715 -15.592899346
Force two-norm initial, final = 15.474 18.1478
Force max component initial, final = 5.80042 7.56514
Final line search alpha, max atom move = 0.00151131 0.0114333
Iterations, force evaluations = 100 328
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.012844 | 0.025471 | 0.047008 | 8.1 | 30.75
Bond | 0.00038934 | 0.00046468 | 0.00054336 | 0.0 | 0.56
Kspace | 0.0061138 | 0.027556 | 0.04014 | 7.8 | 33.26
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.023276 | 0.023636 | 0.023804 | 0.1 | 28.53
Output | 3.171e-05 | 3.3557e-05 | 3.8147e-05 | 0.0 | 0.04
Modify | 0 | 0 | 0 | 0.0 | 0.00
Other | | 0.00568 | | | 6.86
Nlocal: 6 ave 8 max 3 min
Histogram: 1 0 0 0 1 0 0 0 0 2
Nghost: 1722 ave 1725 max 1720 min
Histogram: 2 0 0 0 0 0 1 0 0 1
Neighs: 1256.75 ave 2101 max 667 min
Histogram: 1 0 1 0 1 0 0 0 0 1
Total # of neighbors = 5027
Ave neighs/atom = 209.458
Ave special neighs/atom = 2
Neighbor list builds = 0
Dangerous builds = 0
reset_timestep 0
# rigid constraints with thermostat
fix mynvt all nvt temp ${temp} ${temp} 100
fix mynvt all nvt temp 338.0 ${temp} 100
fix mynvt all nvt temp 338.0 338.0 100
fix wshake all shake 0.0001 50 0 b 1 a 1 mol h2omol
0 = # of size 2 clusters
0 = # of size 3 clusters
0 = # of size 4 clusters
8 = # of frozen angles
# gcmc
run 1000
Ewald initialization ...
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
G vector (1/distance) = 0.170448
estimated absolute RMS force accuracy = 0.0332064
estimated relative force accuracy = 0.0001
KSpace vectors: actual max1d max3d = 16 2 62
kxmax kymax kzmax = 2 2 2
Per MPI rank memory allocation (min/avg/max) = 11.6 | 11.6 | 11.6 Mbytes
Step Temp E_pair E_mol TotEng Press
0 518.26667 -15.742442 0 7.4303753 -613.0781
1000 369.81793 -54.202686 0 -37.667331 294.98823
Loop time of 0.199641 on 4 procs for 1000 steps with 24 atoms
Performance: 432.777 ns/day, 0.055 hours/ns, 5008.996 timesteps/s
98.5% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.017161 | 0.034988 | 0.05833 | 8.0 | 17.53
Bond | 0.00017357 | 0.00021374 | 0.00027347 | 0.0 | 0.11
Kspace | 0.018025 | 0.044624 | 0.065613 | 8.4 | 22.35
Neigh | 0.0029755 | 0.0033154 | 0.0036366 | 0.6 | 1.66
Comm | 0.059933 | 0.06537 | 0.070709 | 1.5 | 32.74
Output | 3.4571e-05 | 3.6657e-05 | 4.22e-05 | 0.0 | 0.02
Modify | 0.043458 | 0.045628 | 0.04767 | 0.9 | 22.86
Other | | 0.005465 | | | 2.74
Nlocal: 6 ave 8 max 3 min
Histogram: 1 0 0 0 0 0 1 0 1 1
Nghost: 1331.5 ave 1369 max 1290 min
Histogram: 1 0 0 0 0 2 0 0 0 1
Neighs: 1259.75 ave 1642 max 428 min
Histogram: 1 0 0 0 0 0 0 1 0 2
Total # of neighbors = 5039
Ave neighs/atom = 209.958
Ave special neighs/atom = 2
Neighbor list builds = 27
Dangerous builds = 0
variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
fix mygcmc all gcmc 100 100 0 0 54341 ${temp} ${mu} ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake
fix mygcmc all gcmc 100 100 0 0 54341 338.0 ${mu} ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 ${disp} mol h2omol tfac_insert ${tfac} group h2o shake wshake
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol h2omol tfac_insert ${tfac} group h2o shake wshake
fix mygcmc all gcmc 100 100 0 0 54341 338.0 -8.1 0.5 mol h2omol tfac_insert 1.66666666666667 group h2o shake wshake
# output
variable tacc equal f_mygcmc[2]/(f_mygcmc[1]+0.1)
variable iacc equal f_mygcmc[4]/(f_mygcmc[3]+0.1)
variable dacc equal f_mygcmc[6]/(f_mygcmc[5]+0.1)
variable racc equal f_mygcmc[8]/(f_mygcmc[7]+0.1)
compute_modify thermo_temp dynamic/dof yes
thermo_style custom step temp press pe ke density atoms v_iacc v_dacc v_tacc v_racc
thermo 1000
# run
run 20000
Ewald initialization ...
WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321)
G vector (1/distance) = 0.170448
estimated absolute RMS force accuracy = 0.0332064
estimated relative force accuracy = 0.0001
KSpace vectors: actual max1d max3d = 16 2 62
kxmax kymax kzmax = 2 2 2
WARNING: Fix gcmc using full_energy option (../fix_gcmc.cpp:445)
0 atoms in group FixGCMC:gcmc_exclusion_group:mygcmc
0 atoms in group FixGCMC:rotation_gas_atoms:mygcmc
WARNING: Neighbor exclusions used with KSpace solver may give inconsistent Coulombic energies (../neighbor.cpp:472)
Per MPI rank memory allocation (min/avg/max) = 11.6 | 11.6 | 11.6 Mbytes
Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_racc
1000 369.81793 295.32434 -54.202686 16.535355 0.23910963 24 0 0 0 0
2000 84.544466 -2810.9047 -344.81664 14.364627 0.86677242 87 0.052198354 0.0099581757 0 0
3000 75.188527 -3688.256 -425.02228 14.567977 0.98632724 99 0.030546787 0.0049111089 0 0
4000 75.019396 -5669.3063 -427.69454 14.535207 0.98632724 99 0.019972039 0.0033375609 0 0
5000 90.415371 -2141.7596 -434.65925 17.518218 0.98632724 99 0.014909796 0.002514964 0 0
6000 78.212628 -943.75125 -428.80584 15.153904 0.98632724 99 0.01181521 0.0020316119 0 0
7000 71.754139 -2028.5122 -435.2139 13.902555 0.98632724 99 0.0099466198 0.0016755471 0 0
8000 84.446231 -1969.1657 -428.27313 16.361681 0.98632724 99 0.0084791272 0.0014442102 0 0
9000 70.952348 -2476.9812 -446.33824 14.170197 1.0162159 102 0.0077150892 0.0012556189 0 0
10000 71.418543 -1875.7083 -443.7214 14.263302 1.0162159 102 0.0068355714 0.0011197957 0 0
11000 86.094994 -4508.7581 -444.82687 17.194399 1.0162159 102 0.0061494515 0.0010082475 0 0
12000 81.906091 -1547.8105 -442.36719 16.357815 1.0162159 102 0.0055834729 0.00091775114 0 0
13000 57.221548 -4607.6222 -448.30939 11.42796 1.0162159 102 0.0051230355 0.00084046326 0 0
14000 61.288344 -2518.1779 -445.70636 12.240157 1.0162159 102 0.0047276997 0.00077602396 0 0
15000 85.787669 -2407.7111 -443.3834 17.133022 1.0162159 102 0.0043983485 0.00071920715 0 0
16000 74.845939 -3288.3403 -445.8247 14.947802 1.0162159 102 0.0042321884 0.00080654918 0 0
17000 73.835431 -1926.9566 -445.67476 14.745989 1.0162159 102 0.0039751059 0.00075470749 0 0
18000 72.634985 -3997.552 -447.2351 14.506243 1.0162159 102 0.0037395847 0.00071063946 0 0
19000 96.776472 -714.44132 -453.65552 19.904587 1.0461046 105 0.0036487876 0.00066993446 0 0
20000 75.470786 183.16972 -464.04688 15.522521 1.0461046 105 0.0034630763 0.00063350614 0 0
21000 65.658309 -773.41266 -466.27068 13.504331 1.0461046 105 0.003289113 0.00060198052 0 0
Loop time of 93.8859 on 4 procs for 20000 steps with 105 atoms
Performance: 18.405 ns/day, 1.304 hours/ns, 213.024 timesteps/s
98.8% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 6.7882 | 10.264 | 14.758 | 93.2 | 10.93
Bond | 0.028286 | 0.034218 | 0.039038 | 2.5 | 0.04
Kspace | 0.57255 | 5.2227 | 8.8493 | 133.8 | 5.56
Neigh | 0.3635 | 0.36915 | 0.37473 | 0.9 | 0.39
Comm | 2.9961 | 3.2542 | 3.509 | 11.4 | 3.47
Output | 0.0011675 | 0.0012342 | 0.001375 | 0.2 | 0.00
Modify | 74.428 | 74.499 | 74.571 | 0.7 | 79.35
Other | | 0.2411 | | | 0.26
Nlocal: 26.25 ave 31 max 22 min
Histogram: 1 0 1 0 0 0 1 0 0 1
Nghost: 6049.25 ave 6133 max 5962 min
Histogram: 1 0 0 0 1 0 1 0 0 1
Neighs: 23613 ave 35083 max 14025 min
Histogram: 1 0 0 1 1 0 0 0 0 1
Total # of neighbors = 94452
Ave neighs/atom = 899.543
Ave special neighs/atom = 2
Neighbor list builds = 20428
Dangerous builds = 0
Total wall time: 0:01:34

View File

@ -1,5 +1,4 @@
LAMMPS (17 Mar 2017)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
LAMMPS (6 Jul 2017)
using 1 OpenMP thread(s) per MPI task
# GCMC for LJ simple fluid, no dynamics
# T = 2.0
@ -100,20 +99,20 @@ Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_rhoav v_pav v
8000 2.2175324 1.5897263 -3.078898 3.2759002 0.528 66 0.068180395 0.067899629 0.11332691 0.53928 1.5488388 -0.01075766
9000 1.8610779 1.0396231 -2.923262 2.7465908 0.496 62 0.068346453 0.068028117 0.1134132 0.52912 1.4352871 0.027082544
10000 2.1079271 1.1746643 -2.9112062 3.1091925 0.48 60 0.068352878 0.068054948 0.11335434 0.5316 1.4462327 0.018503094
Loop time of 13.05 on 1 procs for 10000 steps with 60 atoms
Loop time of 20.6892 on 1 procs for 10000 steps with 60 atoms
Performance: 331035.016 tau/day, 766.285 timesteps/s
100.0% CPU use with 1 MPI tasks x 1 OpenMP threads
Performance: 208804.611 tau/day, 483.344 timesteps/s
99.4% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.37239 | 0.37239 | 0.37239 | 0.0 | 2.85
Neigh | 0.94764 | 0.94764 | 0.94764 | 0.0 | 7.26
Comm | 0.092473 | 0.092473 | 0.092473 | 0.0 | 0.71
Output | 0.00023365 | 0.00023365 | 0.00023365 | 0.0 | 0.00
Modify | 11.627 | 11.627 | 11.627 | 0.0 | 89.09
Other | | 0.01054 | | | 0.08
Pair | 0.47227 | 0.47227 | 0.47227 | 0.0 | 2.28
Neigh | 1.1729 | 1.1729 | 1.1729 | 0.0 | 5.67
Comm | 0.17133 | 0.17133 | 0.17133 | 0.0 | 0.83
Output | 0.00028253 | 0.00028253 | 0.00028253 | 0.0 | 0.00
Modify | 18.852 | 18.852 | 18.852 | 0.0 | 91.12
Other | | 0.02063 | | | 0.10
Nlocal: 60 ave 60 max 60 min
Histogram: 1 0 0 0 0 0 0 0 0 0
@ -126,4 +125,4 @@ Total # of neighbors = 2133
Ave neighs/atom = 35.55
Neighbor list builds = 10000
Dangerous builds = 0
Total wall time: 0:00:13
Total wall time: 0:00:20

View File

@ -1,5 +1,4 @@
LAMMPS (17 Mar 2017)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
LAMMPS (6 Jul 2017)
using 1 OpenMP thread(s) per MPI task
# GCMC for LJ simple fluid, no dynamics
# T = 2.0
@ -100,20 +99,20 @@ Step Temp Press PotEng KinEng Density Atoms v_iacc v_dacc v_tacc v_rhoav v_pav v
8000 1.7790467 1.8680568 -2.8028819 2.6275151 0.52 65 0.070454494 0.070172368 0.11736806 0.524 1.4213649 0.047985191
9000 1.7968847 1.3195587 -3.261001 2.6550983 0.536 67 0.069952011 0.069618327 0.11650087 0.53904 1.4624201 -0.01069837
10000 2.1566109 1.1015729 -3.4999837 3.1880335 0.552 69 0.069603309 0.069284134 0.11625548 0.53128 1.3587249 0.02075238
Loop time of 13.0611 on 4 procs for 10000 steps with 69 atoms
Loop time of 24.9916 on 4 procs for 10000 steps with 69 atoms
Performance: 330753.007 tau/day, 765.632 timesteps/s
99.7% CPU use with 4 MPI tasks x 1 OpenMP threads
Performance: 172857.936 tau/day, 400.134 timesteps/s
98.2% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.08888 | 0.09443 | 0.099889 | 1.4 | 0.72
Neigh | 0.27721 | 0.28532 | 0.29177 | 1.1 | 2.18
Comm | 0.27648 | 0.28875 | 0.30268 | 1.9 | 2.21
Output | 0.00029635 | 0.00043058 | 0.00048113 | 0.0 | 0.00
Modify | 12.384 | 12.384 | 12.384 | 0.0 | 94.82
Other | | 0.008055 | | | 0.06
Pair | 0.11696 | 0.12516 | 0.1321 | 1.7 | 0.50
Neigh | 0.34874 | 0.35644 | 0.36545 | 1.2 | 1.43
Comm | 0.48531 | 0.51366 | 0.54755 | 3.8 | 2.06
Output | 0.0005362 | 0.00069767 | 0.00076008 | 0.0 | 0.00
Modify | 23.956 | 23.972 | 23.988 | 0.3 | 95.92
Other | | 0.02376 | | | 0.10
Nlocal: 17.25 ave 23 max 10 min
Histogram: 1 0 0 0 0 0 2 0 0 1
@ -126,4 +125,4 @@ Total # of neighbors = 2823
Ave neighs/atom = 40.913
Neighbor list builds = 10000
Dangerous builds = 0
Total wall time: 0:00:13
Total wall time: 0:00:24

View File

@ -71,7 +71,7 @@ enum{ATOM,MOLECULE};
FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
Fix(lmp, narg, arg),
idregion(NULL), full_flag(0), ngroups(0), groupstrings(NULL), ngrouptypes(0), grouptypestrings(NULL),
grouptypebits(NULL), grouptypes(NULL), local_gas_list(NULL), atom_coord(NULL), random_equal(NULL), random_unequal(NULL),
grouptypebits(NULL), grouptypes(NULL), local_gas_list(NULL), atom_coord(NULL), random_equal(NULL), random_unequal(NULL),
coords(NULL), imageflags(NULL), fixrigid(NULL), fixshake(NULL), idrigid(NULL), idshake(NULL)
{
if (narg < 11) error->all(FLERR,"Illegal fix gcmc command");
@ -188,6 +188,10 @@ FixGCMC::FixGCMC(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR,"Cannot use fix gcmc shake and not molecule");
if (rigidflag && shakeflag)
error->all(FLERR,"Cannot use fix gcmc rigid and shake");
if (rigidflag && (nmcmoves > 0))
error->all(FLERR,"Cannot use fix gcmc rigid with MC moves");
if (shakeflag && (nmcmoves > 0))
error->all(FLERR,"Cannot use fix gcmc shake with MC moves");
// setup of coords and imageflags array
@ -633,7 +637,7 @@ void FixGCMC::init()
force->boltz*reservoir_temperature));
zz = exp(beta*chemical_potential)/(pow(lambda,3.0));
}
sigma = sqrt(force->boltz*reservoir_temperature*tfac_insert/gas_mass/force->mvv2e);
if (pressure_flag) zz = pressure*fugacity_coeff*beta/force->nktv2p;
@ -958,21 +962,21 @@ void FixGCMC::attempt_atomic_insertion()
zz*volume*exp(-beta*insertion_energy)/(ngas+1)) {
atom->avec->create_atom(ngcmc_type,coord);
int m = atom->nlocal - 1;
// add to groups
// optionally add to type-based groups
atom->mask[m] = groupbitall;
for (int igroup = 0; igroup < ngrouptypes; igroup++) {
if (ngcmc_type == grouptypes[igroup])
atom->mask[m] |= grouptypebits[igroup];
}
atom->v[m][0] = random_unequal->gaussian()*sigma;
atom->v[m][1] = random_unequal->gaussian()*sigma;
atom->v[m][2] = random_unequal->gaussian()*sigma;
modify->create_attribute(m);
success = 1;
}
}
@ -1345,7 +1349,7 @@ void FixGCMC::attempt_molecule_insertion()
if (insertion_energy_sum < MAXENERGYTEST &&
random_equal->uniform() < zz*volume*natoms_per_molecule*
exp(-beta*insertion_energy_sum)/(ngas + natoms_per_molecule)) {
tagint maxmol = 0;
for (int i = 0; i < atom->nlocal; i++) maxmol = MAX(maxmol,atom->molecule[i]);
tagint maxmol_all;
@ -1353,33 +1357,33 @@ void FixGCMC::attempt_molecule_insertion()
maxmol_all++;
if (maxmol_all >= MAXTAGINT)
error->all(FLERR,"Fix gcmc ran out of available molecule IDs");
tagint maxtag = 0;
for (int i = 0; i < atom->nlocal; i++) maxtag = MAX(maxtag,atom->tag[i]);
tagint maxtag_all;
MPI_Allreduce(&maxtag,&maxtag_all,1,MPI_LMP_TAGINT,MPI_MAX,world);
int nlocalprev = atom->nlocal;
double vnew[3];
vnew[0] = random_equal->gaussian()*sigma;
vnew[1] = random_equal->gaussian()*sigma;
vnew[2] = random_equal->gaussian()*sigma;
for (int i = 0; i < natoms_per_molecule; i++) {
if (procflag[i]) {
atom->avec->create_atom(onemols[imol]->type[i],atom_coord[i]);
int m = atom->nlocal - 1;
// add to groups
// optionally add to type-based groups
atom->mask[m] = groupbitall;
for (int igroup = 0; igroup < ngrouptypes; igroup++) {
if (ngcmc_type == grouptypes[igroup])
atom->mask[m] |= grouptypebits[igroup];
}
atom->image[m] = imagezero;
domain->remap(atom->x[m],atom->image[m]);
atom->molecule[m] = maxmol_all;
@ -1389,7 +1393,7 @@ void FixGCMC::attempt_molecule_insertion()
atom->v[m][0] = vnew[0];
atom->v[m][1] = vnew[1];
atom->v[m][2] = vnew[2];
atom->add_molecule_atom(onemols[imol],i,m,maxtag_all);
modify->create_attribute(m);
}
@ -1490,13 +1494,13 @@ void FixGCMC::attempt_atomic_translation_full()
energy_stored = energy_after;
ntranslation_successes += 1.0;
} else {
tagint tmptag_all;
MPI_Allreduce(&tmptag,&tmptag_all,1,MPI_LMP_TAGINT,MPI_MAX,world);
double xtmp_all[3];
MPI_Allreduce(&xtmp,&xtmp_all,3,MPI_DOUBLE,MPI_SUM,world);
for (int i = 0; i < atom->nlocal; i++) {
if (tmptag_all == atom->tag[i]) {
x[i][0] = xtmp_all[0];
@ -1651,7 +1655,7 @@ void FixGCMC::attempt_atomic_insertion_full()
if (energy_after < MAXENERGYTEST &&
random_equal->uniform() <
zz*volume*exp(beta*(energy_before - energy_after))/(ngas+1)) {
ninsertion_successes += 1.0;
energy_stored = energy_after;
} else {
@ -2146,11 +2150,11 @@ double FixGCMC::energy(int i, int itype, tagint imolecule, double *coord)
int jtype = type[j];
// if overlap check requested, if overlap,
// return signal value for energy
// return signal value for energy
if (overlap_flag && rsq < overlap_cutoffsq)
return MAXENERGYSIGNAL;
if (rsq < cutsq[itype][jtype])
total_energy +=
pair->single(i,j,itype,jtype,rsq,factor_coul,factor_lj,fpair);
@ -2185,7 +2189,7 @@ double FixGCMC::molecule_energy(tagint gas_molecule_id)
double FixGCMC::energy_full()
{
int imolecule;
if (triclinic) domain->x2lamda(atom->nlocal);
domain->pbc();
comm->exchange();
@ -2198,7 +2202,7 @@ double FixGCMC::energy_full()
int vflag = 0;
// if overlap check requested, if overlap,
// return signal value for energy
// return signal value for energy
if (overlap_flag) {
int overlaptestall;
@ -2212,12 +2216,12 @@ double FixGCMC::energy_full()
for (int j = i+1; j < nall; j++) {
if (mode == MOLECULE)
if (imolecule == molecule[j]) continue;
delx = x[i][0] - x[j][0];
dely = x[i][1] - x[j][1];
delz = x[i][2] - x[j][2];
rsq = delx*delx + dely*dely + delz*delz;
if (rsq < overlap_cutoffsq) {
overlaptest = 1;
break;
@ -2232,7 +2236,7 @@ double FixGCMC::energy_full()
// clear forces so they don't accumulate over multiple
// calls within fix gcmc timestep, e.g. for fix shake
size_t nbytes = sizeof(double) * (atom->nlocal + atom->nghost);
if (nbytes) memset(&atom->f[0][0],0,3*nbytes);
@ -2370,7 +2374,7 @@ void FixGCMC::update_gas_atoms_list()
group->xcm(molecule_group,gas_mass,com);
// remap unwrapped com into periodic box
domain->remap(com);
comx[imolecule] = com[0];
comy[imolecule] = com[1];