benchmarking of replicated systems

This commit is contained in:
Steve Plimpton
2022-06-01 13:19:47 -06:00
parent d7c1e54538
commit ea3467ab32
13 changed files with 218 additions and 39920 deletions

View File

@ -44,9 +44,9 @@ kdiff.py dump.water_box.hippo.32 dump.water_box.hippo.32.test
# ubiquitin
kdiff.py log.ubi.1 log.ubi.1.test
kdiff.py dump.ubi.1 dump.ubi.1.test
kdiff.py log.ubiquitin.1 log.ubiquitin.1.test
kdiff.py dump.ubiquitin.1 dump.ubiquitin.1.test
kdiff.py log.ubi.32 log.ubi.32.test
kdiff.py dump.ubi.32 dump.ubi.32.test
kdiff.py log.ubiquitin.32 log.ubiquitin.32.test
kdiff.py dump.ubiquitin.32 dump.ubiquitin.32.test

View File

@ -57,10 +57,10 @@ mv dump.water_box dump.water_box.hippo.32.test
# ubiquitin
../../src/lmp_mpi < in.ubiquitin.test
mv log.lammps log.ubi.1.test
mv dump.ubi dump.ubi.1.test
mv log.lammps log.ubiquitin.1.test
mv dump.ubiquitin dump.ubiquitin.1.test
mpirun -np 32 ../../src/lmp_mpi < in.ubiquitin.test
mv log.lammps log.ubi.32.test
mv dump.ubi dump.ubi.32.test
mv log.lammps log.ubiquitin.32.test
mv dump.ubiquitin dump.ubiquitin.32.test

View File

@ -6,7 +6,7 @@ openmp-threads 1
ewald
ewald-alpha 0.4
pewald-alpha 0.5
pme-grid 50 50 50
pme-grid 24 24 24
neighbor-list
a-axis 18.643

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -41,7 +41,7 @@ compute virial all pressure NULL virial
thermo_style custom step temp epair ebond eangle edihed eimp &
emol etotal press c_virial[*]
dump 1 all custom 10 dump.ubi id type x y z fx fy fz
dump 1 all custom 10 dump.ubiquitin id type x y z fx fy fz
dump_modify 1 sort id
# zero step run

View File

@ -1,162 +0,0 @@
LAMMPS (24 Mar 2022)
# solvated ubiquitin molecule with AMOEBA force field
units real
boundary p p p
atom_modify sort 0 0.0
atom_style amoeba
bond_style class2
angle_style amoeba
dihedral_style fourier
improper_style amoeba
# per-atom properties required by AMOEBA or HIPPO
fix amtype all property/atom i_amtype ghost yes
fix extra all property/atom i_amgroup d_redID d_pval ghost yes
fix extra2 all property/atom i_polaxe d2_xyzaxis 3
fix pit all amoeba/pitorsion
fix_modify pit energy yes
fix bit all amoeba/bitorsion bitorsion.ubiquitin.data
fix_modify bit energy yes
# read data file
read_data data.ubiquitin fix amtype NULL "Tinker Types" fix pit "pitorsion types" "PiTorsion Coeffs" fix pit pitorsions PiTorsions fix bit bitorsions BiTorsions
Reading data file ...
orthogonal box = (0 0 0) to (54.99 41.91 41.91)
1 by 1 by 1 MPI processor grid
reading atoms ...
9737 atoms
scanning bonds ...
4 = max bonds/atom
scanning angles ...
6 = max angles/atom
scanning dihedrals ...
18 = max dihedrals/atom
scanning impropers ...
3 = max impropers/atom
reading bonds ...
6908 bonds
reading angles ...
5094 angles
reading dihedrals ...
3297 dihedrals
reading impropers ...
651 impropers
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
4 = max # of 1-2 neighbors
9 = max # of 1-3 neighbors
19 = max # of 1-4 neighbors
21 = max # of special neighbors
special bonds CPU = 0.004 seconds
read_data CPU = 0.082 seconds
pair_style amoeba
pair_coeff * * amoeba_ubiquitin.prm amoeba_ubiquitin.key
special_bonds lj/coul 0.5 0.5 0.5 one/five yes
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0.5 0.5 0.5
special bond factors coul: 0.5 0.5 0.5
4 = max # of 1-2 neighbors
9 = max # of 1-3 neighbors
19 = max # of 1-4 neighbors
58 = max # of 1-5 neighbors
21 = max # of special neighbors
special bonds CPU = 0.006 seconds
# thermo output
compute virial all pressure NULL virial
thermo_style custom step temp epair ebond eangle edihed eimp emol etotal press c_virial[*]
dump 1 all custom 10 dump.ubi id type x y z fx fy fz
dump_modify 1 sort id
# zero step run
#run 0
# dynamics
fix 1 all nve
thermo 1
run 10
AMOEBA/HIPPO force field settings
hal: cut 12 taper 10.8 vscale 0 0 1 1
multipole: cut 7 aewald 0.4 bsorder 5 FFT 60 48 48 mscale 0 0 0.4 1
polar: cut 7 aewald 0.5 bsorder 5 FFT 60 48 48
pscale 0 0 1 1 piscale 0 0 0.5 1 wscale 1 1 1 1 d/u scale 0 1
precondition: cut 4.5
generated 0 of 15 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 14
ghost atom cutoff = 14
binsize = 7, bins = 8 6 6
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair amoeba, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
AMOEBA/HIPPO group count: 3196
Per MPI rank memory allocation (min/avg/max) = 260.4 | 260.4 | 260.4 Mbytes
Step Temp E_pair E_bond E_angle E_dihed E_impro E_mol TotEng Press c_virial[1] c_virial[2] c_virial[3] c_virial[4] c_virial[5] c_virial[6]
0 0 -35338.057 2856.5938 1955.5431 224.37609 65.00809 5101.5211 -30247.585 -6336.5196 -5795.4272 -6329.8149 -6884.3167 349.52657 77.164877 652.41925
1 29.61379 -35356.153 2037.3541 1840.7883 223.90217 64.293945 4166.3385 -30341.522 -6486.773 -6452.8463 -6841.5982 -7386.1106 311.38025 120.72605 545.35513
2 78.518242 -35383.65 825.39919 1538.3909 222.55095 62.191009 2648.5321 -30467.814 -5502.9841 -6410.2998 -6396.1829 -6937.8137 217.3515 210.76948 294.28051
3 88.8921 -35402.11 938.99299 1162.2914 220.5271 58.832521 2380.644 -30453.516 -1929.5417 -3331.1291 -2769.7218 -3350.5733 117.32302 279.72705 31.237776
4 68.740402 -35477.589 2048.0659 858.03795 218.14277 54.460022 3178.7066 -30316.325 2041.1138 594.25938 1665.7799 1030.8539 66.230421 304.28296 -155.80224
5 76.267862 -35707.869 2206.6534 736.37385 215.75693 49.401674 3208.1859 -30299.377 2276.9276 536.21124 1893.4621 1258.492 92.097191 299.65604 -228.58369
6 118.24373 -36092.77 1166.179 815.59206 213.67399 44.022297 2239.4673 -30435.629 -1677.8051 -3988.2428 -2669.6848 -3247.7207 197.42472 285.87129 -162.35459
7 137.7204 -36521.444 782.87113 1026.745 212.04289 38.686259 2060.3452 -30479.082 -5987.83 -8386.8104 -7363.188 -7888.261 357.00835 253.66346 32.827786
8 112.66452 -36897.181 1750.0569 1269.152 210.83571 33.742799 3263.7874 -30379.432 -7886.4081 -9703.2601 -9043.015 -9555.2908 490.76046 182.31259 278.727
9 88.237359 -37209.906 2695.1766 1454.55 209.91331 29.503458 4389.1434 -30276.565 -8202.16 -9492.368 -9110.7037 -9639.2288 502.55699 107.82333 443.6705
10 108.86756 -37474.988 2240.4603 1523.7936 209.10313 26.208515 3999.5656 -30333.279 -8468.4347 -9956.923 -9709.5874 -10224.682 365.98214 95.262991 425.12746
Loop time of 21.791 on 1 procs for 10 steps with 9737 atoms
Performance: 0.040 ns/day, 605.307 hours/ns, 0.459 timesteps/s
99.1% CPU use with 1 MPI tasks x no OpenMP threads
AMEOBA/HIPPO timing breakdown:
Init time: 0.0264311 0.00121566
Hal time: 7.15654 32.9156
Mpole time: 2.14232 9.85334
Induce time: 7.99277 36.7617
Polar time: 4.42403 20.3477
Total time: 21.7421
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 21.742 | 21.742 | 21.742 | 0.0 | 99.78
Bond | 0.014806 | 0.014806 | 0.014806 | 0.0 | 0.07
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.0035774 | 0.0035774 | 0.0035774 | 0.0 | 0.02
Output | 0.026947 | 0.026947 | 0.026947 | 0.0 | 0.12
Modify | 0.0028419 | 0.0028419 | 0.0028419 | 0.0 | 0.01
Other | | 0.0007034 | | | 0.00
Nlocal: 9737 ave 9737 max 9737 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 31511 ave 31511 max 31511 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 5.6393e+06 ave 5.6393e+06 max 5.6393e+06 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 5639296
Ave neighs/atom = 579.16155
Ave special neighs/atom = 3.1364897
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:24

