diff --git a/examples/python/in.pair_python_coulomb b/examples/python/in.pair_python_coulomb index 87a8fa69c..594459247 100644 --- a/examples/python/in.pair_python_coulomb +++ b/examples/python/in.pair_python_coulomb @@ -1,45 +1,45 @@ units real atom_style full read_data data.spce -pair_style hybrid/overlay python 12.0 coul/long 12.0 +pair_style hybrid/overlay coul/long 12.0 python 12.0 kspace_style pppm 1.0e-6 pair_coeff * * coul/long -pair_coeff * * python potentials.LJCutSPCE OW NULL +pair_coeff * * python py_pot.LJCutSPCE OW NULL pair_modify table 0 bond_style harmonic angle_style harmonic dihedral_style none improper_style none bond_coeff 1 1000.00 1.000 angle_coeff 1 100.0 109.47 special_bonds lj/coul 0.0 0.0 1.0 neighbor 2.0 bin fix 1 all shake 0.0001 20 0 b 1 a 1 fix 2 all nvt temp 300.0 300.0 100.0 # create combined lj/coul table for all atom types # generate tabulated potential from python variant pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW -0.8472 -0.8472 pair_write 1 2 2000 rsq 0.1 12 spce.table OW-HW -0.8472 0.4236 pair_write 2 2 2000 rsq 0.1 12 spce.table HW-HW 0.4236 0.4236 # switch to tabulated potential pair_style table linear 2000 pppm pair_coeff 1 1 spce.table OW-OW pair_coeff 1 2 spce.table OW-HW pair_coeff 2 2 spce.table HW-HW thermo 10 run 100 shell rm spce.table diff --git a/examples/python/in.pair_python_hybrid b/examples/python/in.pair_python_hybrid index 289de18b0..d5db729bd 100644 --- a/examples/python/in.pair_python_hybrid +++ b/examples/python/in.pair_python_hybrid @@ -1,61 +1,61 @@ # 3d Lennard-Jones hybrid units lj atom_style atomic lattice fcc 0.8442 region box block 0 10 0 10 0 10 create_box 2 box create_atoms 1 box mass * 1.0 velocity all create 3.0 87287 pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 write_data hybrid.data write_restart hybrid.restart clear read_restart hybrid.restart pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 fix 1 all nve thermo 50 run 250 clear units lj atom_style atomic read_data hybrid.data pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 shell rm hybrid.data hybrid.restart diff --git a/examples/python/in.pair_python_melt b/examples/python/in.pair_python_melt index 7b3cbf7c4..3f775e665 100644 --- a/examples/python/in.pair_python_melt +++ b/examples/python/in.pair_python_melt @@ -1,58 +1,58 @@ # 3d Lennard-Jones melt units lj atom_style atomic lattice fcc 0.8442 region box block 0 10 0 10 0 10 create_box 1 box create_atoms 1 box mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 write_data melt.data write_restart melt.restart clear read_restart melt.restart pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj fix 1 all nve thermo 50 run 250 clear units lj atom_style atomic read_data melt.data pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 shell rm melt.data melt.restart diff --git a/examples/python/in.pair_python_spce b/examples/python/in.pair_python_spce index d3765ebc3..5bd9e1e23 100644 --- a/examples/python/in.pair_python_spce +++ b/examples/python/in.pair_python_spce @@ -1,28 +1,28 @@ units real atom_style full read_data data.spce -pair_style hybrid/overlay python 12.0 coul/long 12.0 +pair_style hybrid/overlay coul/long 12.0 python 12.0 kspace_style pppm 1.0e-6 pair_coeff * * coul/long -pair_coeff * * python potentials.LJCutSPCE OW NULL +pair_coeff * * python py_pot.LJCutSPCE OW NULL bond_style harmonic angle_style harmonic dihedral_style none improper_style none bond_coeff 1 1000.00 1.000 angle_coeff 1 100.0 109.47 special_bonds lj/coul 0.0 0.0 1.0 neighbor 2.0 bin fix 1 all shake 0.0001 20 0 b 1 a 1 fix 2 all nvt temp 300.0 300.0 100.0 thermo 10 run 100 diff --git a/examples/python/in.pair_python_table b/examples/python/in.pair_python_table index 87dad849c..761a6efd7 100644 --- a/examples/python/in.pair_python_table +++ b/examples/python/in.pair_python_table @@ -1,32 +1,32 @@ # 3d Lennard-Jones melt units lj atom_style atomic lattice fcc 0.8442 region box block 0 10 0 10 0 10 create_box 1 box create_atoms 1 box mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj # generate tabulated potential from python variant -pair_write 1 1 10000 rsq 0.01 2.5 lj_1_1.table LJ +pair_write 1 1 2000 rsq 0.01 2.5 lj_1_1.table LJ -pair_style table linear 10000 +pair_style table linear 2000 pair_coeff 1 1 lj_1_1.table LJ neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 shell rm lj_1_1.table diff --git a/examples/python/log.4May17.pair_python_coulomb.4 b/examples/python/log.4May17.pair_python_coulomb.g++.1 similarity index 77% copy from examples/python/log.4May17.pair_python_coulomb.4 copy to examples/python/log.4May17.pair_python_coulomb.g++.1 index a3b13cfba..67bb3b349 100644 --- a/examples/python/log.4May17.pair_python_coulomb.4 +++ b/examples/python/log.4May17.pair_python_coulomb.g++.1 @@ -1,178 +1,178 @@ LAMMPS (4 May 2017) using 1 OpenMP thread(s) per MPI task units real atom_style full read_data data.spce orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736) - 2 by 2 by 1 MPI processor grid + 1 by 1 by 1 MPI processor grid reading atoms ... 4500 atoms scanning bonds ... 2 = max bonds/atom scanning angles ... 1 = max angles/atom reading bonds ... 3000 bonds reading angles ... 1500 angles 2 = max # of 1-2 neighbors 1 = max # of 1-3 neighbors 1 = max # of 1-4 neighbors 2 = max # of special neighbors -pair_style hybrid/overlay python 12.0 coul/long 12.0 +pair_style hybrid/overlay coul/long 12.0 python 12.0 kspace_style pppm 1.0e-6 pair_coeff * * coul/long -pair_coeff * * python potentials.LJCutSPCE OW NULL +pair_coeff * * python py_pot.LJCutSPCE OW NULL pair_modify table 0 bond_style harmonic angle_style harmonic dihedral_style none improper_style none bond_coeff 1 1000.00 1.000 angle_coeff 1 100.0 109.47 special_bonds lj/coul 0.0 0.0 1.0 2 = max # of 1-2 neighbors 1 = max # of 1-3 neighbors 2 = max # of special neighbors neighbor 2.0 bin fix 1 all shake 0.0001 20 0 b 1 a 1 0 = # of size 2 clusters 0 = # of size 3 clusters 0 = # of size 4 clusters 1500 = # of frozen angles fix 2 all nvt temp 300.0 300.0 100.0 # create combined lj/coul table for all atom types # generate tabulated potential from python variant pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW -0.8472 -0.8472 PPPM initialization ... WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) G vector (1/distance) = 0.279652 grid = 40 40 40 stencil order = 5 estimated absolute RMS force accuracy = 0.000394206 estimated relative force accuracy = 1.18714e-06 using double precision FFTs - 3d grid and FFT values/proc = 34263 16000 + 3d grid and FFT values/proc = 103823 64000 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 = 6 6 6 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair python, perpetual, skip from (2) - attributes: half, newton on - pair build: skip - stencil: none - bin: none - (2) pair coul/long, perpetual + (1) pair coul/long, perpetual attributes: half, newton on pair build: half/bin/newton stencil: half/bin/3d/newton bin: standard + (2) pair python, perpetual, skip from (1) + attributes: half, newton on + pair build: skip + stencil: none + bin: none pair_write 1 2 2000 rsq 0.1 12 spce.table OW-HW -0.8472 0.4236 PPPM initialization ... WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) G vector (1/distance) = 0.279652 grid = 40 40 40 stencil order = 5 estimated absolute RMS force accuracy = 0.000394206 estimated relative force accuracy = 1.18714e-06 using double precision FFTs - 3d grid and FFT values/proc = 34263 16000 + 3d grid and FFT values/proc = 103823 64000 pair_write 2 2 2000 rsq 0.1 12 spce.table HW-HW 0.4236 0.4236 PPPM initialization ... WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) G vector (1/distance) = 0.279652 grid = 40 40 40 stencil order = 5 estimated absolute RMS force accuracy = 0.000394206 estimated relative force accuracy = 1.18714e-06 using double precision FFTs - 3d grid and FFT values/proc = 34263 16000 + 3d grid and FFT values/proc = 103823 64000 # switch to tabulated potential pair_style table linear 2000 pppm pair_coeff 1 1 spce.table OW-OW pair_coeff 1 2 spce.table OW-HW pair_coeff 2 2 spce.table HW-HW thermo 10 run 100 PPPM initialization ... WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) G vector (1/distance) = 0.279652 grid = 40 40 40 stencil order = 5 estimated absolute RMS force accuracy = 0.000394674 estimated relative force accuracy = 1.18855e-06 using double precision FFTs - 3d grid and FFT values/proc = 34263 16000 + 3d grid and FFT values/proc = 103823 64000 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 = 6 6 6 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair table, 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) = 13.05 | 13.05 | 13.05 Mbytes +Per MPI rank memory allocation (min/avg/max) = 35.26 | 35.26 | 35.26 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -100272.97 0 -100272.97 -1282.0708 10 120.61568 -101350.63 0 -100272.39 -4077.5051 20 136.11379 -101465.43 0 -100248.65 -5136.5677 30 137.01602 -101455.3 0 -100230.46 -5347.8311 40 153.424 -101582.46 0 -100210.93 -5223.1676 50 167.73654 -101686.24 0 -100186.77 -4468.6687 60 163.11642 -101618.16 0 -100159.99 -3291.7815 70 169.64512 -101647.89 0 -100131.35 -2611.638 80 182.9979 -101737.01 0 -100101.11 -2390.6293 90 191.33873 -101778.71 0 -100068.24 -2239.386 100 194.7458 -101775.84 0 -100034.92 -1951.9128 -Loop time of 2.38392 on 4 procs for 100 steps with 4500 atoms +Loop time of 7.63869 on 1 procs for 100 steps with 4500 atoms -Performance: 3.624 ns/day, 6.622 hours/ns, 41.948 timesteps/s -99.1% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 1.131 ns/day, 21.219 hours/ns, 13.091 timesteps/s +99.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 1.4377 | 1.5465 | 1.6848 | 7.3 | 64.87 -Bond | 0.00010276 | 0.00012648 | 0.0001452 | 0.0 | 0.01 -Kspace | 0.53311 | 0.66842 | 0.77484 | 10.9 | 28.04 -Neigh | 0.066 | 0.066074 | 0.066101 | 0.0 | 2.77 -Comm | 0.045355 | 0.048344 | 0.050747 | 1.0 | 2.03 -Output | 0.00042391 | 0.00044996 | 0.00052667 | 0.0 | 0.02 -Modify | 0.049891 | 0.050191 | 0.050336 | 0.1 | 2.11 -Other | | 0.003771 | | | 0.16 - -Nlocal: 1125 ave 1154 max 1092 min -Histogram: 1 0 0 0 1 0 0 1 0 1 -Nghost: 12256.2 ave 12296 max 12213 min -Histogram: 1 0 1 0 0 0 0 0 1 1 -Neighs: 650442 ave 678824 max 626375 min -Histogram: 1 0 0 0 2 0 0 0 0 1 +Pair | 5.7777 | 5.7777 | 5.7777 | 0.0 | 75.64 +Bond | 0.00017595 | 0.00017595 | 0.00017595 | 0.0 | 0.00 +Kspace | 1.5385 | 1.5385 | 1.5385 | 0.0 | 20.14 +Neigh | 0.22962 | 0.22962 | 0.22962 | 0.0 | 3.01 +Comm | 0.024123 | 0.024123 | 0.024123 | 0.0 | 0.32 +Output | 0.00061131 | 0.00061131 | 0.00061131 | 0.0 | 0.01 +Modify | 0.062444 | 0.062444 | 0.062444 | 0.0 | 0.82 +Other | | 0.005466 | | | 0.07 + +Nlocal: 4500 ave 4500 max 4500 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Nghost: 21216 ave 21216 max 21216 min +Histogram: 1 0 0 0 0 0 0 0 0 0 +Neighs: 2.60177e+06 ave 2.60177e+06 max 2.60177e+06 min +Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 2601766 Ave neighs/atom = 578.17 Ave special neighs/atom = 2 Neighbor list builds = 3 Dangerous builds = 0 shell rm spce.table -Total wall time: 0:00:02 +Total wall time: 0:00:07 diff --git a/examples/python/log.4May17.pair_python_coulomb.4 b/examples/python/log.4May17.pair_python_coulomb.g++.4 similarity index 86% rename from examples/python/log.4May17.pair_python_coulomb.4 rename to examples/python/log.4May17.pair_python_coulomb.g++.4 index a3b13cfba..d5fd15ccd 100644 --- a/examples/python/log.4May17.pair_python_coulomb.4 +++ b/examples/python/log.4May17.pair_python_coulomb.g++.4 @@ -1,178 +1,178 @@ LAMMPS (4 May 2017) using 1 OpenMP thread(s) per MPI task units real atom_style full read_data data.spce orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736) 2 by 2 by 1 MPI processor grid reading atoms ... 4500 atoms scanning bonds ... 2 = max bonds/atom scanning angles ... 1 = max angles/atom reading bonds ... 3000 bonds reading angles ... 1500 angles 2 = max # of 1-2 neighbors 1 = max # of 1-3 neighbors 1 = max # of 1-4 neighbors 2 = max # of special neighbors -pair_style hybrid/overlay python 12.0 coul/long 12.0 +pair_style hybrid/overlay coul/long 12.0 python 12.0 kspace_style pppm 1.0e-6 pair_coeff * * coul/long -pair_coeff * * python potentials.LJCutSPCE OW NULL +pair_coeff * * python py_pot.LJCutSPCE OW NULL pair_modify table 0 bond_style harmonic angle_style harmonic dihedral_style none improper_style none bond_coeff 1 1000.00 1.000 angle_coeff 1 100.0 109.47 special_bonds lj/coul 0.0 0.0 1.0 2 = max # of 1-2 neighbors 1 = max # of 1-3 neighbors 2 = max # of special neighbors neighbor 2.0 bin fix 1 all shake 0.0001 20 0 b 1 a 1 0 = # of size 2 clusters 0 = # of size 3 clusters 0 = # of size 4 clusters 1500 = # of frozen angles fix 2 all nvt temp 300.0 300.0 100.0 # create combined lj/coul table for all atom types # generate tabulated potential from python variant pair_write 1 1 2000 rsq 0.1 12 spce.table OW-OW -0.8472 -0.8472 PPPM initialization ... WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) G vector (1/distance) = 0.279652 grid = 40 40 40 stencil order = 5 estimated absolute RMS force accuracy = 0.000394206 estimated relative force accuracy = 1.18714e-06 using double precision FFTs 3d grid and FFT values/proc = 34263 16000 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 = 6 6 6 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair python, perpetual, skip from (2) - attributes: half, newton on - pair build: skip - stencil: none - bin: none - (2) pair coul/long, perpetual + (1) pair coul/long, perpetual attributes: half, newton on pair build: half/bin/newton stencil: half/bin/3d/newton bin: standard + (2) pair python, perpetual, skip from (1) + attributes: half, newton on + pair build: skip + stencil: none + bin: none pair_write 1 2 2000 rsq 0.1 12 spce.table OW-HW -0.8472 0.4236 PPPM initialization ... WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) G vector (1/distance) = 0.279652 grid = 40 40 40 stencil order = 5 estimated absolute RMS force accuracy = 0.000394206 estimated relative force accuracy = 1.18714e-06 using double precision FFTs 3d grid and FFT values/proc = 34263 16000 pair_write 2 2 2000 rsq 0.1 12 spce.table HW-HW 0.4236 0.4236 PPPM initialization ... WARNING: Using polynomial approximation for long-range coulomb (../kspace.cpp:321) G vector (1/distance) = 0.279652 grid = 40 40 40 stencil order = 5 estimated absolute RMS force accuracy = 0.000394206 estimated relative force accuracy = 1.18714e-06 using double precision FFTs 3d grid and FFT values/proc = 34263 16000 # switch to tabulated potential pair_style table linear 2000 pppm pair_coeff 1 1 spce.table OW-OW pair_coeff 1 2 spce.table OW-HW pair_coeff 2 2 spce.table HW-HW thermo 10 run 100 PPPM initialization ... WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) G vector (1/distance) = 0.279652 grid = 40 40 40 stencil order = 5 estimated absolute RMS force accuracy = 0.000394674 estimated relative force accuracy = 1.18855e-06 using double precision FFTs 3d grid and FFT values/proc = 34263 16000 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 = 6 6 6 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair table, 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) = 13.05 | 13.05 | 13.05 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -100272.97 0 -100272.97 -1282.0708 10 120.61568 -101350.63 0 -100272.39 -4077.5051 20 136.11379 -101465.43 0 -100248.65 -5136.5677 30 137.01602 -101455.3 0 -100230.46 -5347.8311 40 153.424 -101582.46 0 -100210.93 -5223.1676 50 167.73654 -101686.24 0 -100186.77 -4468.6687 60 163.11642 -101618.16 0 -100159.99 -3291.7815 70 169.64512 -101647.89 0 -100131.35 -2611.638 80 182.9979 -101737.01 0 -100101.11 -2390.6293 90 191.33873 -101778.71 0 -100068.24 -2239.386 100 194.7458 -101775.84 0 -100034.92 -1951.9128 -Loop time of 2.38392 on 4 procs for 100 steps with 4500 atoms +Loop time of 2.35848 on 4 procs for 100 steps with 4500 atoms -Performance: 3.624 ns/day, 6.622 hours/ns, 41.948 timesteps/s -99.1% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 3.663 ns/day, 6.551 hours/ns, 42.400 timesteps/s +99.0% 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.4377 | 1.5465 | 1.6848 | 7.3 | 64.87 -Bond | 0.00010276 | 0.00012648 | 0.0001452 | 0.0 | 0.01 -Kspace | 0.53311 | 0.66842 | 0.77484 | 10.9 | 28.04 -Neigh | 0.066 | 0.066074 | 0.066101 | 0.0 | 2.77 -Comm | 0.045355 | 0.048344 | 0.050747 | 1.0 | 2.03 -Output | 0.00042391 | 0.00044996 | 0.00052667 | 0.0 | 0.02 -Modify | 0.049891 | 0.050191 | 0.050336 | 0.1 | 2.11 -Other | | 0.003771 | | | 0.16 +Pair | 1.5061 | 1.5612 | 1.6879 | 5.9 | 66.20 +Bond | 9.5129e-05 | 0.00012672 | 0.00014567 | 0.0 | 0.01 +Kspace | 0.52033 | 0.64456 | 0.69933 | 9.1 | 27.33 +Neigh | 0.066265 | 0.066342 | 0.06644 | 0.0 | 2.81 +Comm | 0.03394 | 0.036139 | 0.038043 | 0.8 | 1.53 +Output | 0.00040889 | 0.00044978 | 0.00056887 | 0.0 | 0.02 +Modify | 0.04557 | 0.045813 | 0.046082 | 0.1 | 1.94 +Other | | 0.003826 | | | 0.16 Nlocal: 1125 ave 1154 max 1092 min Histogram: 1 0 0 0 1 0 0 1 0 1 Nghost: 12256.2 ave 12296 max 12213 min Histogram: 1 0 1 0 0 0 0 0 1 1 Neighs: 650442 ave 678824 max 626375 min Histogram: 1 0 0 0 2 0 0 0 0 1 Total # of neighbors = 2601766 Ave neighs/atom = 578.17 Ave special neighs/atom = 2 Neighbor list builds = 3 Dangerous builds = 0 shell rm spce.table Total wall time: 0:00:02 diff --git a/examples/python/log.4May17.pair_python_hybrid.g++.1 b/examples/python/log.4May17.pair_python_hybrid.g++.1 index d9d3bf53c..497943d4f 100644 --- a/examples/python/log.4May17.pair_python_hybrid.g++.1 +++ b/examples/python/log.4May17.pair_python_hybrid.g++.1 @@ -1,250 +1,247 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task # 3d Lennard-Jones hybrid units lj atom_style atomic lattice fcc 0.8442 Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 region box block 0 10 0 10 0 10 create_box 2 box Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 4000 atoms mass * 1.0 velocity all create 3.0 87287 pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 20 steps, delay 0 steps, check no max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 3 neighbor lists, perpetual/occasional/extra = 3 0 0 (1) pair lj/cut, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (2) pair python, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (3) neighbor class addition, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 4.828 | 4.828 | 4.828 Mbytes Step Temp E_pair E_mol TotEng Press 0 3 -6.7733681 0 -2.2744931 -3.7033504 50 1.6758903 -4.7955425 0 -2.2823355 5.670064 100 1.6458363 -4.7492704 0 -2.2811332 5.8691042 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 -Loop time of 43.2436 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.9463 on 1 procs for 250 steps with 4000 atoms -Performance: 2497.477 tau/day, 5.781 timesteps/s -31.7% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4921.114 tau/day, 11.391 timesteps/s +98.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 42.933 | 42.933 | 42.933 | 0.0 | 99.28 -Neigh | 0.24816 | 0.24816 | 0.24816 | 0.0 | 0.57 -Comm | 0.027748 | 0.027748 | 0.027748 | 0.0 | 0.06 -Output | 0.000519 | 0.000519 | 0.000519 | 0.0 | 0.00 -Modify | 0.028028 | 0.028028 | 0.028028 | 0.0 | 0.06 -Other | | 0.005912 | | | 0.01 +Pair | 21.819 | 21.819 | 21.819 | 0.0 | 99.42 +Neigh | 0.094718 | 0.094718 | 0.094718 | 0.0 | 0.43 +Comm | 0.01407 | 0.01407 | 0.01407 | 0.0 | 0.06 +Output | 0.00024915 | 0.00024915 | 0.00024915 | 0.0 | 0.00 +Modify | 0.015002 | 0.015002 | 0.015002 | 0.0 | 0.07 +Other | | 0.003232 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5499 ave 5499 max 5499 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 0 Ave neighs/atom = 0 Neighbor list builds = 12 Dangerous builds not checked write_data hybrid.data write_restart hybrid.restart clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task read_restart hybrid.restart orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 1 by 1 MPI processor grid 4000 atoms pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 3 neighbor lists, perpetual/occasional/extra = 3 0 0 (1) pair lj/cut, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (2) pair python, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (3) neighbor class addition, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 4.626 | 4.626 | 4.626 Mbytes Step Temp E_pair E_mol TotEng Press 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 300 1.645592 -4.7496711 0 -2.2819002 5.8734193 350 1.6514972 -4.7580756 0 -2.2814491 5.810167 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 -Loop time of 46.2882 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.9098 on 1 procs for 250 steps with 4000 atoms -Performance: 2333.206 tau/day, 5.401 timesteps/s -31.7% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4929.303 tau/day, 11.410 timesteps/s +98.8% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 45.662 | 45.662 | 45.662 | 0.0 | 98.65 -Neigh | 0.55234 | 0.55234 | 0.55234 | 0.0 | 1.19 -Comm | 0.035614 | 0.035614 | 0.035614 | 0.0 | 0.08 -Output | 0.000544 | 0.000544 | 0.000544 | 0.0 | 0.00 -Modify | 0.029269 | 0.029269 | 0.029269 | 0.0 | 0.06 -Other | | 0.008735 | | | 0.02 +Pair | 21.68 | 21.68 | 21.68 | 0.0 | 98.95 +Neigh | 0.19625 | 0.19625 | 0.19625 | 0.0 | 0.90 +Comm | 0.014877 | 0.014877 | 0.014877 | 0.0 | 0.07 +Output | 0.00027227 | 0.00027227 | 0.00027227 | 0.0 | 0.00 +Modify | 0.013663 | 0.013663 | 0.013663 | 0.0 | 0.06 +Other | | 0.004371 | | | 0.02 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5472 ave 5472 max 5472 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 0 Ave neighs/atom = 0 Neighbor list builds = 25 Dangerous builds = 25 clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units lj atom_style atomic read_data hybrid.data orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 1 by 1 MPI processor grid reading atoms ... 4000 atoms reading velocities ... 4000 velocities pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 20 steps, delay 0 steps, check no max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 3 neighbor lists, perpetual/occasional/extra = 3 0 0 (1) pair lj/cut, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (2) pair python, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (3) neighbor class addition, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 4.126 | 4.126 | 4.126 Mbytes Step Temp E_pair E_mol TotEng Press 0 1.6275257 -4.7224992 0 -2.281821 5.9567365 50 1.6454666 -4.7497515 0 -2.2821686 5.8729175 100 1.6512008 -4.7582693 0 -2.2820874 5.8090548 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 -Loop time of 46.4094 on 1 procs for 250 steps with 4000 atoms +Loop time of 22.091 on 1 procs for 250 steps with 4000 atoms -Performance: 2327.115 tau/day, 5.387 timesteps/s -31.6% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4888.868 tau/day, 11.317 timesteps/s +98.8% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 46.066 | 46.066 | 46.066 | 0.0 | 99.26 -Neigh | 0.27099 | 0.27099 | 0.27099 | 0.0 | 0.58 -Comm | 0.033778 | 0.033778 | 0.033778 | 0.0 | 0.07 -Output | 0.000507 | 0.000507 | 0.000507 | 0.0 | 0.00 -Modify | 0.030938 | 0.030938 | 0.030938 | 0.0 | 0.07 -Other | | 0.006695 | | | 0.01 +Pair | 21.966 | 21.966 | 21.966 | 0.0 | 99.43 +Neigh | 0.094647 | 0.094647 | 0.094647 | 0.0 | 0.43 +Comm | 0.013071 | 0.013071 | 0.013071 | 0.0 | 0.06 +Output | 0.00027871 | 0.00027871 | 0.00027871 | 0.0 | 0.00 +Modify | 0.013882 | 0.013882 | 0.013882 | 0.0 | 0.06 +Other | | 0.003102 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5487 ave 5487 max 5487 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 0 ave 0 max 0 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 0 Ave neighs/atom = 0 Neighbor list builds = 12 Dangerous builds not checked shell rm hybrid.data hybrid.restart -Total wall time: 0:02:20 +Total wall time: 0:01:07 diff --git a/examples/python/log.4May17.pair_python_hybrid.g++.4 b/examples/python/log.4May17.pair_python_hybrid.g++.4 index e45514a80..0331f34a5 100644 --- a/examples/python/log.4May17.pair_python_hybrid.g++.4 +++ b/examples/python/log.4May17.pair_python_hybrid.g++.4 @@ -1,250 +1,247 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task # 3d Lennard-Jones hybrid units lj atom_style atomic lattice fcc 0.8442 Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 region box block 0 10 0 10 0 10 create_box 2 box Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 2 by 2 MPI processor grid create_atoms 1 box Created 4000 atoms mass * 1.0 velocity all create 3.0 87287 pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 20 steps, delay 0 steps, check no max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 3 neighbor lists, perpetual/occasional/extra = 3 0 0 (1) pair lj/cut, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (2) pair python, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (3) neighbor class addition, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 3.953 | 3.953 | 3.953 Mbytes Step Temp E_pair E_mol TotEng Press 0 3 -6.7733681 0 -2.2744931 -3.7033504 50 1.6754119 -4.7947589 0 -2.2822693 5.6615925 100 1.6503357 -4.756014 0 -2.2811293 5.8050524 150 1.6596605 -4.7699432 0 -2.2810749 5.7830138 200 1.6371874 -4.7365462 0 -2.2813789 5.9246674 250 1.6323462 -4.7292021 0 -2.2812949 5.9762238 -Loop time of 11.1422 on 4 procs for 250 steps with 4000 atoms +Loop time of 6.01723 on 4 procs for 250 steps with 4000 atoms -Performance: 9692.888 tau/day, 22.437 timesteps/s -35.1% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 17948.472 tau/day, 41.547 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 | 10.448 | 10.772 | 10.937 | 5.9 | 96.67 -Neigh | 0.062061 | 0.062949 | 0.06439 | 0.4 | 0.56 -Comm | 0.12929 | 0.29444 | 0.61802 | 35.8 | 2.64 -Output | 0.000301 | 0.000684 | 0.001824 | 0.0 | 0.01 -Modify | 0.009803 | 0.0098622 | 0.010014 | 0.1 | 0.09 -Other | | 0.002618 | | | 0.02 +Pair | 5.1507 | 5.4989 | 5.9629 | 13.1 | 91.39 +Neigh | 0.024123 | 0.024877 | 0.025959 | 0.5 | 0.41 +Comm | 0.02258 | 0.48785 | 0.83691 | 44.1 | 8.11 +Output | 0.00039768 | 0.00045246 | 0.00052929 | 0.0 | 0.01 +Modify | 0.0036325 | 0.0037773 | 0.0038905 | 0.2 | 0.06 +Other | | 0.001357 | | | 0.02 Nlocal: 1000 ave 1010 max 982 min Histogram: 1 0 0 0 0 0 1 0 0 2 Nghost: 2703.75 ave 2713 max 2689 min Histogram: 1 0 0 0 0 0 0 2 0 1 Neighs: 0 ave 0 max 0 min Histogram: 4 0 0 0 0 0 0 0 0 0 Total # of neighbors = 0 Ave neighs/atom = 0 Neighbor list builds = 12 Dangerous builds not checked write_data hybrid.data write_restart hybrid.restart clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task read_restart hybrid.restart orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 2 by 2 MPI processor grid 4000 atoms pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 3 neighbor lists, perpetual/occasional/extra = 3 0 0 (1) pair lj/cut, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (2) pair python, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (3) neighbor class addition, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 3.612 | 3.612 | 3.612 Mbytes Step Temp E_pair E_mol TotEng Press 250 1.6323462 -4.7292062 0 -2.2812991 5.9762168 300 1.6451788 -4.7488091 0 -2.2816578 5.8375485 350 1.6171909 -4.7064928 0 -2.2813129 6.0094235 400 1.6388136 -4.7387093 0 -2.2811035 5.9331084 450 1.6431295 -4.7452215 0 -2.2811435 5.8929898 500 1.643316 -4.7454222 0 -2.2810644 5.8454817 -Loop time of 11.287 on 4 procs for 250 steps with 4000 atoms +Loop time of 6.09991 on 4 procs for 250 steps with 4000 atoms -Performance: 9568.520 tau/day, 22.149 timesteps/s -34.9% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 17705.179 tau/day, 40.984 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 | 10.274 | 10.76 | 11.02 | 8.8 | 95.33 -Neigh | 0.12639 | 0.1291 | 0.13056 | 0.5 | 1.14 -Comm | 0.12094 | 0.38226 | 0.87078 | 46.7 | 3.39 -Output | 0.000297 | 0.0006965 | 0.001867 | 0.0 | 0.01 -Modify | 0.010445 | 0.010638 | 0.011054 | 0.2 | 0.09 -Other | | 0.003901 | | | 0.03 +Pair | 5.2315 | 5.5179 | 6.0183 | 13.7 | 90.46 +Neigh | 0.049134 | 0.051424 | 0.053837 | 0.8 | 0.84 +Comm | 0.021671 | 0.52455 | 0.8132 | 44.5 | 8.60 +Output | 0.00019336 | 0.00026017 | 0.00032115 | 0.0 | 0.00 +Modify | 0.0036032 | 0.0036635 | 0.0038021 | 0.1 | 0.06 +Other | | 0.002068 | | | 0.03 Nlocal: 1000 ave 1012 max 983 min Histogram: 1 0 0 0 0 0 2 0 0 1 Nghost: 2699 ave 2706 max 2693 min Histogram: 1 1 0 0 0 0 1 0 0 1 Neighs: 0 ave 0 max 0 min Histogram: 4 0 0 0 0 0 0 0 0 0 Total # of neighbors = 0 Ave neighs/atom = 0 Neighbor list builds = 25 Dangerous builds = 25 clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units lj atom_style atomic read_data hybrid.data orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 2 by 2 MPI processor grid reading atoms ... 4000 atoms reading velocities ... 4000 velocities pair_style hybrid lj/cut 2.5 python 2.5 -pair_coeff * * python potentials.LJCutMelt lj NULL +pair_coeff * * python py_pot.LJCutMelt lj NULL pair_coeff * 2 lj/cut 1.0 1.0 neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 20 steps, delay 0 steps, check no max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 3 neighbor lists, perpetual/occasional/extra = 3 0 0 (1) pair lj/cut, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (2) pair python, perpetual, skip from (3) attributes: half, newton on pair build: skip stencil: none bin: none (3) neighbor class addition, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 3.112 | 3.112 | 3.112 Mbytes Step Temp E_pair E_mol TotEng Press 0 1.6323462 -4.7292062 0 -2.2812991 5.9762168 50 1.6450626 -4.7488948 0 -2.2819177 5.8370409 100 1.6169004 -4.7066969 0 -2.2819526 6.0082546 150 1.6384234 -4.7389689 0 -2.2819482 5.9315273 200 1.6428814 -4.7460743 0 -2.2823683 5.8888228 250 1.6432631 -4.7466603 0 -2.2823818 5.8398819 -Loop time of 11.1573 on 4 procs for 250 steps with 4000 atoms +Loop time of 6.04476 on 4 procs for 250 steps with 4000 atoms -Performance: 9679.760 tau/day, 22.407 timesteps/s -35.0% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 17866.705 tau/day, 41.358 timesteps/s +98.3% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 10.166 | 10.713 | 10.932 | 9.7 | 96.01 -Neigh | 0.060687 | 0.062175 | 0.063163 | 0.4 | 0.56 -Comm | 0.14931 | 0.36938 | 0.91686 | 52.5 | 3.31 -Output | 0.00036 | 0.00058175 | 0.001228 | 0.0 | 0.01 -Modify | 0.009918 | 0.010237 | 0.010388 | 0.2 | 0.09 -Other | | 0.002356 | | | 0.02 +Pair | 5.2589 | 5.5841 | 5.9788 | 11.1 | 92.38 +Neigh | 0.023942 | 0.024705 | 0.025509 | 0.4 | 0.41 +Comm | 0.034946 | 0.43056 | 0.75671 | 40.0 | 7.12 +Output | 0.00022149 | 0.00029725 | 0.0003593 | 0.0 | 0.00 +Modify | 0.003613 | 0.0037647 | 0.003829 | 0.1 | 0.06 +Other | | 0.001313 | | | 0.02 Nlocal: 1000 ave 1013 max 989 min Histogram: 1 0 0 1 0 1 0 0 0 1 Nghost: 2695.5 ave 2706 max 2682 min Histogram: 1 0 0 0 0 0 2 0 0 1 Neighs: 0 ave 0 max 0 min Histogram: 4 0 0 0 0 0 0 0 0 0 Total # of neighbors = 0 Ave neighs/atom = 0 Neighbor list builds = 12 Dangerous builds not checked shell rm hybrid.data hybrid.restart -Total wall time: 0:00:35 +Total wall time: 0:00:18 diff --git a/examples/python/log.4May17.pair_python_melt.g++.1 b/examples/python/log.4May17.pair_python_melt.g++.1 index 3459dd4f8..fcb902fb3 100644 --- a/examples/python/log.4May17.pair_python_melt.g++.1 +++ b/examples/python/log.4May17.pair_python_melt.g++.1 @@ -1,217 +1,214 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task # 3d Lennard-Jones melt units lj atom_style atomic lattice fcc 0.8442 Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 region box block 0 10 0 10 0 10 create_box 1 box Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 4000 atoms mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 20 steps, delay 0 steps, check no max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair python, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 3.184 | 3.184 | 3.184 Mbytes Step Temp E_pair E_mol TotEng Press 0 3 -6.7733681 0 -2.2744931 -3.7033504 50 1.6758903 -4.7955425 0 -2.2823355 5.670064 100 1.6458363 -4.7492704 0 -2.2811332 5.8691042 150 1.6324555 -4.7286791 0 -2.280608 5.9589514 200 1.6630725 -4.7750988 0 -2.2811136 5.7364886 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 -Loop time of 24.2466 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.6481 on 1 procs for 250 steps with 4000 atoms -Performance: 4454.233 tau/day, 10.311 timesteps/s -59.9% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4988.899 tau/day, 11.548 timesteps/s +98.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 | 24.079 | 24.079 | 24.079 | 0.0 | 99.31 -Neigh | 0.13174 | 0.13174 | 0.13174 | 0.0 | 0.54 -Comm | 0.016789 | 0.016789 | 0.016789 | 0.0 | 0.07 -Output | 0.000271 | 0.000271 | 0.000271 | 0.0 | 0.00 -Modify | 0.015073 | 0.015073 | 0.015073 | 0.0 | 0.06 -Other | | 0.003428 | | | 0.01 +Pair | 21.529 | 21.529 | 21.529 | 0.0 | 99.45 +Neigh | 0.08819 | 0.08819 | 0.08819 | 0.0 | 0.41 +Comm | 0.013276 | 0.013276 | 0.013276 | 0.0 | 0.06 +Output | 0.00025654 | 0.00025654 | 0.00025654 | 0.0 | 0.00 +Modify | 0.014466 | 0.014466 | 0.014466 | 0.0 | 0.07 +Other | | 0.003143 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5499 ave 5499 max 5499 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 151513 ave 151513 max 151513 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 151513 Ave neighs/atom = 37.8783 Neighbor list builds = 12 Dangerous builds not checked write_data melt.data write_restart melt.restart clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task read_restart melt.restart orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 1 by 1 MPI processor grid 4000 atoms pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair python, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 3.36 | 3.36 | 3.36 Mbytes Step Temp E_pair E_mol TotEng Press 250 1.6275257 -4.7224992 0 -2.281821 5.9567365 300 1.645592 -4.7496711 0 -2.2819002 5.8734193 350 1.6514972 -4.7580756 0 -2.2814491 5.810167 400 1.6540555 -4.7622999 0 -2.281837 5.8200413 450 1.6264734 -4.7200865 0 -2.2809863 5.9546991 500 1.6366891 -4.7350979 0 -2.2806781 5.9369284 -Loop time of 24.3239 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.9592 on 1 procs for 250 steps with 4000 atoms -Performance: 4440.069 tau/day, 10.278 timesteps/s -60.0% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4918.203 tau/day, 11.385 timesteps/s +98.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 | 24.017 | 24.017 | 24.017 | 0.0 | 98.74 -Neigh | 0.26927 | 0.26927 | 0.26927 | 0.0 | 1.11 -Comm | 0.018113 | 0.018113 | 0.018113 | 0.0 | 0.07 -Output | 0.000254 | 0.000254 | 0.000254 | 0.0 | 0.00 -Modify | 0.015259 | 0.015259 | 0.015259 | 0.0 | 0.06 -Other | | 0.004524 | | | 0.02 +Pair | 21.74 | 21.74 | 21.74 | 0.0 | 99.00 +Neigh | 0.18588 | 0.18588 | 0.18588 | 0.0 | 0.85 +Comm | 0.01476 | 0.01476 | 0.01476 | 0.0 | 0.07 +Output | 0.00022244 | 0.00022244 | 0.00022244 | 0.0 | 0.00 +Modify | 0.01356 | 0.01356 | 0.01356 | 0.0 | 0.06 +Other | | 0.004382 | | | 0.02 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5472 ave 5472 max 5472 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 151513 ave 151513 max 151513 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 151513 Ave neighs/atom = 37.8783 Neighbor list builds = 25 Dangerous builds = 25 clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units lj atom_style atomic read_data melt.data orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 1 by 1 MPI processor grid reading atoms ... 4000 atoms reading velocities ... 4000 velocities pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 20 steps, delay 0 steps, check no max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair python, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 2.86 | 2.86 | 2.86 Mbytes Step Temp E_pair E_mol TotEng Press 0 1.6275257 -4.7224992 0 -2.281821 5.9567365 50 1.6454666 -4.7497515 0 -2.2821686 5.8729175 100 1.6512008 -4.7582693 0 -2.2820874 5.8090548 150 1.6537193 -4.7627023 0 -2.2827434 5.8177704 200 1.6258731 -4.7205017 0 -2.2823017 5.952511 250 1.6370862 -4.7373176 0 -2.2823022 5.925807 -Loop time of 22.9051 on 1 procs for 250 steps with 4000 atoms +Loop time of 21.8255 on 1 procs for 250 steps with 4000 atoms -Performance: 4715.116 tau/day, 10.915 timesteps/s -60.1% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 4948.331 tau/day, 11.454 timesteps/s +98.6% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 22.752 | 22.752 | 22.752 | 0.0 | 99.33 -Neigh | 0.12254 | 0.12254 | 0.12254 | 0.0 | 0.53 -Comm | 0.013385 | 0.013385 | 0.013385 | 0.0 | 0.06 -Output | 0.000254 | 0.000254 | 0.000254 | 0.0 | 0.00 -Modify | 0.014159 | 0.014159 | 0.014159 | 0.0 | 0.06 -Other | | 0.002851 | | | 0.01 +Pair | 21.707 | 21.707 | 21.707 | 0.0 | 99.46 +Neigh | 0.088455 | 0.088455 | 0.088455 | 0.0 | 0.41 +Comm | 0.01311 | 0.01311 | 0.01311 | 0.0 | 0.06 +Output | 0.00025082 | 0.00025082 | 0.00025082 | 0.0 | 0.00 +Modify | 0.013836 | 0.013836 | 0.013836 | 0.0 | 0.06 +Other | | 0.003096 | | | 0.01 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 5487 ave 5487 max 5487 min Histogram: 1 0 0 0 0 0 0 0 0 0 Neighs: 151490 ave 151490 max 151490 min Histogram: 1 0 0 0 0 0 0 0 0 0 Total # of neighbors = 151490 Ave neighs/atom = 37.8725 Neighbor list builds = 12 Dangerous builds not checked shell rm melt.data melt.restart -Total wall time: 0:01:13 +Total wall time: 0:01:07 diff --git a/examples/python/log.4May17.pair_python_melt.g++.4 b/examples/python/log.4May17.pair_python_melt.g++.4 index 7e4ba25ac..d504efc4a 100644 --- a/examples/python/log.4May17.pair_python_melt.g++.4 +++ b/examples/python/log.4May17.pair_python_melt.g++.4 @@ -1,217 +1,214 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task # 3d Lennard-Jones melt units lj atom_style atomic lattice fcc 0.8442 Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 region box block 0 10 0 10 0 10 create_box 1 box Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 2 by 2 MPI processor grid create_atoms 1 box Created 4000 atoms mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 20 steps, delay 0 steps, check no max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair python, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 2.69 | 2.69 | 2.69 Mbytes Step Temp E_pair E_mol TotEng Press 0 3 -6.7733681 0 -2.2744931 -3.7033504 50 1.6754119 -4.7947589 0 -2.2822693 5.6615925 100 1.6503357 -4.756014 0 -2.2811293 5.8050524 150 1.6596605 -4.7699432 0 -2.2810749 5.7830138 200 1.6371874 -4.7365462 0 -2.2813789 5.9246674 250 1.6323462 -4.7292021 0 -2.2812949 5.9762238 -Loop time of 12.7083 on 4 procs for 250 steps with 4000 atoms +Loop time of 5.83903 on 4 procs for 250 steps with 4000 atoms -Performance: 8498.384 tau/day, 19.672 timesteps/s -31.5% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 18496.226 tau/day, 42.815 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 | 11.491 | 11.96 | 12.464 | 10.0 | 94.11 -Neigh | 0.065058 | 0.065956 | 0.067066 | 0.3 | 0.52 -Comm | 0.16288 | 0.66706 | 1.1373 | 42.2 | 5.25 -Output | 0.000416 | 0.00085025 | 0.002121 | 0.0 | 0.01 -Modify | 0.010849 | 0.011123 | 0.011321 | 0.2 | 0.09 -Other | | 0.003005 | | | 0.02 +Pair | 5.152 | 5.5209 | 5.7679 | 9.6 | 94.55 +Neigh | 0.022809 | 0.023364 | 0.023891 | 0.3 | 0.40 +Comm | 0.041927 | 0.28952 | 0.65893 | 42.2 | 4.96 +Output | 0.0002389 | 0.00024772 | 0.00026727 | 0.0 | 0.00 +Modify | 0.0036368 | 0.0036796 | 0.0037563 | 0.1 | 0.06 +Other | | 0.001328 | | | 0.02 Nlocal: 1000 ave 1010 max 982 min Histogram: 1 0 0 0 0 0 1 0 0 2 Nghost: 2703.75 ave 2713 max 2689 min Histogram: 1 0 0 0 0 0 0 2 0 1 Neighs: 37915.5 ave 39239 max 36193 min Histogram: 1 0 0 0 0 1 1 0 0 1 Total # of neighbors = 151662 Ave neighs/atom = 37.9155 Neighbor list builds = 12 Dangerous builds not checked write_data melt.data write_restart melt.restart clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task read_restart melt.restart orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 2 by 2 MPI processor grid 4000 atoms pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair python, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 2.815 | 2.816 | 2.816 Mbytes Step Temp E_pair E_mol TotEng Press 250 1.6323462 -4.7292062 0 -2.2812991 5.9762168 300 1.6451788 -4.7488091 0 -2.2816578 5.8375485 350 1.6171909 -4.7064928 0 -2.2813129 6.0094235 400 1.6388136 -4.7387093 0 -2.2811035 5.9331084 450 1.6431295 -4.7452215 0 -2.2811435 5.8929898 500 1.643316 -4.7454222 0 -2.2810644 5.8454817 -Loop time of 12.6852 on 4 procs for 250 steps with 4000 atoms +Loop time of 5.85683 on 4 procs for 250 steps with 4000 atoms -Performance: 8513.855 tau/day, 19.708 timesteps/s -31.6% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 18440.001 tau/day, 42.685 timesteps/s +98.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 11.653 | 11.92 | 12.472 | 9.6 | 93.97 -Neigh | 0.13284 | 0.13556 | 0.13729 | 0.5 | 1.07 -Comm | 0.051389 | 0.60884 | 0.88175 | 43.0 | 4.80 -Output | 0.000362 | 0.0046985 | 0.008143 | 5.1 | 0.04 -Modify | 0.011007 | 0.011344 | 0.011857 | 0.3 | 0.09 -Other | | 0.004278 | | | 0.03 +Pair | 5.2483 | 5.5095 | 5.7744 | 8.0 | 94.07 +Neigh | 0.047228 | 0.047998 | 0.049293 | 0.4 | 0.82 +Comm | 0.027134 | 0.29341 | 0.55554 | 34.6 | 5.01 +Output | 0.00020003 | 0.00021219 | 0.0002358 | 0.0 | 0.00 +Modify | 0.0035472 | 0.0036988 | 0.0038681 | 0.2 | 0.06 +Other | | 0.001984 | | | 0.03 Nlocal: 1000 ave 1012 max 983 min Histogram: 1 0 0 0 0 0 2 0 0 1 Nghost: 2699 ave 2706 max 2693 min Histogram: 1 1 0 0 0 0 1 0 0 1 Neighs: 37930.8 ave 39292 max 36264 min Histogram: 1 0 0 0 1 0 0 1 0 1 Total # of neighbors = 151723 Ave neighs/atom = 37.9308 Neighbor list builds = 25 Dangerous builds = 25 clear -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units lj atom_style atomic read_data melt.data orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 2 by 2 MPI processor grid reading atoms ... 4000 atoms reading velocities ... 4000 velocities pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 20 steps, delay 0 steps, check no max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair python, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 2.315 | 2.316 | 2.316 Mbytes Step Temp E_pair E_mol TotEng Press 0 1.6323462 -4.7292062 0 -2.2812991 5.9762168 50 1.6450626 -4.7488948 0 -2.2819177 5.8370409 100 1.6169004 -4.7066969 0 -2.2819526 6.0082546 150 1.6384234 -4.7389689 0 -2.2819482 5.9315273 200 1.6428814 -4.7460743 0 -2.2823683 5.8888228 250 1.6432631 -4.7466603 0 -2.2823818 5.8398819 -Loop time of 12.5324 on 4 procs for 250 steps with 4000 atoms +Loop time of 5.86684 on 4 procs for 250 steps with 4000 atoms -Performance: 8617.631 tau/day, 19.948 timesteps/s -31.6% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 18408.545 tau/day, 42.612 timesteps/s +98.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 11.648 | 11.918 | 12.387 | 8.3 | 95.10 -Neigh | 0.064038 | 0.06537 | 0.065914 | 0.3 | 0.52 -Comm | 0.065189 | 0.53362 | 0.80384 | 39.4 | 4.26 -Output | 0.000346 | 0.0007525 | 0.001938 | 0.0 | 0.01 -Modify | 0.011255 | 0.01155 | 0.011852 | 0.2 | 0.09 -Other | | 0.002751 | | | 0.02 +Pair | 5.3207 | 5.5695 | 5.8071 | 7.6 | 94.93 +Neigh | 0.023073 | 0.023405 | 0.023834 | 0.2 | 0.40 +Comm | 0.030558 | 0.2686 | 0.51789 | 34.7 | 4.58 +Output | 0.00028825 | 0.00036758 | 0.00042987 | 0.0 | 0.01 +Modify | 0.0034878 | 0.0036733 | 0.0039375 | 0.3 | 0.06 +Other | | 0.001259 | | | 0.02 Nlocal: 1000 ave 1013 max 989 min Histogram: 1 0 0 1 0 1 0 0 0 1 Nghost: 2695.5 ave 2706 max 2682 min Histogram: 1 0 0 0 0 0 2 0 0 1 Neighs: 37927.2 ave 39002 max 36400 min Histogram: 1 0 0 0 1 0 0 0 0 2 Total # of neighbors = 151709 Ave neighs/atom = 37.9273 Neighbor list builds = 12 Dangerous builds not checked shell rm melt.data melt.restart -Total wall time: 0:00:39 +Total wall time: 0:00:18 diff --git a/examples/python/log.4May17.pair_python_spce.g++.1 b/examples/python/log.4May17.pair_python_spce.g++.1 index 4e429b9cd..1a535df0e 100644 --- a/examples/python/log.4May17.pair_python_spce.g++.1 +++ b/examples/python/log.4May17.pair_python_spce.g++.1 @@ -1,123 +1,122 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units real atom_style full read_data data.spce orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736) 1 by 1 by 1 MPI processor grid reading atoms ... 4500 atoms scanning bonds ... 2 = max bonds/atom scanning angles ... 1 = max angles/atom reading bonds ... 3000 bonds reading angles ... 1500 angles 2 = max # of 1-2 neighbors 1 = max # of 1-3 neighbors 1 = max # of 1-4 neighbors 2 = max # of special neighbors -pair_style hybrid/overlay python 12.0 coul/long 12.0 +pair_style hybrid/overlay coul/long 12.0 python 12.0 kspace_style pppm 1.0e-6 pair_coeff * * coul/long -pair_coeff * * python potentials.LJCutSPCE OW NULL +pair_coeff * * python py_pot.LJCutSPCE OW NULL bond_style harmonic angle_style harmonic dihedral_style none improper_style none bond_coeff 1 1000.00 1.000 angle_coeff 1 100.0 109.47 special_bonds lj/coul 0.0 0.0 1.0 2 = max # of 1-2 neighbors 1 = max # of 1-3 neighbors 2 = max # of special neighbors neighbor 2.0 bin fix 1 all shake 0.0001 20 0 b 1 a 1 0 = # of size 2 clusters 0 = # of size 3 clusters 0 = # of size 4 clusters 1500 = # of frozen angles fix 2 all nvt temp 300.0 300.0 100.0 thermo 10 run 100 PPPM initialization ... WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) G vector (1/distance) = 0.279652 grid = 40 40 40 stencil order = 5 estimated absolute RMS force accuracy = 0.000394674 estimated relative force accuracy = 1.18855e-06 using double precision FFTs 3d grid and FFT values/proc = 103823 64000 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 = 6 6 6 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair python, perpetual, skip from (2) - attributes: half, newton on - pair build: skip - stencil: none - bin: none - (2) pair coul/long, perpetual + (1) pair coul/long, perpetual attributes: half, newton on pair build: half/bin/newton stencil: half/bin/3d/newton bin: standard + (2) pair python, perpetual, skip from (1) + attributes: half, newton on + pair build: skip + stencil: none + bin: none Per MPI rank memory allocation (min/avg/max) = 41.05 | 41.05 | 41.05 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -16692.369 0 -16692.369 -1289.222 10 120.56861 -17769.719 0 -16691.902 -4082.7098 20 136.08014 -17884.591 0 -16668.109 -5140.7824 30 136.97316 -17874.351 0 -16649.887 -5351.3571 40 153.37285 -18001.493 0 -16630.424 -5227.0601 50 167.70414 -18105.435 0 -16606.252 -4473.2089 60 163.08253 -18037.29 0 -16579.422 -3295.8963 70 169.60395 -18067.078 0 -16550.912 -2615.7026 80 182.94811 -18155.978 0 -16520.523 -2393.3156 90 191.29902 -18197.887 0 -16487.779 -2242.7104 100 194.70949 -18195.021 0 -16454.425 -1955.2916 -Loop time of 63.3145 on 1 procs for 100 steps with 4500 atoms +Loop time of 23.0818 on 1 procs for 100 steps with 4500 atoms -Performance: 0.136 ns/day, 175.874 hours/ns, 1.579 timesteps/s -86.0% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 0.374 ns/day, 64.116 hours/ns, 4.332 timesteps/s +98.9% CPU use with 1 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 61.815 | 61.815 | 61.815 | 0.0 | 97.63 -Bond | 0.000132 | 0.000132 | 0.000132 | 0.0 | 0.00 -Kspace | 1.2226 | 1.2226 | 1.2226 | 0.0 | 1.93 -Neigh | 0.21684 | 0.21684 | 0.21684 | 0.0 | 0.34 -Comm | 0.015175 | 0.015175 | 0.015175 | 0.0 | 0.02 -Output | 0.000405 | 0.000405 | 0.000405 | 0.0 | 0.00 -Modify | 0.040088 | 0.040088 | 0.040088 | 0.0 | 0.06 -Other | | 0.003896 | | | 0.01 +Pair | 21.186 | 21.186 | 21.186 | 0.0 | 91.79 +Bond | 0.00022054 | 0.00022054 | 0.00022054 | 0.0 | 0.00 +Kspace | 1.5442 | 1.5442 | 1.5442 | 0.0 | 6.69 +Neigh | 0.25672 | 0.25672 | 0.25672 | 0.0 | 1.11 +Comm | 0.023787 | 0.023787 | 0.023787 | 0.0 | 0.10 +Output | 0.00060248 | 0.00060248 | 0.00060248 | 0.0 | 0.00 +Modify | 0.064809 | 0.064809 | 0.064809 | 0.0 | 0.28 +Other | | 0.005301 | | | 0.02 Nlocal: 4500 ave 4500 max 4500 min Histogram: 1 0 0 0 0 0 0 0 0 0 Nghost: 21216 ave 21216 max 21216 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 1.44594e+06 ave 1.44594e+06 max 1.44594e+06 min +Neighs: 2.60176e+06 ave 2.60176e+06 max 2.60176e+06 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 1445935 -Ave neighs/atom = 321.319 +Total # of neighbors = 2601762 +Ave neighs/atom = 578.169 Ave special neighs/atom = 2 Neighbor list builds = 3 Dangerous builds = 0 -Total wall time: 0:01:05 +Total wall time: 0:00:23 diff --git a/examples/python/log.4May17.pair_python_spce.g++.4 b/examples/python/log.4May17.pair_python_spce.g++.4 index 15c11cd37..c27766328 100644 --- a/examples/python/log.4May17.pair_python_spce.g++.4 +++ b/examples/python/log.4May17.pair_python_spce.g++.4 @@ -1,123 +1,122 @@ LAMMPS (4 May 2017) -OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90) using 1 OpenMP thread(s) per MPI task units real atom_style full read_data data.spce orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736) 2 by 2 by 1 MPI processor grid reading atoms ... 4500 atoms scanning bonds ... 2 = max bonds/atom scanning angles ... 1 = max angles/atom reading bonds ... 3000 bonds reading angles ... 1500 angles 2 = max # of 1-2 neighbors 1 = max # of 1-3 neighbors 1 = max # of 1-4 neighbors 2 = max # of special neighbors -pair_style hybrid/overlay python 12.0 coul/long 12.0 +pair_style hybrid/overlay coul/long 12.0 python 12.0 kspace_style pppm 1.0e-6 pair_coeff * * coul/long -pair_coeff * * python potentials.LJCutSPCE OW NULL +pair_coeff * * python py_pot.LJCutSPCE OW NULL bond_style harmonic angle_style harmonic dihedral_style none improper_style none bond_coeff 1 1000.00 1.000 angle_coeff 1 100.0 109.47 special_bonds lj/coul 0.0 0.0 1.0 2 = max # of 1-2 neighbors 1 = max # of 1-3 neighbors 2 = max # of special neighbors neighbor 2.0 bin fix 1 all shake 0.0001 20 0 b 1 a 1 0 = # of size 2 clusters 0 = # of size 3 clusters 0 = # of size 4 clusters 1500 = # of frozen angles fix 2 all nvt temp 300.0 300.0 100.0 thermo 10 run 100 PPPM initialization ... WARNING: Using 12-bit tables for long-range coulomb (../kspace.cpp:321) G vector (1/distance) = 0.279652 grid = 40 40 40 stencil order = 5 estimated absolute RMS force accuracy = 0.000394674 estimated relative force accuracy = 1.18855e-06 using double precision FFTs 3d grid and FFT values/proc = 34263 16000 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 = 6 6 6 2 neighbor lists, perpetual/occasional/extra = 2 0 0 - (1) pair python, perpetual, skip from (2) - attributes: half, newton on - pair build: skip - stencil: none - bin: none - (2) pair coul/long, perpetual + (1) pair coul/long, perpetual attributes: half, newton on pair build: half/bin/newton stencil: half/bin/3d/newton bin: standard + (2) pair python, perpetual, skip from (1) + attributes: half, newton on + pair build: skip + stencil: none + bin: none Per MPI rank memory allocation (min/avg/max) = 14.59 | 14.59 | 14.59 Mbytes Step Temp E_pair E_mol TotEng Press 0 0 -16692.369 0 -16692.369 -1289.222 10 120.56861 -17769.719 0 -16691.902 -4082.7098 20 136.08014 -17884.591 0 -16668.109 -5140.7824 30 136.97316 -17874.351 0 -16649.887 -5351.3571 40 153.37285 -18001.493 0 -16630.424 -5227.0601 50 167.70414 -18105.435 0 -16606.252 -4473.2089 60 163.08253 -18037.29 0 -16579.422 -3295.8963 70 169.60395 -18067.078 0 -16550.912 -2615.7026 80 182.94811 -18155.978 0 -16520.523 -2393.3156 90 191.29902 -18197.887 0 -16487.779 -2242.7104 100 194.70949 -18195.021 0 -16454.425 -1955.2916 -Loop time of 29.6024 on 4 procs for 100 steps with 4500 atoms +Loop time of 6.588 on 4 procs for 100 steps with 4500 atoms -Performance: 0.292 ns/day, 82.229 hours/ns, 3.378 timesteps/s -52.5% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 1.311 ns/day, 18.300 hours/ns, 15.179 timesteps/s +98.4% CPU use with 4 MPI tasks x 1 OpenMP threads MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total --------------------------------------------------------------- -Pair | 26.631 | 27.507 | 28.649 | 14.3 | 92.92 -Bond | 0.00021 | 0.00022675 | 0.000248 | 0.0 | 0.00 -Kspace | 0.72315 | 1.8708 | 2.7365 | 54.7 | 6.32 -Neigh | 0.10667 | 0.1067 | 0.10674 | 0.0 | 0.36 -Comm | 0.045357 | 0.054035 | 0.064607 | 3.6 | 0.18 -Output | 0.000424 | 0.00086625 | 0.002189 | 0.0 | 0.00 -Modify | 0.056602 | 0.056667 | 0.056763 | 0.0 | 0.19 -Other | | 0.006337 | | | 0.02 +Pair | 5.3756 | 5.5417 | 5.8745 | 8.3 | 84.12 +Bond | 0.0001049 | 0.00013965 | 0.0001812 | 0.0 | 0.00 +Kspace | 0.54765 | 0.87786 | 1.042 | 20.8 | 13.33 +Neigh | 0.072695 | 0.072884 | 0.072973 | 0.0 | 1.11 +Comm | 0.04138 | 0.043576 | 0.045475 | 0.7 | 0.66 +Output | 0.00041032 | 0.00043947 | 0.00052142 | 0.0 | 0.01 +Modify | 0.047381 | 0.047567 | 0.047745 | 0.1 | 0.72 +Other | | 0.003845 | | | 0.06 Nlocal: 1125 ave 1154 max 1092 min Histogram: 1 0 0 0 1 0 0 1 0 1 Nghost: 12256.2 ave 12296 max 12213 min Histogram: 1 0 1 0 0 0 0 0 1 1 -Neighs: 361484 ave 376583 max 347969 min +Neighs: 650440 ave 678828 max 626375 min Histogram: 1 0 0 0 2 0 0 0 0 1 -Total # of neighbors = 1445935 -Ave neighs/atom = 321.319 +Total # of neighbors = 2601762 +Ave neighs/atom = 578.169 Ave special neighs/atom = 2 Neighbor list builds = 3 Dangerous builds = 0 -Total wall time: 0:00:30 +Total wall time: 0:00:06 diff --git a/examples/python/log.4May17.pair_python_table.g++.1 b/examples/python/log.4May17.pair_python_table.g++.1 index 21d42693b..bd3e86501 100644 --- a/examples/python/log.4May17.pair_python_table.g++.1 +++ b/examples/python/log.4May17.pair_python_table.g++.1 @@ -1,99 +1,99 @@ LAMMPS (4 May 2017) using 1 OpenMP thread(s) per MPI task # 3d Lennard-Jones melt units lj atom_style atomic lattice fcc 0.8442 Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 region box block 0 10 0 10 0 10 create_box 1 box Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 1 by 1 MPI processor grid create_atoms 1 box Created 4000 atoms mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj # generate tabulated potential from python variant -pair_write 1 1 10000 rsq 0.01 2.5 lj_1_1.table LJ +pair_write 1 1 2000 rsq 0.01 2.5 lj_1_1.table LJ Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair python, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard -pair_style table linear 10000 +pair_style table linear 2000 pair_coeff 1 1 lj_1_1.table LJ -WARNING: 1 of 1000 force values in table are inconsistent with -dE/dr. +WARNING: 2 of 2000 force values in table are inconsistent with -dE/dr. Should only be flagged at inflection points (../pair_table.cpp:476) neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 20 steps, delay 0 steps, check no max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair table, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 3.184 | 3.184 | 3.184 Mbytes Step Temp E_pair E_mol TotEng Press - 0 3 -6.7733675 0 -2.2744925 -3.7033435 - 50 1.6758875 -4.7951764 0 -2.2819736 5.6705794 - 100 1.6458266 -4.7488945 0 -2.2807717 5.8696895 - 150 1.6324439 -4.7283321 0 -2.2802784 5.9594952 - 200 1.6630547 -4.7746809 0 -2.2807225 5.7372657 - 250 1.6278968 -4.7226363 0 -2.2814016 5.9559236 -Loop time of 1.0498 on 1 procs for 250 steps with 4000 atoms + 0 3 -6.7733629 0 -2.2744879 -3.7032813 + 50 1.6758731 -4.7953067 0 -2.2821255 5.6706553 + 100 1.6458118 -4.7490281 0 -2.2809276 5.8697466 + 150 1.632425 -4.7284533 0 -2.2804279 5.9595684 + 200 1.6631578 -4.7749889 0 -2.2808759 5.7365839 + 250 1.6277062 -4.7224727 0 -2.2815238 5.9572913 +Loop time of 0.996652 on 1 procs for 250 steps with 4000 atoms -Performance: 102877.190 tau/day, 238.142 timesteps/s -99.7% CPU use with 1 MPI tasks x 1 OpenMP threads +Performance: 108362.785 tau/day, 250.840 timesteps/s +99.8% 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.93242 | 0.93242 | 0.93242 | 0.0 | 88.82 -Neigh | 0.088495 | 0.088495 | 0.088495 | 0.0 | 8.43 -Comm | 0.012153 | 0.012153 | 0.012153 | 0.0 | 1.16 -Output | 0.00013924 | 0.00013924 | 0.00013924 | 0.0 | 0.01 -Modify | 0.013729 | 0.013729 | 0.013729 | 0.0 | 1.31 -Other | | 0.002855 | | | 0.27 +Pair | 0.87999 | 0.87999 | 0.87999 | 0.0 | 88.29 +Neigh | 0.087921 | 0.087921 | 0.087921 | 0.0 | 8.82 +Comm | 0.012098 | 0.012098 | 0.012098 | 0.0 | 1.21 +Output | 0.00013614 | 0.00013614 | 0.00013614 | 0.0 | 0.01 +Modify | 0.01363 | 0.01363 | 0.01363 | 0.0 | 1.37 +Other | | 0.002882 | | | 0.29 Nlocal: 4000 ave 4000 max 4000 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Nghost: 5504 ave 5504 max 5504 min +Nghost: 5500 ave 5500 max 5500 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Neighs: 151497 ave 151497 max 151497 min +Neighs: 151496 ave 151496 max 151496 min Histogram: 1 0 0 0 0 0 0 0 0 0 -Total # of neighbors = 151497 -Ave neighs/atom = 37.8743 +Total # of neighbors = 151496 +Ave neighs/atom = 37.874 Neighbor list builds = 12 Dangerous builds not checked shell rm lj_1_1.table Total wall time: 0:00:01 diff --git a/examples/python/log.4May17.pair_python_table.g++.4 b/examples/python/log.4May17.pair_python_table.g++.4 index a64ebd663..8dfe82097 100644 --- a/examples/python/log.4May17.pair_python_table.g++.4 +++ b/examples/python/log.4May17.pair_python_table.g++.4 @@ -1,99 +1,99 @@ LAMMPS (4 May 2017) using 1 OpenMP thread(s) per MPI task # 3d Lennard-Jones melt units lj atom_style atomic lattice fcc 0.8442 Lattice spacing in x,y,z = 1.6796 1.6796 1.6796 region box block 0 10 0 10 0 10 create_box 1 box Created orthogonal box = (0 0 0) to (16.796 16.796 16.796) 1 by 2 by 2 MPI processor grid create_atoms 1 box Created 4000 atoms mass * 1.0 velocity all create 3.0 87287 pair_style python 2.5 -pair_coeff * * potentials.LJCutMelt lj +pair_coeff * * py_pot.LJCutMelt lj # generate tabulated potential from python variant -pair_write 1 1 10000 rsq 0.01 2.5 lj_1_1.table LJ +pair_write 1 1 2000 rsq 0.01 2.5 lj_1_1.table LJ Neighbor list info ... update every 1 steps, delay 10 steps, check yes max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair python, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard -pair_style table linear 10000 +pair_style table linear 2000 pair_coeff 1 1 lj_1_1.table LJ -WARNING: 1 of 10000 force values in table are inconsistent with -dE/dr. +WARNING: 2 of 2000 force values in table are inconsistent with -dE/dr. Should only be flagged at inflection points (../pair_table.cpp:476) neighbor 0.3 bin neigh_modify every 20 delay 0 check no fix 1 all nve thermo 50 run 250 Neighbor list info ... update every 20 steps, delay 0 steps, check no max neighbors/atom: 2000, page size: 100000 master list distance cutoff = 2.8 ghost atom cutoff = 2.8 binsize = 1.4, bins = 12 12 12 1 neighbor lists, perpetual/occasional/extra = 1 0 0 (1) pair table, perpetual attributes: half, newton on pair build: half/bin/atomonly/newton stencil: half/bin/3d/newton bin: standard Per MPI rank memory allocation (min/avg/max) = 2.69 | 2.69 | 2.69 Mbytes Step Temp E_pair E_mol TotEng Press - 0 3 -6.7733675 0 -2.2744925 -3.7033435 - 50 1.6754092 -4.794723 0 -2.2822376 5.6616601 - 100 1.6503295 -4.7559815 0 -2.2811061 5.8051261 - 150 1.6596603 -4.7699379 0 -2.2810699 5.7830168 - 200 1.6371948 -4.7365549 0 -2.2813766 5.9245585 - 250 1.6321199 -4.7288017 0 -2.2812339 5.9776124 -Loop time of 0.313548 on 4 procs for 250 steps with 4000 atoms + 0 3 -6.7733629 0 -2.2744879 -3.7032813 + 50 1.675395 -4.7945736 0 -2.2821094 5.6620623 + 100 1.6503067 -4.7558145 0 -2.2809733 5.8055967 + 150 1.6595852 -4.7697199 0 -2.2809644 5.7837898 + 200 1.6371471 -4.7363942 0 -2.2812874 5.924977 + 250 1.6315623 -4.7278268 0 -2.2810951 5.9807196 +Loop time of 0.300176 on 4 procs for 250 steps with 4000 atoms -Performance: 344444.576 tau/day, 797.325 timesteps/s -99.1% CPU use with 4 MPI tasks x 1 OpenMP threads +Performance: 359789.395 tau/day, 832.846 timesteps/s +99.3% 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.24963 | 0.25443 | 0.2632 | 1.1 | 81.15 -Neigh | 0.023249 | 0.023735 | 0.024497 | 0.3 | 7.57 -Comm | 0.020689 | 0.030402 | 0.035249 | 3.4 | 9.70 -Output | 0.00020766 | 0.00021476 | 0.00023031 | 0.0 | 0.07 -Modify | 0.0034959 | 0.0035564 | 0.0036762 | 0.1 | 1.13 -Other | | 0.001206 | | | 0.38 +Pair | 0.23104 | 0.23876 | 0.2451 | 1.2 | 79.54 +Neigh | 0.022763 | 0.023687 | 0.024305 | 0.4 | 7.89 +Comm | 0.025416 | 0.032499 | 0.041304 | 3.7 | 10.83 +Output | 0.00015378 | 0.00016057 | 0.00017667 | 0.0 | 0.05 +Modify | 0.0035894 | 0.0036637 | 0.0037456 | 0.1 | 1.22 +Other | | 0.001409 | | | 0.47 -Nlocal: 1000 ave 1010 max 982 min +Nlocal: 1000 ave 1010 max 981 min Histogram: 1 0 0 0 0 0 1 0 0 2 -Nghost: 2703.75 ave 2713 max 2689 min -Histogram: 1 0 0 0 0 0 0 2 0 1 -Neighs: 37915.5 ave 39231 max 36202 min +Nghost: 2703 ave 2715 max 2688 min Histogram: 1 0 0 0 0 1 1 0 0 1 +Neighs: 37915.2 ave 39191 max 36151 min +Histogram: 1 0 0 0 0 1 0 1 0 1 -Total # of neighbors = 151662 -Ave neighs/atom = 37.9155 +Total # of neighbors = 151661 +Ave neighs/atom = 37.9153 Neighbor list builds = 12 Dangerous builds not checked shell rm lj_1_1.table Total wall time: 0:00:00 diff --git a/examples/python/py_pot.py b/examples/python/py_pot.py index dbce8cd44..5699bd082 100644 --- a/examples/python/py_pot.py +++ b/examples/python/py_pot.py @@ -1,73 +1,65 @@ from __future__ import print_function -class LJCutMelt(object): - +class LAMMPSPairPotential(object): def __init__(self): self.pmap=dict() - # set coeffs: eps, sig, 48*eps*sig**12, 24*eps*sig**6, - # 4*eps*sig**12, 4*eps*sig**6 - self.coeff = {'lj' : {'lj' : (1.0,1.0,48.0,24.0,4.0,4.0), - 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}, - 'NULL': {'lj' : (0.0,1.0, 0.0, 0.0,0.0,0.0), - 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}} + self.units='lj' + def map_coeff(self,name,ltype): + self.pmap[ltype]=name + def check_units(self,units): + if (units != self.units): + raise Exception("Conflicting units: %s vs. %s" % (self.units,units)) - def map_coeff(self,name,type): - if name in self.coeff: - self.pmap[type] = name - else: - raise Exception("cannot match atom type %s" % name) +class LJCutMelt(LAMMPSPairPotential): + def __init__(self): + super(LJCutMelt,self).__init__() + # set coeffs: 48*eps*sig**12, 24*eps*sig**6, + # 4*eps*sig**12, 4*eps*sig**6 + self.units = 'lj' + self.coeff = {'lj' : {'lj' : (48.0,24.0,4.0,4.0)}} def compute_force(self,rsq,itype,jtype): coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj1 = coeff[2] - lj2 = coeff[3] - return (r6inv * (lj1*r6inv - lj2)) + lj1 = coeff[0] + lj2 = coeff[1] + return (r6inv * (lj1*r6inv - lj2))*r2inv def compute_energy(self,rsq,itype,jtype): coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj3 = coeff[4] - lj4 = coeff[5] + lj3 = coeff[2] + lj4 = coeff[3] return (r6inv * (lj3*r6inv - lj4)) -class LJCutSPCE(object): +class LJCutSPCE(LAMMPSPairPotential): def __init__(self): - self.pmap=dict() - # SPCE oxygen in real units + super(LJCutSPCE,self).__init__() + self.units='real' + # SPCE oxygen LJ parameters in real units eps=0.15535 sig=3.166 - - # set coeffs: eps, sig, 48*eps*sig**12, 24*eps*sig**6, - # 4*eps*sig**12, 4*eps*sig**6 - self.coeff = {'OW' : {'OW' : (1.0,1.0, - 48.0*eps*sig**12,24.0*eps*sig**6, - 4.0*eps*sig**12, 4.0*eps*sig**6), - 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}, - 'NULL': {'OW' : (0.0,1.0, 0.0, 0.0,0.0,0.0), - 'NULL': (0.0,1.0, 0.0, 0.0,0.0,0.0)}} - - def map_coeff(self,name,type): - if name in self.coeff: - self.pmap[type] = name - else: - raise Exception("cannot match atom type %s" % name) + self.coeff = {'OW' : {'OW' : (48.0*eps*sig**12,24.0*eps*sig**6, + 4.0*eps*sig**12, 4.0*eps*sig**6), + 'HW' : (0.0,0.0, 0.0,0.0)}, + 'HW' : {'OW' : (0.0,0.0, 0.0,0.0), + 'HW' : (0.0,0.0, 0.0,0.0)}} def compute_force(self,rsq,itype,jtype): coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj1 = coeff[2] - lj2 = coeff[3] - return (r6inv * (lj1*r6inv - lj2)) + lj1 = coeff[0] + lj2 = coeff[1] + return (r6inv * (lj1*r6inv - lj2))*r2inv def compute_energy(self,rsq,itype,jtype): coeff = self.coeff[self.pmap[itype]][self.pmap[jtype]] r2inv = 1.0/rsq r6inv = r2inv*r2inv*r2inv - lj3 = coeff[4] - lj4 = coeff[5] + lj3 = coeff[2] + lj4 = coeff[3] return (r6inv * (lj3*r6inv - lj4)) diff --git a/src/PYTHON/pair_python.cpp b/src/PYTHON/pair_python.cpp index 1d80145c5..384aa5a94 100644 --- a/src/PYTHON/pair_python.cpp +++ b/src/PYTHON/pair_python.cpp @@ -1,435 +1,483 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing authors: Axel Kohlmeyer and Richard Berger (Temple U) ------------------------------------------------------------------------- */ #include #include #include #include #include "pair_python.h" #include "atom.h" #include "comm.h" #include "force.h" #include "memory.h" +#include "update.h" #include "neigh_list.h" #include "python.h" #include "error.h" #include "python_compat.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ PairPython::PairPython(LAMMPS *lmp) : Pair(lmp) { respa_enable = 0; single_enable = 1; writedata = 0; restartinfo = 0; one_coeff = 1; reinitflag = 0; - python->init(); - py_potential = NULL; + skip_types = NULL; + + python->init(); // add current directory to PYTHONPATH PyObject * py_path = PySys_GetObject((char *)"path"); PyList_Append(py_path, PY_STRING_FROM_STRING(".")); // if LAMMPS_POTENTIALS environment variable is set, add it to PYTHONPATH as well const char * potentials_path = getenv("LAMMPS_POTENTIALS"); if (potentials_path != NULL) { PyList_Append(py_path, PY_STRING_FROM_STRING(potentials_path)); } } /* ---------------------------------------------------------------------- */ PairPython::~PairPython() { - if(py_potential) Py_DECREF((PyObject*) py_potential); + if (py_potential) Py_DECREF((PyObject*) py_potential); + delete[] skip_types; if (allocated) { memory->destroy(setflag); memory->destroy(cutsq); } } /* ---------------------------------------------------------------------- */ void PairPython::compute(int eflag, int vflag) { int i,j,ii,jj,inum,jnum,itype,jtype; double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair; double rsq,factor_lj; int *ilist,*jlist,*numneigh,**firstneigh; evdwl = 0.0; if (eflag || vflag) ev_setup(eflag,vflag); else evflag = vflag_fdotr = 0; double **x = atom->x; double **f = atom->f; int *type = atom->type; int nlocal = atom->nlocal; double *special_lj = force->special_lj; int newton_pair = force->newton_pair; inum = list->inum; ilist = list->ilist; numneigh = list->numneigh; firstneigh = list->firstneigh; // prepare access to compute_force and compute_energy functions PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *py_pair_instance = (PyObject *) py_potential; PyObject *py_compute_force = PyObject_GetAttrString(py_pair_instance,"compute_force"); if (!py_compute_force) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Could not find 'compute_force' method'"); } if (!PyCallable_Check(py_compute_force)) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Python 'compute_force' is not callable"); } PyObject *py_compute_energy = PyObject_GetAttrString(py_pair_instance,"compute_energy"); if (!py_compute_energy) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Could not find 'compute_energy' method'"); } if (!PyCallable_Check(py_compute_energy)) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Python 'compute_energy' is not callable"); } PyObject *py_compute_args = PyTuple_New(3); if (!py_compute_args) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Could not create tuple for 'compute' function arguments"); } PyObject *py_rsq, *py_itype, *py_jtype, *py_value; // loop over neighbors of my atoms for (ii = 0; ii < inum; ii++) { i = ilist[ii]; xtmp = x[i][0]; ytmp = x[i][1]; ztmp = x[i][2]; itype = type[i]; jlist = firstneigh[i]; jnum = numneigh[i]; py_itype = PY_INT_FROM_LONG(itype); PyTuple_SetItem(py_compute_args,1,py_itype); for (jj = 0; jj < jnum; jj++) { j = jlist[jj]; factor_lj = special_lj[sbmask(j)]; j &= NEIGHMASK; delx = xtmp - x[j][0]; dely = ytmp - x[j][1]; delz = ztmp - x[j][2]; rsq = delx*delx + dely*dely + delz*delz; jtype = type[j]; + // with hybrid/overlay we might get called for skipped types + if (skip_types[itype] || skip_types[jtype]) continue; + py_jtype = PY_INT_FROM_LONG(jtype); PyTuple_SetItem(py_compute_args,2,py_jtype); if (rsq < cutsq[itype][jtype]) { py_rsq = PyFloat_FromDouble(rsq); PyTuple_SetItem(py_compute_args,0,py_rsq); py_value = PyObject_CallObject(py_compute_force,py_compute_args); if (!py_value) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Calling 'compute_force' function failed"); } - fpair = factor_lj*PyFloat_AsDouble(py_value)/rsq; + fpair = factor_lj*PyFloat_AsDouble(py_value); f[i][0] += delx*fpair; f[i][1] += dely*fpair; f[i][2] += delz*fpair; if (newton_pair || j < nlocal) { f[j][0] -= delx*fpair; f[j][1] -= dely*fpair; f[j][2] -= delz*fpair; } if (eflag) { py_value = PyObject_CallObject(py_compute_energy,py_compute_args); evdwl = factor_lj*PyFloat_AsDouble(py_value); } else evdwl = 0.0; if (evflag) ev_tally(i,j,nlocal,newton_pair, evdwl,0.0,fpair,delx,dely,delz); } } } Py_DECREF(py_compute_args); PyGILState_Release(gstate); if (vflag_fdotr) virial_fdotr_compute(); } /* ---------------------------------------------------------------------- allocate all arrays ------------------------------------------------------------------------- */ void PairPython::allocate() { allocated = 1; int n = atom->ntypes; memory->create(setflag,n+1,n+1,"pair:setflag"); for (int i = 1; i <= n; i++) for (int j = i; j <= n; j++) setflag[i][j] = 0; memory->create(cutsq,n+1,n+1,"pair:cutsq"); } /* ---------------------------------------------------------------------- global settings ------------------------------------------------------------------------- */ void PairPython::settings(int narg, char **arg) { if (narg != 1) error->all(FLERR,"Illegal pair_style command"); cut_global = force->numeric(FLERR,arg[0]); } /* ---------------------------------------------------------------------- set coeffs for all type pairs ------------------------------------------------------------------------- */ void PairPython::coeff(int narg, char **arg) { const int ntypes = atom->ntypes; if (narg != 3+ntypes) error->all(FLERR,"Incorrect args for pair coefficients"); if (!allocated) allocate(); // make sure I,J args are * * if (strcmp(arg[0],"*") != 0 || strcmp(arg[1],"*") != 0) error->all(FLERR,"Incorrect args for pair coefficients"); // check if python potential file exists and source it char * full_cls_name = arg[2]; char * lastpos = strrchr(full_cls_name, '.'); if (lastpos == NULL) { error->all(FLERR,"Python pair style requires fully qualified class name"); } size_t module_name_length = strlen(full_cls_name) - strlen(lastpos); size_t cls_name_length = strlen(lastpos)-1; char * module_name = new char[module_name_length+1]; char * cls_name = new char[cls_name_length+1]; strncpy(module_name, full_cls_name, module_name_length); module_name[module_name_length] = 0; strcpy(cls_name, lastpos+1); PyGILState_STATE gstate = PyGILState_Ensure(); PyObject * pModule = PyImport_ImportModule(module_name); if (!pModule) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Loading python pair style module failure"); } // create LAMMPS atom type to potential file type mapping in python class // by calling 'lammps_pair_style.map_coeff(name,type)' PyObject *py_pair_type = PyObject_GetAttrString(pModule, cls_name); if (!py_pair_type) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Could not find pair style class in module'"); } delete [] module_name; delete [] cls_name; PyObject * py_pair_instance = PyObject_CallObject(py_pair_type, NULL); if (!py_pair_instance) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Could not instantiate instance of pair style class'"); } py_potential = (void *) py_pair_instance; + PyObject *py_check_units = PyObject_GetAttrString(py_pair_instance,"check_units"); + if (!py_check_units) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not find 'check_units' method'"); + } + if (!PyCallable_Check(py_check_units)) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Python 'check_units' is not callable"); + } + PyObject *py_units_args = PyTuple_New(1); + if (!py_units_args) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Could not create tuple for 'check_units' function arguments"); + } + + PyObject *py_name = PY_STRING_FROM_STRING(update->unit_style); + PyTuple_SetItem(py_units_args,0,py_name); + PyObject *py_value = PyObject_CallObject(py_check_units,py_units_args); + if (!py_value) { + PyErr_Print(); + PyErr_Clear(); + PyGILState_Release(gstate); + error->all(FLERR,"Calling 'check_units' function failed"); + } + Py_DECREF(py_units_args); + + PyObject *py_map_coeff = PyObject_GetAttrString(py_pair_instance,"map_coeff"); if (!py_map_coeff) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Could not find 'map_coeff' method'"); } if (!PyCallable_Check(py_map_coeff)) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Python 'map_coeff' is not callable"); } PyObject *py_map_args = PyTuple_New(2); if (!py_map_args) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Could not create tuple for 'map_coeff' function arguments"); } - PyObject *py_type, *py_name, *py_value; + delete[] skip_types; + skip_types = new int[ntypes+1]; + skip_types[0] = 1; for (int i = 1; i <= ntypes ; i++) { - py_type = PY_INT_FROM_LONG(i); + if (strcmp(arg[2+i],"NULL") == 0) { + skip_types[i] = 1; + continue; + } else skip_types[i] = 0; + PyObject *py_type = PY_INT_FROM_LONG(i); py_name = PY_STRING_FROM_STRING(arg[2+i]); PyTuple_SetItem(py_map_args,0,py_name); PyTuple_SetItem(py_map_args,1,py_type); py_value = PyObject_CallObject(py_map_coeff,py_map_args); if (!py_value) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Calling 'map_coeff' function failed"); } for (int j = i; j <= ntypes ; j++) { - if (strcmp(arg[2+i],"NULL") != 0) { - setflag[i][j] = 1; - cutsq[i][j] = cut_global*cut_global; - } + setflag[i][j] = 1; + cutsq[i][j] = cut_global*cut_global; } } Py_DECREF(py_map_args); PyGILState_Release(gstate); } /* ---------------------------------------------------------------------- */ double PairPython::init_one(int, int) { return cut_global; } /* ---------------------------------------------------------------------- */ double PairPython::single(int i, int j, int itype, int jtype, double rsq, double factor_coul, double factor_lj, double &fforce) { + // with hybrid/overlay we might get called for skipped types + if (skip_types[itype] || skip_types[jtype]) { + fforce = 0.0; + return 0.0; + } // prepare access to compute_force and compute_energy functions PyGILState_STATE gstate = PyGILState_Ensure(); PyObject *py_pair_instance = (PyObject *) py_potential; PyObject *py_compute_force = PyObject_GetAttrString(py_pair_instance,"compute_force"); if (!py_compute_force) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Could not find 'compute_force' method'"); } if (!PyCallable_Check(py_compute_force)) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Python 'compute_force' is not callable"); } PyObject *py_compute_energy = PyObject_GetAttrString(py_pair_instance,"compute_energy"); if (!py_compute_energy) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Could not find 'compute_energy' method'"); } if (!PyCallable_Check(py_compute_energy)) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Python 'compute_energy' is not callable"); } PyObject *py_rsq, *py_itype, *py_jtype, *py_value; PyObject *py_compute_args = PyTuple_New(3); if (!py_compute_args) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Could not create tuple for 'compute' function arguments"); } py_itype = PY_INT_FROM_LONG(itype); PyTuple_SetItem(py_compute_args,1,py_itype); py_jtype = PY_INT_FROM_LONG(jtype); PyTuple_SetItem(py_compute_args,2,py_jtype); py_rsq = PyFloat_FromDouble(rsq); PyTuple_SetItem(py_compute_args,0,py_rsq); py_value = PyObject_CallObject(py_compute_force,py_compute_args); if (!py_value) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Calling 'compute_force' function failed"); } - fforce = factor_lj*PyFloat_AsDouble(py_value)/rsq; + fforce = factor_lj*PyFloat_AsDouble(py_value); py_value = PyObject_CallObject(py_compute_energy,py_compute_args); if (!py_value) { PyErr_Print(); PyErr_Clear(); PyGILState_Release(gstate); error->all(FLERR,"Calling 'compute_energy' function failed"); } double evdwl = factor_lj*PyFloat_AsDouble(py_value); Py_DECREF(py_compute_args); PyGILState_Release(gstate); return evdwl; } diff --git a/src/PYTHON/pair_python.h b/src/PYTHON/pair_python.h index 3c9c34fbd..440b39e48 100644 --- a/src/PYTHON/pair_python.h +++ b/src/PYTHON/pair_python.h @@ -1,76 +1,77 @@ /* -*- c++ -*- ---------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. Pair zero is a dummy pair interaction useful for requiring a force cutoff distance in the absense of pair-interactions or with hybrid/overlay if a larger force cutoff distance is required. This can be used in conjunction with bond/create to create bonds that are longer than the cutoff of a given force field, or to calculate radial distribution functions for models without pair interactions. ------------------------------------------------------------------------- */ #ifdef PAIR_CLASS PairStyle(python,PairPython) #else #ifndef LMP_PAIR_PYTHON_H #define LMP_PAIR_PYTHON_H #include "pair.h" namespace LAMMPS_NS { class PairPython : public Pair { public: PairPython(class LAMMPS *); virtual ~PairPython(); virtual void compute(int, int); void settings(int, char **); void coeff(int, char **); double init_one(int, int); double single(int, int, int, int, double, double, double, double &); protected: double cut_global; void * py_potential; + int * skip_types; virtual void allocate(); }; } #endif #endif /* ERROR/WARNING messages: E: Illegal ... command Self-explanatory. Check the input script syntax and compare to the documentation for the command. You can use -echo screen as a command-line option when running LAMMPS to see the offending line. E: Incorrect args for pair coefficients Self-explanatory. Check the input script or data file. E: Pair cutoff < Respa interior cutoff One or more pairwise cutoffs are too short to use with the specified rRESPA cutoffs. */