View File

@ -1,162 +0,0 @@
LAMMPS (24 Mar 2022)
# solvated ubiquitin molecule with AMOEBA force field
units real
boundary p p p
atom_modify sort 0 0.0
atom_style amoeba
bond_style class2
angle_style amoeba
dihedral_style fourier
improper_style amoeba
# per-atom properties required by AMOEBA or HIPPO
fix amtype all property/atom i_amtype ghost yes
fix extra all property/atom i_amgroup d_redID d_pval ghost yes
fix extra2 all property/atom i_polaxe d2_xyzaxis 3
fix pit all amoeba/pitorsion
fix_modify pit energy yes
fix bit all amoeba/bitorsion bitorsion.ubiquitin.data
fix_modify bit energy yes
# read data file
read_data data.ubiquitin fix amtype NULL "Tinker Types" fix pit "pitorsion types" "PiTorsion Coeffs" fix pit pitorsions PiTorsions fix bit bitorsions BiTorsions
Reading data file ...
orthogonal box = (0 0 0) to (54.99 41.91 41.91)
4 by 2 by 4 MPI processor grid
reading atoms ...
9737 atoms
scanning bonds ...
4 = max bonds/atom
scanning angles ...
6 = max angles/atom
scanning dihedrals ...
18 = max dihedrals/atom
scanning impropers ...
3 = max impropers/atom
reading bonds ...
6908 bonds
reading angles ...
5094 angles
reading dihedrals ...
3297 dihedrals
reading impropers ...
651 impropers
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
4 = max # of 1-2 neighbors
9 = max # of 1-3 neighbors
19 = max # of 1-4 neighbors
21 = max # of special neighbors
special bonds CPU = 0.002 seconds
read_data CPU = 0.112 seconds
pair_style amoeba
pair_coeff * * amoeba_ubiquitin.prm amoeba_ubiquitin.key
special_bonds lj/coul 0.5 0.5 0.5 one/five yes
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0.5 0.5 0.5
special bond factors coul: 0.5 0.5 0.5
4 = max # of 1-2 neighbors
9 = max # of 1-3 neighbors
19 = max # of 1-4 neighbors
58 = max # of 1-5 neighbors
21 = max # of special neighbors
special bonds CPU = 0.002 seconds
# thermo output
compute virial all pressure NULL virial
thermo_style custom step temp epair ebond eangle edihed eimp emol etotal press c_virial[*]
dump 1 all custom 10 dump.ubi id type x y z fx fy fz
dump_modify 1 sort id
# zero step run
#run 0
# dynamics
fix 1 all nve
thermo 1
run 10
AMOEBA/HIPPO force field settings
hal: cut 12 taper 10.8 vscale 0 0 1 1
multipole: cut 7 aewald 0.4 bsorder 5 FFT 60 48 48 mscale 0 0 0.4 1
polar: cut 7 aewald 0.5 bsorder 5 FFT 60 48 48
pscale 0 0 1 1 piscale 0 0 0.5 1 wscale 1 1 1 1 d/u scale 0 1
precondition: cut 4.5
generated 0 of 15 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 14
ghost atom cutoff = 14
binsize = 7, bins = 8 6 6
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair amoeba, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
AMOEBA/HIPPO group count: 3196
Per MPI rank memory allocation (min/avg/max) = 73.46 | 73.76 | 74.86 Mbytes
Step Temp E_pair E_bond E_angle E_dihed E_impro E_mol TotEng Press c_virial[1] c_virial[2] c_virial[3] c_virial[4] c_virial[5] c_virial[6]
0 0 -35338.057 2856.5938 1955.5431 224.37609 65.00809 5101.5211 -30247.585 -6336.5196 -5795.4272 -6329.8149 -6884.3167 349.52657 77.164877 652.41925
1 29.61379 -35356.153 2037.3541 1840.7883 223.90217 64.293945 4166.3385 -30341.522 -6486.773 -6452.8463 -6841.5982 -7386.1106 311.38025 120.72605 545.35513
2 78.518242 -35383.65 825.39919 1538.3909 222.55095 62.191009 2648.5321 -30467.814 -5502.9841 -6410.2998 -6396.1829 -6937.8137 217.3515 210.76948 294.28051
3 88.8921 -35402.11 938.99299 1162.2914 220.5271 58.832521 2380.644 -30453.516 -1929.5417 -3331.1291 -2769.7218 -3350.5733 117.32302 279.72705 31.237776
4 68.740402 -35477.589 2048.0659 858.03795 218.14277 54.460022 3178.7066 -30316.325 2041.1138 594.25938 1665.7799 1030.8539 66.230421 304.28296 -155.80224
5 76.267862 -35707.869 2206.6534 736.37385 215.75693 49.401674 3208.1859 -30299.377 2276.9276 536.21124 1893.4621 1258.492 92.097191 299.65604 -228.58369
6 118.24373 -36092.77 1166.179 815.59206 213.67399 44.022297 2239.4673 -30435.629 -1677.8051 -3988.2428 -2669.6848 -3247.7207 197.42472 285.87129 -162.35459
7 137.7204 -36521.444 782.87113 1026.745 212.04289 38.686259 2060.3452 -30479.082 -5987.83 -8386.8104 -7363.188 -7888.261 357.00835 253.66346 32.827786
8 112.66452 -36897.181 1750.0569 1269.152 210.83571 33.742799 3263.7874 -30379.432 -7886.4081 -9703.2601 -9043.015 -9555.2908 490.76046 182.31259 278.727
9 88.237359 -37209.906 2695.1766 1454.55 209.91331 29.503458 4389.1434 -30276.565 -8202.16 -9492.368 -9110.7037 -9639.2288 502.55699 107.82333 443.6705
10 108.86756 -37474.988 2240.4603 1523.7936 209.10313 26.208515 3999.5656 -30333.279 -8468.4347 -9956.923 -9709.5874 -10224.682 365.98214 95.262991 425.12746
Loop time of 1.51355 on 32 procs for 10 steps with 9737 atoms
Performance: 0.571 ns/day, 42.043 hours/ns, 6.607 timesteps/s
99.5% CPU use with 32 MPI tasks x no OpenMP threads
AMEOBA/HIPPO timing breakdown:
Init time: 0.0221241 0.0147382
Hal time: 0.27487 18.3107
Mpole time: 0.1964 13.0833
Induce time: 0.743514 49.5298
Polar time: 0.264231 17.602
Total time: 1.50114
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 1.5006 | 1.5014 | 1.5026 | 0.1 | 99.20
Bond | 0.00023121 | 0.0006371 | 0.002095 | 0.0 | 0.04
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.0060146 | 0.008046 | 0.0092638 | 1.0 | 0.53
Output | 0.0028415 | 0.0030424 | 0.003441 | 0.2 | 0.20
Modify | 0.00011709 | 0.00019911 | 0.00036104 | 0.0 | 0.01
Other | | 0.0002509 | | | 0.02
Nlocal: 304.281 ave 326 max 273 min
Histogram: 1 1 0 5 2 8 3 6 4 2
Nghost: 7618.59 ave 7678 max 7545 min
Histogram: 1 1 4 4 5 5 2 2 4 4
Neighs: 176228 ave 204476 max 149390 min
Histogram: 3 3 3 2 6 2 5 4 2 2
Total # of neighbors = 5639296
Ave neighs/atom = 579.16155
Ave special neighs/atom = 3.1364897
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:01

View File

@ -1,148 +0,0 @@
LAMMPS (24 Mar 2022)
# water box with AMOEBA or HIPPO
units real
boundary p p p
atom_style amoeba
bond_style class2
angle_style amoeba
dihedral_style none
# per-atom properties required by AMOEBA or HIPPO
fix amtype all property/atom i_amtype ghost yes
fix extra all property/atom i_amgroup d_redID d_pval ghost yes
fix extra2 all property/atom i_polaxe d2_xyzaxis 3
# read data file
read_data data.water_box.amoeba fix amtype NULL "Tinker Types"
Reading data file ...
orthogonal box = (0 0 0) to (18.643 18.643 18.643)
1 by 1 by 1 MPI processor grid
reading atoms ...
648 atoms
scanning bonds ...
2 = max bonds/atom
scanning angles ...
1 = max angles/atom
reading bonds ...
432 bonds
reading angles ...
216 angles
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of special neighbors
special bonds CPU = 0.000 seconds
read_data CPU = 0.012 seconds
# force field
pair_style amoeba
pair_coeff * * amoeba_water.prm amoeba_water_box.key
special_bonds lj/coul 0.5 0.5 0.5 one/five yes
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0.5 0.5 0.5
special bond factors coul: 0.5 0.5 0.5
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of 1-5 neighbors
2 = max # of special neighbors
special bonds CPU = 0.001 seconds
# thermo output
compute virial all pressure NULL virial
thermo_style custom step temp epair ebond eangle edihed eimp emol etotal press c_virial[*]
dump 1 all custom 10 dump.water_box id type x y z fx fy fz
dump_modify 1 sort id
# zero step run
#run 0
# dynamics
fix 1 all nve
thermo 10
run 100
AMOEBA/HIPPO force field settings
hal: cut 7 taper 6 vscale 0 0 1 1
multipole: cut 7 aewald 0.4 bsorder 5 FFT 50 50 50 mscale 0 0 0.4 1
polar: cut 7 aewald 0.5 bsorder 5 FFT 50 50 50
pscale 0 0 1 1 piscale 0 0 0.5 1 wscale 1 1 1 1 d/u scale 0 1
precondition: cut 4.5
generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 9
ghost atom cutoff = 9
binsize = 4.5, bins = 5 5 5
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair amoeba, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
AMOEBA/HIPPO group count: 216
Per MPI rank memory allocation (min/avg/max) = 58.28 | 58.28 | 58.28 Mbytes
Step Temp E_pair E_bond E_angle E_dihed E_impro E_mol TotEng Press c_virial[1] c_virial[2] c_virial[3] c_virial[4] c_virial[5] c_virial[6]
0 0 -2172.0441 166.82637 83.732524 0 0 250.5589 -1921.4852 -6181.7112 -4771.8292 -6955.3278 -6817.9765 -272.19746 3173.3487 2229.6526
10 105.50439 -2373.6865 136.67908 106.86552 0 0 243.54459 -1926.6678 -8441.2174 -10450.318 -9514.124 -9665.625 -301.45304 322.2435 1916.9694
20 143.90097 -2358.3516 70.951764 76.777106 0 0 147.72887 -1933.0976 -7370.463 -7728.4884 -11580.562 -8676.0017 -807.21546 780.4123 2096.7667
30 157.22768 -2375.4639 50.396281 87.108719 0 0 137.505 -1934.7321 -4449.9504 -6946.5881 -7865.3435 -4955.5443 -417.85139 -1004.0926 -36.630383
40 150.92709 -2354.1768 78.484257 53.799494 0 0 132.28375 -1930.8175 353.40845 -939.7978 -4636.1858 475.75837 -1074.4762 -1584.304 -574.27211
50 153.02614 -2388.7287 100.20124 65.814409 0 0 166.01565 -1927.5893 3975.1595 1366.008 426.2343 3887.1078 -1807.1658 -2534.8393 -2118.6912
60 155.01798 -2364.31 92.948309 44.252938 0 0 137.20125 -1928.1435 5793.7978 3521.2541 1421.9416 6110.7678 -1536.937 -2559.5674 -1502.2038
70 166.70629 -2383.4827 76.492455 55.020922 0 0 131.51338 -1930.4622 4743.9587 1916.6786 2839.9241 2670.7568 -169.67855 -187.58379 -2256.4529
80 171.82933 -2388.0347 76.463333 49.138785 0 0 125.60212 -1931.0453 2210.1222 -319.99043 330.98785 -394.25628 -44.858027 252.35533 -1985.0908
90 175.7327 -2423.7974 90.784969 63.725029 0 0 154.51 -1930.3722 -917.58179 -3941.9566 -2568.4278 -3415.3121 196.38051 2366.2885 -263.52434
100 173.73319 -2422.3616 99.761403 57.29505 0 0 157.05645 -1930.2461 -3586.4169 -5733.9943 -5881.4025 -6235.1905 -230.75166 959.02899 406.2349
Loop time of 38.7603 on 1 procs for 100 steps with 648 atoms
Performance: 0.223 ns/day, 107.668 hours/ns, 2.580 timesteps/s
99.6% CPU use with 1 MPI tasks x no OpenMP threads
AMEOBA/HIPPO timing breakdown:
Init time: 0.0258209 0.000666708
Hal time: 0.889324 2.29628
Mpole time: 2.44816 6.32126
Induce time: 29.4141 75.9487
Polar time: 5.95145 15.3669
Total time: 38.7289
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 38.729 | 38.729 | 38.729 | 0.0 | 99.92
Bond | 0.003226 | 0.003226 | 0.003226 | 0.0 | 0.01
Neigh | 0.0054679 | 0.0054679 | 0.0054679 | 0.0 | 0.01
Comm | 0.0036497 | 0.0036497 | 0.0036497 | 0.0 | 0.01
Output | 0.01663 | 0.01663 | 0.01663 | 0.0 | 0.04
Modify | 0.00088965 | 0.00088965 | 0.00088965 | 0.0 | 0.00
Other | | 0.001155 | | | 0.00
Nlocal: 648 ave 648 max 648 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 4290 ave 4290 max 4290 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 98543 ave 98543 max 98543 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 98543
Ave neighs/atom = 152.07253
Ave special neighs/atom = 2
Neighbor list builds = 2
Dangerous builds = 0
Total wall time: 0:00:39

View File

@ -1,148 +0,0 @@
LAMMPS (24 Mar 2022)
# water box with AMOEBA or HIPPO
units real
boundary p p p
atom_style amoeba
bond_style class2
angle_style amoeba
dihedral_style none
# per-atom properties required by AMOEBA or HIPPO
fix amtype all property/atom i_amtype ghost yes
fix extra all property/atom i_amgroup d_redID d_pval ghost yes
fix extra2 all property/atom i_polaxe d2_xyzaxis 3
# read data file
read_data data.water_box.amoeba fix amtype NULL "Tinker Types"
Reading data file ...
orthogonal box = (0 0 0) to (18.643 18.643 18.643)
2 by 4 by 4 MPI processor grid
reading atoms ...
648 atoms
scanning bonds ...
2 = max bonds/atom
scanning angles ...
1 = max angles/atom
reading bonds ...
432 bonds
reading angles ...
216 angles
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of special neighbors
special bonds CPU = 0.002 seconds
read_data CPU = 0.020 seconds
# force field
pair_style amoeba
pair_coeff * * amoeba_water.prm amoeba_water_box.key
special_bonds lj/coul 0.5 0.5 0.5 one/five yes
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0.5 0.5 0.5
special bond factors coul: 0.5 0.5 0.5
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of 1-5 neighbors
2 = max # of special neighbors
special bonds CPU = 0.001 seconds
# thermo output
compute virial all pressure NULL virial
thermo_style custom step temp epair ebond eangle edihed eimp emol etotal press c_virial[*]
dump 1 all custom 10 dump.water_box id type x y z fx fy fz
dump_modify 1 sort id
# zero step run
#run 0
# dynamics
fix 1 all nve
thermo 10
run 100
AMOEBA/HIPPO force field settings
hal: cut 7 taper 6 vscale 0 0 1 1
multipole: cut 7 aewald 0.4 bsorder 5 FFT 50 50 50 mscale 0 0 0.4 1
polar: cut 7 aewald 0.5 bsorder 5 FFT 50 50 50
pscale 0 0 1 1 piscale 0 0 0.5 1 wscale 1 1 1 1 d/u scale 0 1
precondition: cut 4.5
generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 9
ghost atom cutoff = 9
binsize = 4.5, bins = 5 5 5
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair amoeba, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
AMOEBA/HIPPO group count: 216
Per MPI rank memory allocation (min/avg/max) = 57.47 | 57.48 | 57.74 Mbytes
Step Temp E_pair E_bond E_angle E_dihed E_impro E_mol TotEng Press c_virial[1] c_virial[2] c_virial[3] c_virial[4] c_virial[5] c_virial[6]
0 0 -2172.0441 166.82637 83.732524 0 0 250.5589 -1921.4852 -6181.7112 -4771.8292 -6955.3278 -6817.9765 -272.19746 3173.3487 2229.6526
10 105.50439 -2373.6865 136.67908 106.86552 0 0 243.54459 -1926.6678 -8441.2174 -10450.318 -9514.124 -9665.625 -301.45304 322.2435 1916.9694
20 143.90097 -2358.3516 70.951764 76.777106 0 0 147.72887 -1933.0976 -7370.463 -7728.4884 -11580.562 -8676.0017 -807.21546 780.4123 2096.7667
30 157.22768 -2375.4639 50.396281 87.108719 0 0 137.505 -1934.7321 -4449.9504 -6946.5881 -7865.3435 -4955.5443 -417.85139 -1004.0926 -36.630383
40 150.92709 -2354.1768 78.484257 53.799494 0 0 132.28375 -1930.8175 353.40845 -939.7978 -4636.1858 475.75837 -1074.4762 -1584.304 -574.27211
50 153.02614 -2388.7287 100.20124 65.814409 0 0 166.01565 -1927.5893 3975.1595 1366.008 426.2343 3887.1078 -1807.1658 -2534.8393 -2118.6912
60 155.01798 -2364.31 92.948309 44.252938 0 0 137.20125 -1928.1435 5793.7978 3521.2541 1421.9416 6110.7678 -1536.937 -2559.5674 -1502.2038
70 166.70629 -2383.4827 76.492455 55.020922 0 0 131.51338 -1930.4622 4743.9587 1916.6786 2839.9241 2670.7568 -169.67855 -187.58379 -2256.4529
80 171.82933 -2388.0347 76.463333 49.138785 0 0 125.60212 -1931.0453 2210.1222 -319.99043 330.98785 -394.25628 -44.858027 252.35533 -1985.0908
90 175.7327 -2423.7974 90.784969 63.725029 0 0 154.51 -1930.3722 -917.58179 -3941.9566 -2568.4278 -3415.3121 196.38051 2366.2885 -263.52434
100 173.73319 -2422.3616 99.761403 57.29505 0 0 157.05645 -1930.2461 -3586.4169 -5733.9943 -5881.4025 -6235.1905 -230.75166 959.02899 406.2349
Loop time of 6.48935 on 32 procs for 100 steps with 648 atoms
Performance: 1.331 ns/day, 18.026 hours/ns, 15.410 timesteps/s
99.8% CPU use with 32 MPI tasks x no OpenMP threads
AMEOBA/HIPPO timing breakdown:
Init time: 0.0357484 0.00553355
Hal time: 0.0364815 0.564704
Mpole time: 0.541384 8.38018
Induce time: 4.89091 75.7073
Polar time: 0.955739 14.794
Total time: 6.46029
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 6.4536 | 6.4614 | 6.4698 | 0.2 | 99.57
Bond | 0.00025488 | 0.00038243 | 0.00051904 | 0.0 | 0.01
Neigh | 0.00033789 | 0.00036365 | 0.00040331 | 0.0 | 0.01
Comm | 0.013439 | 0.021894 | 0.02956 | 2.9 | 0.34
Output | 0.0038126 | 0.0038325 | 0.0040712 | 0.1 | 0.06
Modify | 0.00021256 | 0.00028049 | 0.00035212 | 0.0 | 0.00
Other | | 0.001189 | | | 0.02
Nlocal: 20.25 ave 26 max 12 min
Histogram: 1 1 3 1 2 7 3 11 1 2
Nghost: 1381.97 ave 1413 max 1354 min
Histogram: 3 5 4 0 6 3 1 4 5 1
Neighs: 3079.47 ave 4080 max 1858 min
Histogram: 1 3 1 2 5 6 7 5 0 2
Total # of neighbors = 98543
Ave neighs/atom = 152.07253
Ave special neighs/atom = 2
Neighbor list builds = 2
Dangerous builds = 0
Total wall time: 0:00:06

View File

@ -1,152 +0,0 @@
LAMMPS (24 Mar 2022)
# water box with AMOEBA or HIPPO
units real
boundary p p p
atom_style amoeba
bond_style class2
angle_style amoeba
dihedral_style none
# per-atom properties required by AMOEBA or HIPPO
fix amtype all property/atom i_amtype ghost yes
fix extra all property/atom i_amgroup d_redID d_pval ghost yes
fix extra2 all property/atom i_polaxe d2_xyzaxis 3
# read data file
read_data data.water_box.hippo fix amtype NULL "Tinker Types"
Reading data file ...
orthogonal box = (0 0 0) to (18.643 18.643 18.643)
1 by 1 by 1 MPI processor grid
reading atoms ...
648 atoms
scanning bonds ...
2 = max bonds/atom
scanning angles ...
1 = max angles/atom
reading bonds ...
432 bonds
reading angles ...
216 angles
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of special neighbors
special bonds CPU = 0.000 seconds
read_data CPU = 0.012 seconds
# force field
pair_style hippo
pair_coeff * * hippo_water.prm hippo_water_box.key
special_bonds lj/coul 0.5 0.5 0.5 one/five yes
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0.5 0.5 0.5
special bond factors coul: 0.5 0.5 0.5
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of 1-5 neighbors
2 = max # of special neighbors
special bonds CPU = 0.001 seconds
# thermo output
compute virial all pressure NULL virial
thermo_style custom step temp epair ebond eangle edihed eimp emol etotal press c_virial[*]
dump 1 all custom 10 dump.water_box id type x y z fx fy fz
dump_modify 1 sort id
# zero step run
#run 0
# dynamics
fix 1 all nve
thermo 10
run 100
AMOEBA/HIPPO force field settings
repulsion: cut 7 taper 6 rscale 0 0 1 1
qxfer: cut 7 taper 6 mscale 0 0 0.4 1
dispersion: cut 7 aewald 0.45 bsorder 4 FFT 16 16 16 dspscale 0 0 0.4 1
multipole: cut 7 aewald 0.4 bsorder 5 FFT 24 24 24 mscale 0 0 0.4 1
polar: cut 7 aewald 0.5 bsorder 5 FFT 24 24 24
pscale 0 0 1 1 piscale 0 0 0.5 1 wscale 0.2 1 1 1 d/u scale 0 1
precondition: cut 4.5
generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 9
ghost atom cutoff = 9
binsize = 4.5, bins = 5 5 5
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair hippo, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
AMOEBA/HIPPO group count: 216
Per MPI rank memory allocation (min/avg/max) = 57.8 | 57.8 | 57.8 Mbytes
Step Temp E_pair E_bond E_angle E_dihed E_impro E_mol TotEng Press c_virial[1] c_virial[2] c_virial[3] c_virial[4] c_virial[5] c_virial[6]
0 0 -2188.594 166.82637 77.478353 0 0 244.30473 -1944.2893 -10859.589 -9285.4645 -11598.049 -11695.254 -282.7072 3164.4148 2495.2578
10 100.94691 -2350.192 116.13156 88.56605 0 0 204.69761 -1950.8098 -11480.919 -13574.139 -12190.797 -12798.212 -263.77028 280.62864 1974.1486
20 153.91622 -2358.3058 36.396961 66.22466 0 0 102.62162 -1958.8438 -7778.4529 -8492.3868 -11999.431 -9125.9998 -917.99962 589.09064 1788.2094
30 145.5951 -2343.9956 39.651541 65.833248 0 0 105.48479 -1957.7184 -288.79965 -2574.4466 -3820.4824 -414.28285 -347.51491 -1147.3995 -126.71025
40 126.87801 -2340.2623 102.93951 43.896946 0 0 146.83646 -1948.7309 6766.15 5908.7048 1280.0961 7930.8191 -1085.6811 -1596.6859 -714.82888
50 134.52078 -2358.9232 107.49288 44.253826 0 0 151.74671 -1947.7419 8762.4348 6023.4661 5377.0189 9396.0316 -1629.1364 -1663.1666 -2381.51
60 173.10181 -2374.3854 51.097314 33.03646 0 0 84.133774 -1956.4102 4614.2907 1719.1989 505.79149 4552.3167 -1661.1714 -587.92108 -1380.6732
70 184.86849 -2391.6106 39.916931 35.978152 0 0 75.895083 -1959.1811 -2146.9339 -4993.4021 -4095.6729 -4897.5768 -833.09046 1542.411 -1539.5266
80 164.75795 -2406.3017 101.94229 33.067832 0 0 135.01013 -1953.542 -8779.3265 -10545.409 -10418.702 -12098.858 -1319.194 1750.3511 -275.1272
90 151.17491 -2434.6876 152.21826 41.301673 0 0 193.51993 -1949.6141 -13330.691 -15436.505 -13791.461 -16934.674 149.25497 2289.1026 976.14333
100 166.99163 -2452.5298 143.57768 35.341459 0 0 178.91914 -1951.5533 -14918.51 -16077.49 -17353.738 -18140.466 19.009088 1487.0469 1084.0231
Loop time of 9.27469 on 1 procs for 100 steps with 648 atoms
Performance: 0.932 ns/day, 25.763 hours/ns, 10.782 timesteps/s
99.0% CPU use with 1 MPI tasks x no OpenMP threads
AMEOBA/HIPPO timing breakdown:
Init time: 0.012403 0.00134127
Repulse time: 1.04474 11.2979
Disp time: 0.83125 8.98919
Mpole time: 1.66803 18.0382
Induce time: 3.2846 35.5199
Polar time: 2.12371 22.9659
Qxfer time: 0.282486 3.05482
Total time: 9.24722
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 9.2473 | 9.2473 | 9.2473 | 0.0 | 99.70
Bond | 0.0023727 | 0.0023727 | 0.0023727 | 0.0 | 0.03
Neigh | 0.0055338 | 0.0055338 | 0.0055338 | 0.0 | 0.06
Comm | 0.0021428 | 0.0021428 | 0.0021428 | 0.0 | 0.02
Output | 0.016044 | 0.016044 | 0.016044 | 0.0 | 0.17
Modify | 0.00059122 | 0.00059122 | 0.00059122 | 0.0 | 0.01
Other | | 0.0006893 | | | 0.01
Nlocal: 648 ave 648 max 648 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 4282 ave 4282 max 4282 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 98490 ave 98490 max 98490 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 98490
Ave neighs/atom = 151.99074
Ave special neighs/atom = 2
Neighbor list builds = 2
Dangerous builds = 0
Total wall time: 0:00:09

View File

@ -1,152 +0,0 @@
LAMMPS (24 Mar 2022)
# water box with AMOEBA or HIPPO
units real
boundary p p p
atom_style amoeba
bond_style class2
angle_style amoeba
dihedral_style none
# per-atom properties required by AMOEBA or HIPPO
fix amtype all property/atom i_amtype ghost yes
fix extra all property/atom i_amgroup d_redID d_pval ghost yes
fix extra2 all property/atom i_polaxe d2_xyzaxis 3
# read data file
read_data data.water_box.hippo fix amtype NULL "Tinker Types"
Reading data file ...
orthogonal box = (0 0 0) to (18.643 18.643 18.643)
2 by 4 by 4 MPI processor grid
reading atoms ...
648 atoms
scanning bonds ...
2 = max bonds/atom
scanning angles ...
1 = max angles/atom
reading bonds ...
432 bonds
reading angles ...
216 angles
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0 0 0
special bond factors coul: 0 0 0
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of special neighbors
special bonds CPU = 0.002 seconds
read_data CPU = 0.020 seconds
# force field
pair_style hippo
pair_coeff * * hippo_water.prm hippo_water_box.key
special_bonds lj/coul 0.5 0.5 0.5 one/five yes
Finding 1-2 1-3 1-4 neighbors ...
special bond factors lj: 0.5 0.5 0.5
special bond factors coul: 0.5 0.5 0.5
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of 1-5 neighbors
2 = max # of special neighbors
special bonds CPU = 0.002 seconds
# thermo output
compute virial all pressure NULL virial
thermo_style custom step temp epair ebond eangle edihed eimp emol etotal press c_virial[*]
dump 1 all custom 10 dump.water_box id type x y z fx fy fz
dump_modify 1 sort id
# zero step run
#run 0
# dynamics
fix 1 all nve
thermo 10
run 100
AMOEBA/HIPPO force field settings
repulsion: cut 7 taper 6 rscale 0 0 1 1
qxfer: cut 7 taper 6 mscale 0 0 0.4 1
dispersion: cut 7 aewald 0.45 bsorder 4 FFT 16 16 16 dspscale 0 0 0.4 1
multipole: cut 7 aewald 0.4 bsorder 5 FFT 24 24 24 mscale 0 0 0.4 1
polar: cut 7 aewald 0.5 bsorder 5 FFT 24 24 24
pscale 0 0 1 1 piscale 0 0 0.5 1 wscale 0.2 1 1 1 d/u scale 0 1
precondition: cut 4.5
generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 9
ghost atom cutoff = 9
binsize = 4.5, bins = 5 5 5
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair hippo, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d
bin: standard
AMOEBA/HIPPO group count: 216
Per MPI rank memory allocation (min/avg/max) = 57.03 | 57.04 | 57.3 Mbytes
Step Temp E_pair E_bond E_angle E_dihed E_impro E_mol TotEng Press c_virial[1] c_virial[2] c_virial[3] c_virial[4] c_virial[5] c_virial[6]
0 0 -2188.594 166.82637 77.478353 0 0 244.30473 -1944.2893 -10859.589 -9285.4645 -11598.049 -11695.254 -282.7072 3164.4148 2495.2578
10 100.94691 -2350.192 116.13156 88.56605 0 0 204.69761 -1950.8098 -11480.919 -13574.139 -12190.797 -12798.212 -263.77028 280.62864 1974.1486
20 153.91622 -2358.3058 36.396961 66.22466 0 0 102.62162 -1958.8438 -7778.4529 -8492.3868 -11999.431 -9125.9998 -917.99962 589.09064 1788.2094
30 145.5951 -2343.9956 39.651541 65.833248 0 0 105.48479 -1957.7184 -288.79965 -2574.4466 -3820.4824 -414.28285 -347.51491 -1147.3995 -126.71025
40 126.87801 -2340.2623 102.93951 43.896946 0 0 146.83646 -1948.7309 6766.15 5908.7048 1280.0961 7930.8191 -1085.6811 -1596.6859 -714.82888
50 134.52078 -2358.9232 107.49288 44.253826 0 0 151.74671 -1947.7419 8762.4348 6023.4661 5377.0189 9396.0316 -1629.1364 -1663.1666 -2381.51
60 173.10181 -2374.3854 51.097314 33.03646 0 0 84.133774 -1956.4102 4614.2907 1719.1989 505.79149 4552.3167 -1661.1714 -587.92108 -1380.6732
70 184.86849 -2391.6106 39.916931 35.978152 0 0 75.895083 -1959.1811 -2146.9339 -4993.4021 -4095.6729 -4897.5768 -833.09046 1542.411 -1539.5266
80 164.75795 -2406.3017 101.94229 33.067832 0 0 135.01013 -1953.542 -8779.3265 -10545.409 -10418.702 -12098.858 -1319.194 1750.3511 -275.1272
90 151.17491 -2434.6876 152.21826 41.301673 0 0 193.51993 -1949.6141 -13330.691 -15436.505 -13791.461 -16934.674 149.25497 2289.1026 976.14333
100 166.99163 -2452.5298 143.57768 35.341459 0 0 178.91914 -1951.5533 -14918.51 -16077.49 -17353.738 -18140.466 19.009088 1487.0469 1084.0231
Loop time of 1.60312 on 32 procs for 100 steps with 648 atoms
Performance: 5.389 ns/day, 4.453 hours/ns, 62.378 timesteps/s
99.8% CPU use with 32 MPI tasks x no OpenMP threads
AMEOBA/HIPPO timing breakdown:
Init time: 0.019742 0.012493
Repulse time: 0.0675395 4.27399
Disp time: 0.142632 9.02596
Mpole time: 0.265051 16.7728
Induce time: 0.740525 46.8614
Polar time: 0.332551 21.0442
Qxfer time: 0.0121995 0.772001
Total time: 1.58025
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 1.5773 | 1.5814 | 1.5855 | 0.2 | 98.65
Bond | 0.00015755 | 0.00023663 | 0.0003199 | 0.0 | 0.01
Neigh | 0.00036065 | 0.00038248 | 0.00042908 | 0.0 | 0.02
Comm | 0.01209 | 0.016226 | 0.020477 | 1.7 | 1.01
Output | 0.0037797 | 0.0038027 | 0.0040217 | 0.1 | 0.24
Modify | 0.00010094 | 0.00013624 | 0.00018983 | 0.0 | 0.01
Other | | 0.0008996 | | | 0.06
Nlocal: 20.25 ave 27 max 12 min
Histogram: 1 1 3 1 6 2 10 4 2 2
Nghost: 1379.75 ave 1408 max 1345 min
Histogram: 2 4 1 3 3 4 4 3 2 6
Neighs: 3077.81 ave 4233 max 1858 min
Histogram: 1 3 1 4 5 7 6 2 1 2
Total # of neighbors = 98490
Ave neighs/atom = 151.99074
Ave special neighs/atom = 2
Neighbor list builds = 2
Dangerous builds = 0
Total wall time: 0:00:01

View File

@ -10,6 +10,8 @@
# -bitorsion file = LAMMPS fix bitorsion file to output (required if BiTorsions)
# -nopbc = non-periodic system (default)
# -pbc xhi yhi zhi = periodic system from 0 to hi in each dimension (optional)
# -rep Nx Ny Nz outfile = replicate periodic system by Nx by Ny by Nz (optional)
# outfile = new xyz file to write out, Null if no file
# Author: Steve Plimpton
@ -43,8 +45,10 @@ def error(txt=""):
class XYZfile:
def __init__(self,file):
lines = open(file,'r').readlines()
header = lines[0]
natoms = int(lines[0].split()[0])
id = []
label = []
type = []
x = []
y = []
@ -54,6 +58,7 @@ class XYZfile:
for line in lines[1:natoms+1]:
words = line.split()
id.append(int(words[0]))
label.append(words[1])
x.append(words[2])
y.append(words[3])
z.append(words[4])
@ -61,15 +66,171 @@ class XYZfile:
blist = words[6:]
blist = [int(one) for one in blist]
bonds.append(blist)
self.header = header
self.natoms = natoms
self.id = id
self.label = label
self.type = type
self.x = x
self.y = y
self.z = z
self.bonds = bonds
# set bond images flags in each dim for each bond of each atom
# used for replication of a periodic system
# 0 = bond partner is closer then half box in dim
# -1 = bond partner is on other side of lower box bound in dim
# +1 = bond partner is on other side of upper box bound in dim
def bond_images(self):
xhalfsq = 0.25 * boxhi[0]*boxhi[0]
yhalfsq = 0.25 * boxhi[1]*boxhi[1]
zhalfsq = 0.25 * boxhi[2]*boxhi[2]
x = self.x
y = self.y
z = self.z
bonds = self.bonds
imageflags = []
for i in range(self.natoms):
xi = float(x[i])
yi = float(y[i])
zi = float(z[i])
oneflags = []
for j in bonds[i]:
xj = float(x[j-1])
yj = float(y[j-1])
zj = float(z[j-1])
dx = xi - xj
dy = yi - yj
dz = zi - zj
if dx*dx <= xhalfsq: ximage = 0
elif xi < xj: ximage = -1
elif xi > xj: ximage = 1
if dy*dy <= yhalfsq: yimage = 0
elif yi < yj: yimage = -1
elif yi > yj: yimage = 1
if dz*dz <= zhalfsq: zimage = 0
elif zi < zj: zimage = -1
elif zi > zj: zimage = 1
oneflags.append((ximage,yimage,zimage))
imageflags.append(oneflags)
self.imageflags = imageflags
# replicate system by Nx and Ny and Nz in each dim
# rebuild data structs (except imageflags) in this class
# also alter global boxhi
def replicate(self,nx,ny,nz):
natoms = self.natoms
id = self.id
label = self.label
type = self.type
x = self.x
y = self.y
z = self.z
bonds = self.bonds
imageflags = self.imageflags
xbox = boxhi[0]
ybox = boxhi[1]
zbox = boxhi[2]
idnew = []
labelnew = []
typenew = []
xnew = []
ynew = []
znew = []
bondsnew = []
count = 0
for k in range(nz):
for j in range(ny):
for i in range(nx):
for m in range(natoms):
count += 1
idnew.append(count)
labelnew.append(label[m])
typenew.append(type[m])
xnew.append(str(float(x[m]) + i*xbox))
ynew.append(str(float(y[m]) + j*ybox))
znew.append(str(float(z[m]) + k*zbox))
oneflags = imageflags[m]
onebonds = []
for n,mbond in enumerate(bonds[m]):
# ijk new = which replicated box the mbond atom is in
if oneflags[n][0] == 0: inew = i
elif oneflags[n][0] == -1: inew = i - 1
elif oneflags[n][0] == 1: inew = i + 1
if inew < 0: inew = nx-1
if inew == nx: inew = 0
if oneflags[n][1] == 0: jnew = j
elif oneflags[n][1] == -1: jnew = j - 1
elif oneflags[n][1] == 1: jnew = j + 1
if jnew < 0: jnew = ny-1
if jnew == ny: jnew = 0
if oneflags[n][2] == 0: knew = k
elif oneflags[n][2] == -1: knew = k - 1
elif oneflags[n][2] == 1: knew = k + 1
if knew < 0: knew = nz-1
if knew == nz: knew = 0
# bondnew = replicated atom ID of bond partner
# based on replication box (inew,jnew,knew) that owns it
bondnew = mbond + natoms*(knew*ny*nx + jnew*nx + inew)
onebonds.append(bondnew)
bondsnew.append(onebonds)
self.natoms = natoms * nx*ny*nz
self.id = idnew
self.label = labelnew
self.type = typenew
self.x = xnew
self.y = ynew
self.z = znew
self.bonds = bondsnew
# write out new xyzfile for replicated system
def output(self,outfile):
fp = open(outfile,'w')
words = self.header.split()
print >>fp,self.natoms,"replicated",' '.join(words[1:])
id = self.id
label = self.label
type = self.type
x = self.x
y = self.y
z = self.z
bonds = self.bonds
# NOTE: worry about formatting of line
for i in range(self.natoms):
print >>fp,i+1,label[i],x[i],y[i],z[i],type[i],
for j in bonds[i]: print >>fp,j,
print >>fp
fp.close()
# triplet of atoms in an angle = atom 1,2,3
# atom2 is center atom
# nbonds = number of atoms which atom2 is bonded to
@ -157,6 +318,26 @@ class PRMfile:
iline += 1
return classes,masses
# replicate per-atom data: classes and masses
def replicate_peratom(self,nx,ny,nz):
classes = self.classes
masses = self.masses
natoms = len(self.masses)
classes_new = []
masses_new = []
for k in range(nz):
for j in range(ny):
for i in range(nx):
for m in range(natoms):
classes_new.append(classes[m])
masses_new.append(masses[m])
self.classes = classes_new
self.masses = masses_new
# polarization groups
def polarize(self):
@ -476,6 +657,7 @@ prmfile = ""
datafile = ""
bitorsionfile = ""
pbcflag = 0
repflag = 0
iarg = 0
while iarg < narg:
@ -512,6 +694,15 @@ while iarg < narg:
zhi = float(args[iarg+3])
boxhi = [xhi,yhi,zhi]
iarg += 4
elif args[iarg] == "-rep":
if iarg + 5 > narg: error()
repflag = 1
nxrep = int(args[iarg+1])
nyrep = int(args[iarg+2])
nzrep = int(args[iarg+3])
outxyz = args[iarg+4]
if outxyz == "NULL": outxyz = ""
iarg += 5
else: error()
# error check
@ -519,12 +710,27 @@ while iarg < narg:
if not xyzfile: error("xyzfile not specified")
if not prmfile: error("prmfile not specified")
if not datafile: error("datafile not specified")
if not pbcflag and repflag: error("cannot replicate non-periodic system")
if repflag and (nxrep <= 0 or nyrep <= 0 or nzrep <= 0):
error("replication factors <= 0 not allowed")
# read Tinker xyz and prm files
xyz = XYZfile(xyzfile)
prm = PRMfile(prmfile)
# replicate system if requested
# both in XYZ and PRM classes
if repflag:
xyz.bond_images()
xyz.replicate(nxrep,nyrep,nzrep)
if outxyz: xyz.output(outxyz)
prm.replicate_peratom(nxrep,nyrep,nzrep)
boxhi[0] *= nxrep
boxhi[1] *= nyrep
boxhi[2] *= nzrep
# create LAMMPS box bounds based on pbcflag
natoms = xyz.natoms