Merge pull request #886 from lammps/snap-quadratic

updates to quadratic form of SNAP potential
This commit is contained in:
Steve Plimpton
2018-05-03 11:21:29 -06:00
committed by GitHub
16 changed files with 534 additions and 206 deletions

View File

@ -161,9 +161,9 @@ function.
The keyword {bzeroflag} determines whether or not {B0}, the bispectrum The keyword {bzeroflag} determines whether or not {B0}, the bispectrum
components of an atom with no neighbors, are subtracted from components of an atom with no neighbors, are subtracted from
the calculated bispectrum components. This optional keyword is only the calculated bispectrum components. This optional keyword
available for compute {sna/atom}, as {snad/atom} and {snav/atom} normally only affects compute {sna/atom}. However, when
are unaffected by the removal of constant terms. {quadraticflag} is on, it also affects {snad/atom} and {snav/atom}.
The keyword {quadraticflag} determines whether or not the The keyword {quadraticflag} determines whether or not the
quadratic analogs to the bispectrum quantities are generated. quadratic analogs to the bispectrum quantities are generated.
@ -230,13 +230,18 @@ are 30, 90, and 180, respectively. With {quadratic} value=1,
the numbers of columns are 930, 2790, and 5580, respectively. the numbers of columns are 930, 2790, and 5580, respectively.
If the {quadratic} keyword value is set to 1, then additional If the {quadratic} keyword value is set to 1, then additional
columns are appended to each per-atom array, corresponding to columns are generated, corresponding to
the products of all distinct pairs of bispectrum components. If the the products of all distinct pairs of bispectrum components. If the
number of bispectrum components is {K}, then the number of distinct pairs number of bispectrum components is {K}, then the number of distinct pairs
is {K}({K}+1)/2. These are output in subblocks of {K}({K}+1)/2 columns, using the same is {K}({K}+1)/2.
ordering of sub-blocks as was used for the bispectrum For compute {sna/atom} these columns are appended to existing {K} columns.
components. Within each sub-block, the ordering is upper-triangular, The ordering of quadratic terms is upper-triangular,
(1,1),(1,2)...(1,{K}),(2,1)...({K}-1,{K}-1),({K}-1,{K}),({K},{K}) (1,1),(1,2)...(1,{K}),(2,1)...({K}-1,{K}-1),({K}-1,{K}),({K},{K}).
For computes {snad/atom} and {snav/atom} each set of {K}({K}+1)/2
additional columns is inserted directly after each of sub-block
of linear terms i.e. linear and quadratic terms are contiguous.
So the nesting order from inside to outside is bispectrum component,
linear then quadratic, vector/tensor component, type.
These values can be accessed by any command that uses per-atom values These values can be accessed by any command that uses per-atom values
from a compute as input. See "Section from a compute as input. See "Section

View File

@ -0,0 +1,127 @@
LAMMPS (20 Apr 2018)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
using 1 OpenMP thread(s) per MPI task
# Demonstrate SNAP Ta potential
# Initialize simulation
variable nsteps index 100
variable nrep equal 4
variable a equal 3.160
units metal
# generate the box and atom positions using a BCC lattice
variable nx equal ${nrep}
variable nx equal 4
variable ny equal ${nrep}
variable ny equal 4
variable nz equal ${nrep}
variable nz equal 4
boundary p p p
lattice bcc $a
lattice bcc 3.16
Lattice spacing in x,y,z = 3.16 3.16 3.16
region box block 0 ${nx} 0 ${ny} 0 ${nz}
region box block 0 4 0 ${ny} 0 ${nz}
region box block 0 4 0 4 0 ${nz}
region box block 0 4 0 4 0 4
create_box 1 box
Created orthogonal box = (0 0 0) to (12.64 12.64 12.64)
1 by 1 by 1 MPI processor grid
create_atoms 1 box
Created 128 atoms
Time spent = 0.000223637 secs
mass 1 183.84
# choose potential
include Mo_Chen_PRM2017.snap
# DATE: 2017-09-18 CONTRIBUTOR: Chi Chen <chc273@eng.ucsd.edu> CITATION: C. Chen, Z. Deng, R. Tran, H. Tang, I.-H. Chu, S. P. Ong, "Accurate force field for molybdenum by machine learning large materials data" Physical Review Materials 1, 04 3603 (2017)
# Generated by Materials Virtual Lab
# Definition of SNAP potential.
pair_style snap
pair_coeff * * Mo_Chen_PRM2017.snapcoeff Mo Mo_Chen_PRM2017.snapparam Mo
Reading potential file Mo_Chen_PRM2017.snapcoeff with DATE: 2017-09-18
SNAP Element = Mo, Radius 0.5, Weight 1
Reading potential file Mo_Chen_PRM2017.snapparam with DATE: 2017-09-18
SNAP keyword rcutfac 4.615858
SNAP keyword twojmax 6
# Setup output
thermo 10
thermo_modify norm yes
# Set up NVE run
timestep 0.5e-3
neighbor 1.0 bin
neigh_modify once no every 1 delay 0 check yes
# Run MD
velocity all create 300.0 4928459
fix 1 all nve
run ${nsteps}
run 100
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 5.61586
ghost atom cutoff = 5.61586
binsize = 2.80793, bins = 5 5 5
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair snap, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 3.507 | 3.507 | 3.507 Mbytes
Step Temp E_pair E_mol TotEng Press
0 300 -22.405975 0 -22.3675 2575.7657
10 294.77555 -22.405305 0 -22.3675 2756.6894
20 279.53011 -22.40335 0 -22.3675 3285.8272
30 255.52174 -22.40027 0 -22.3675 4122.8933
40 224.7299 -22.396321 0 -22.367499 5204.3499
50 189.67529 -22.391825 0 -22.367499 6449.1308
60 153.18862 -22.387145 0 -22.367499 7765.911
70 118.14998 -22.382652 0 -22.367499 9061.1616
80 87.224916 -22.378685 0 -22.367499 10247.68
90 62.623892 -22.37553 0 -22.367498 11250.067
100 45.9103 -22.373386 0 -22.367498 12011.726
Loop time of 3.3917 on 1 procs for 100 steps with 128 atoms
Performance: 1.274 ns/day, 18.843 hours/ns, 29.484 timesteps/s
99.7% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 3.3906 | 3.3906 | 3.3906 | 0.0 | 99.97
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00039721 | 0.00039721 | 0.00039721 | 0.0 | 0.01
Output | 0.00023007 | 0.00023007 | 0.00023007 | 0.0 | 0.01
Modify | 0.00021887 | 0.00021887 | 0.00021887 | 0.0 | 0.01
Other | | 0.0002868 | | | 0.01
Nlocal: 128 ave 128 max 128 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 727 ave 727 max 727 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
FullNghs: 7424 ave 7424 max 7424 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 7424
Ave neighs/atom = 58
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:03

View File

@ -0,0 +1,127 @@
LAMMPS (20 Apr 2018)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
using 1 OpenMP thread(s) per MPI task
# Demonstrate SNAP Ta potential
# Initialize simulation
variable nsteps index 100
variable nrep equal 4
variable a equal 3.160
units metal
# generate the box and atom positions using a BCC lattice
variable nx equal ${nrep}
variable nx equal 4
variable ny equal ${nrep}
variable ny equal 4
variable nz equal ${nrep}
variable nz equal 4
boundary p p p
lattice bcc $a
lattice bcc 3.16
Lattice spacing in x,y,z = 3.16 3.16 3.16
region box block 0 ${nx} 0 ${ny} 0 ${nz}
region box block 0 4 0 ${ny} 0 ${nz}
region box block 0 4 0 4 0 ${nz}
region box block 0 4 0 4 0 4
create_box 1 box
Created orthogonal box = (0 0 0) to (12.64 12.64 12.64)
1 by 2 by 2 MPI processor grid
create_atoms 1 box
Created 128 atoms
Time spent = 0.000277281 secs
mass 1 183.84
# choose potential
include Mo_Chen_PRM2017.snap
# DATE: 2017-09-18 CONTRIBUTOR: Chi Chen <chc273@eng.ucsd.edu> CITATION: C. Chen, Z. Deng, R. Tran, H. Tang, I.-H. Chu, S. P. Ong, "Accurate force field for molybdenum by machine learning large materials data" Physical Review Materials 1, 04 3603 (2017)
# Generated by Materials Virtual Lab
# Definition of SNAP potential.
pair_style snap
pair_coeff * * Mo_Chen_PRM2017.snapcoeff Mo Mo_Chen_PRM2017.snapparam Mo
Reading potential file Mo_Chen_PRM2017.snapcoeff with DATE: 2017-09-18
SNAP Element = Mo, Radius 0.5, Weight 1
Reading potential file Mo_Chen_PRM2017.snapparam with DATE: 2017-09-18
SNAP keyword rcutfac 4.615858
SNAP keyword twojmax 6
# Setup output
thermo 10
thermo_modify norm yes
# Set up NVE run
timestep 0.5e-3
neighbor 1.0 bin
neigh_modify once no every 1 delay 0 check yes
# Run MD
velocity all create 300.0 4928459
fix 1 all nve
run ${nsteps}
run 100
Neighbor list info ...
update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 5.61586
ghost atom cutoff = 5.61586
binsize = 2.80793, bins = 5 5 5
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair snap, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 3.486 | 3.486 | 3.486 Mbytes
Step Temp E_pair E_mol TotEng Press
0 300 -22.405975 0 -22.3675 2575.7657
10 294.63153 -22.405286 0 -22.3675 2753.4662
20 278.98535 -22.40328 0 -22.3675 3272.416
30 254.38916 -22.400125 0 -22.3675 4091.8933
40 222.91191 -22.396088 0 -22.367499 5148.5505
50 187.16984 -22.391504 0 -22.367499 6362.2454
60 150.08253 -22.386747 0 -22.367499 7643.2732
70 114.60307 -22.382197 0 -22.367499 8900.2448
80 83.449257 -22.378201 0 -22.367499 10047.619
90 58.862643 -22.375048 0 -22.367498 11012.233
100 42.41931 -22.372939 0 -22.367498 11740.641
Loop time of 1.91636 on 4 procs for 100 steps with 128 atoms
Performance: 2.254 ns/day, 10.646 hours/ns, 52.182 timesteps/s
97.9% 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.8147 | 1.8411 | 1.8875 | 2.1 | 96.07
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.022276 | 0.069629 | 0.095057 | 10.7 | 3.63
Output | 0.00032496 | 0.00065821 | 0.0016179 | 0.0 | 0.03
Modify | 0.00019503 | 0.00020915 | 0.00023341 | 0.0 | 0.01
Other | | 0.00481 | | | 0.25
Nlocal: 32 ave 32 max 32 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Nghost: 431 ave 431 max 431 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 4 0 0 0 0 0 0 0 0 0
FullNghs: 1856 ave 1856 max 1856 min
Histogram: 4 0 0 0 0 0 0 0 0 0
Total # of neighbors = 7424
Ave neighs/atom = 58
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:01

View File

@ -1,4 +1,6 @@
LAMMPS (5 Oct 2016) LAMMPS (20 Apr 2018)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
using 1 OpenMP thread(s) per MPI task
# Demonstrate SNAP Ta potential # Demonstrate SNAP Ta potential
# Initialize simulation # Initialize simulation
@ -31,12 +33,13 @@ Created orthogonal box = (0 0 0) to (13.264 13.264 13.264)
1 by 1 by 1 MPI processor grid 1 by 1 by 1 MPI processor grid
create_atoms 1 box create_atoms 1 box
Created 128 atoms Created 128 atoms
Time spent = 0.000328064 secs
mass 1 180.88 mass 1 180.88
# choose potential # choose potential
include Ta06A_pot.snap include Ta06A.snap
# DATE: 2014-09-05 CONTRIBUTOR: Aidan Thompson athomps@sandia.gov CITATION: Thompson, Swiler, Trott, Foiles and Tucker, arxiv.org, 1409.3880 (2014) # DATE: 2014-09-05 CONTRIBUTOR: Aidan Thompson athomps@sandia.gov CITATION: Thompson, Swiler, Trott, Foiles and Tucker, arxiv.org, 1409.3880 (2014)
# Definition of SNAP potential Ta_Cand06A # Definition of SNAP potential Ta_Cand06A
@ -48,10 +51,9 @@ variable zblz equal 73
# Specify hybrid with SNAP, ZBL # Specify hybrid with SNAP, ZBL
pair_style hybrid/overlay snap zbl ${zblcutinner} ${zblcutouter} pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap
pair_style hybrid/overlay snap zbl 4 ${zblcutouter} pair_style hybrid/overlay zbl 4 ${zblcutouter} snap
pair_style hybrid/overlay snap zbl 4 4.8 pair_style hybrid/overlay zbl 4 4.8 snap
pair_coeff 1 1 zbl ${zblz} ${zblz} pair_coeff 1 1 zbl ${zblz} ${zblz}
pair_coeff 1 1 zbl 73 ${zblz} pair_coeff 1 1 zbl 73 ${zblz}
pair_coeff 1 1 zbl 73 73 pair_coeff 1 1 zbl 73 73
@ -61,10 +63,11 @@ SNAP Element = Ta, Radius 0.5, Weight 1
Reading potential file Ta06A.snapparam with DATE: 2014-09-05 Reading potential file Ta06A.snapparam with DATE: 2014-09-05
SNAP keyword rcutfac 4.67637 SNAP keyword rcutfac 4.67637
SNAP keyword twojmax 6 SNAP keyword twojmax 6
SNAP keyword gamma 1
SNAP keyword rfac0 0.99363 SNAP keyword rfac0 0.99363
SNAP keyword rmin0 0 SNAP keyword rmin0 0
SNAP keyword diagonalstyle 3 SNAP keyword diagonalstyle 3
SNAP keyword bzeroflag 0
SNAP keyword quadraticflag 0
# Setup output # Setup output
@ -85,13 +88,23 @@ fix 1 all nve
run ${nsteps} run ${nsteps}
run 100 run 100
Neighbor list info ... Neighbor list info ...
2 neighbor list requests
update every 1 steps, delay 0 steps, check yes update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000 max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 5.8 master list distance cutoff = 5.8
ghost atom cutoff = 5.8 ghost atom cutoff = 5.8
binsize = 2.9 -> bins = 5 5 5 binsize = 2.9, bins = 5 5 5
Memory usage per processor = 2.92823 Mbytes 2 neighbor lists, perpetual/occasional/extra = 2 0 0
(1) pair zbl, perpetual, half/full from (2)
attributes: half, newton on
pair build: halffull/newton
stencil: none
bin: none
(2) pair snap, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 4.138 | 4.138 | 4.138 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 300 -11.85157 0 -11.813095 2717.1661 0 300 -11.85157 0 -11.813095 2717.1661
10 295.96579 -11.851053 0 -11.813095 2696.1559 10 295.96579 -11.851053 0 -11.813095 2696.1559
@ -104,20 +117,20 @@ Step Temp E_pair E_mol TotEng Press
80 124.04276 -11.829003 0 -11.813094 1537.703 80 124.04276 -11.829003 0 -11.813094 1537.703
90 97.37622 -11.825582 0 -11.813094 1734.9662 90 97.37622 -11.825582 0 -11.813094 1734.9662
100 75.007873 -11.822714 0 -11.813094 1930.8005 100 75.007873 -11.822714 0 -11.813094 1930.8005
Loop time of 3.43062 on 1 procs for 100 steps with 128 atoms Loop time of 2.53266 on 1 procs for 100 steps with 128 atoms
Performance: 1.259 ns/day, 19.059 hours/ns, 29.149 timesteps/s Performance: 1.706 ns/day, 14.070 hours/ns, 39.484 timesteps/s
99.9% CPU use with 1 MPI tasks x no OpenMP threads 99.5% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 3.4295 | 3.4295 | 3.4295 | 0.0 | 99.97 Pair | 2.5313 | 2.5313 | 2.5313 | 0.0 | 99.95
Neigh | 0 | 0 | 0 | 0.0 | 0.00 Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00043988 | 0.00043988 | 0.00043988 | 0.0 | 0.01 Comm | 0.00051379 | 0.00051379 | 0.00051379 | 0.0 | 0.02
Output | 0.00010014 | 0.00010014 | 0.00010014 | 0.0 | 0.00 Output | 0.00023317 | 0.00023317 | 0.00023317 | 0.0 | 0.01
Modify | 0.00024533 | 0.00024533 | 0.00024533 | 0.0 | 0.01 Modify | 0.00023675 | 0.00023675 | 0.00023675 | 0.0 | 0.01
Other | | 0.0002978 | | | 0.01 Other | | 0.0003583 | | | 0.01
Nlocal: 128 ave 128 max 128 min Nlocal: 128 ave 128 max 128 min
Histogram: 1 0 0 0 0 0 0 0 0 0 Histogram: 1 0 0 0 0 0 0 0 0 0
@ -133,4 +146,4 @@ Ave neighs/atom = 58
Neighbor list builds = 0 Neighbor list builds = 0
Dangerous builds = 0 Dangerous builds = 0
Total wall time: 0:00:03 Total wall time: 0:00:02

View File

@ -1,4 +1,6 @@
LAMMPS (5 Oct 2016) LAMMPS (20 Apr 2018)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
using 1 OpenMP thread(s) per MPI task
# Demonstrate SNAP Ta potential # Demonstrate SNAP Ta potential
# Initialize simulation # Initialize simulation
@ -31,12 +33,13 @@ Created orthogonal box = (0 0 0) to (13.264 13.264 13.264)
1 by 2 by 2 MPI processor grid 1 by 2 by 2 MPI processor grid
create_atoms 1 box create_atoms 1 box
Created 128 atoms Created 128 atoms
Time spent = 0.000288486 secs
mass 1 180.88 mass 1 180.88
# choose potential # choose potential
include Ta06A_pot.snap include Ta06A.snap
# DATE: 2014-09-05 CONTRIBUTOR: Aidan Thompson athomps@sandia.gov CITATION: Thompson, Swiler, Trott, Foiles and Tucker, arxiv.org, 1409.3880 (2014) # DATE: 2014-09-05 CONTRIBUTOR: Aidan Thompson athomps@sandia.gov CITATION: Thompson, Swiler, Trott, Foiles and Tucker, arxiv.org, 1409.3880 (2014)
# Definition of SNAP potential Ta_Cand06A # Definition of SNAP potential Ta_Cand06A
@ -48,10 +51,9 @@ variable zblz equal 73
# Specify hybrid with SNAP, ZBL # Specify hybrid with SNAP, ZBL
pair_style hybrid/overlay snap zbl ${zblcutinner} ${zblcutouter} pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap
pair_style hybrid/overlay snap zbl 4 ${zblcutouter} pair_style hybrid/overlay zbl 4 ${zblcutouter} snap
pair_style hybrid/overlay snap zbl 4 4.8 pair_style hybrid/overlay zbl 4 4.8 snap
pair_coeff 1 1 zbl ${zblz} ${zblz} pair_coeff 1 1 zbl ${zblz} ${zblz}
pair_coeff 1 1 zbl 73 ${zblz} pair_coeff 1 1 zbl 73 ${zblz}
pair_coeff 1 1 zbl 73 73 pair_coeff 1 1 zbl 73 73
@ -61,10 +63,11 @@ SNAP Element = Ta, Radius 0.5, Weight 1
Reading potential file Ta06A.snapparam with DATE: 2014-09-05 Reading potential file Ta06A.snapparam with DATE: 2014-09-05
SNAP keyword rcutfac 4.67637 SNAP keyword rcutfac 4.67637
SNAP keyword twojmax 6 SNAP keyword twojmax 6
SNAP keyword gamma 1
SNAP keyword rfac0 0.99363 SNAP keyword rfac0 0.99363
SNAP keyword rmin0 0 SNAP keyword rmin0 0
SNAP keyword diagonalstyle 3 SNAP keyword diagonalstyle 3
SNAP keyword bzeroflag 0
SNAP keyword quadraticflag 0
# Setup output # Setup output
@ -85,13 +88,23 @@ fix 1 all nve
run ${nsteps} run ${nsteps}
run 100 run 100
Neighbor list info ... Neighbor list info ...
2 neighbor list requests
update every 1 steps, delay 0 steps, check yes update every 1 steps, delay 0 steps, check yes
max neighbors/atom: 2000, page size: 100000 max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 5.8 master list distance cutoff = 5.8
ghost atom cutoff = 5.8 ghost atom cutoff = 5.8
binsize = 2.9 -> bins = 5 5 5 binsize = 2.9, bins = 5 5 5
Memory usage per processor = 2.91109 Mbytes 2 neighbor lists, perpetual/occasional/extra = 2 0 0
(1) pair zbl, perpetual, half/full from (2)
attributes: half, newton on
pair build: halffull/newton
stencil: none
bin: none
(2) pair snap, perpetual
attributes: full, newton on
pair build: full/bin/atomonly
stencil: full/bin/3d
bin: standard
Per MPI rank memory allocation (min/avg/max) = 4.118 | 4.118 | 4.118 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 300 -11.85157 0 -11.813095 2717.1661 0 300 -11.85157 0 -11.813095 2717.1661
10 295.8664 -11.85104 0 -11.813095 2702.935 10 295.8664 -11.85104 0 -11.813095 2702.935
@ -104,20 +117,20 @@ Step Temp E_pair E_mol TotEng Press
80 121.80051 -11.828715 0 -11.813094 1627.6911 80 121.80051 -11.828715 0 -11.813094 1627.6911
90 95.262635 -11.825311 0 -11.813094 1812.9327 90 95.262635 -11.825311 0 -11.813094 1812.9327
100 73.194645 -11.822481 0 -11.813094 1995.2199 100 73.194645 -11.822481 0 -11.813094 1995.2199
Loop time of 0.89193 on 4 procs for 100 steps with 128 atoms Loop time of 1.3621 on 4 procs for 100 steps with 128 atoms
Performance: 4.843 ns/day, 4.955 hours/ns, 112.116 timesteps/s Performance: 3.172 ns/day, 7.567 hours/ns, 73.416 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads 98.7% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 0.84444 | 0.86772 | 0.88108 | 1.6 | 97.29 Pair | 1.2867 | 1.309 | 1.35 | 2.1 | 96.10
Neigh | 0 | 0 | 0 | 0.0 | 0.00 Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.009577 | 0.023049 | 0.046417 | 9.8 | 2.58 Comm | 0.0096083 | 0.050652 | 0.072999 | 10.9 | 3.72
Output | 0.00024009 | 0.00026137 | 0.00027895 | 0.1 | 0.03 Output | 0.00031447 | 0.00060236 | 0.0014303 | 0.0 | 0.04
Modify | 8.2493e-05 | 9.352e-05 | 0.00010061 | 0.1 | 0.01 Modify | 0.00014234 | 0.00016212 | 0.00018811 | 0.0 | 0.01
Other | | 0.0008071 | | | 0.09 Other | | 0.001728 | | | 0.13
Nlocal: 32 ave 32 max 32 min Nlocal: 32 ave 32 max 32 min
Histogram: 4 0 0 0 0 0 0 0 0 0 Histogram: 4 0 0 0 0 0 0 0 0 0
@ -133,4 +146,4 @@ Ave neighs/atom = 58
Neighbor list builds = 0 Neighbor list builds = 0
Dangerous builds = 0 Dangerous builds = 0
Total wall time: 0:00:00 Total wall time: 0:00:01

View File

@ -1,4 +1,6 @@
LAMMPS (13 Feb 2017) LAMMPS (20 Apr 2018)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
using 1 OpenMP thread(s) per MPI task
# Demonstrate SNAP Ta potential # Demonstrate SNAP Ta potential
# Initialize simulation # Initialize simulation
@ -31,20 +33,21 @@ Created orthogonal box = (0 0 0) to (12.7212 12.7212 12.7212)
1 by 1 by 1 MPI processor grid 1 by 1 by 1 MPI processor grid
create_atoms 1 box create_atoms 1 box
Created 128 atoms Created 128 atoms
Time spent = 0.000190258 secs
mass 1 183.84 mass 1 183.84
# choose potential # choose potential
include W_2940_2017_2.pot.snap include W_2940_2017_2.snap
# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. to appear in arxiv Feb2017 # DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. "Quantum-Accurate Molecular Dynamics Potential for Tungsten" arXiv:1702.07042 [physics.comp-ph]
# #
# Definition of SNAP+ZBL potential. # Definition of SNAP+ZBL potential.
variable zblcutinner equal 4 variable zblcutinner equal 4
variable zblcutouter equal 4.8 variable zblcutouter equal 4.8
variable zblz equal 74 variable zblz equal 74
# Specify hybrid with SNAP, ZBL, and long-range Coulomb # Specify hybrid with SNAP and ZBL
pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap
pair_style hybrid/overlay zbl 4 ${zblcutouter} snap pair_style hybrid/overlay zbl 4 ${zblcutouter} snap
@ -58,10 +61,11 @@ SNAP Element = W, Radius 0.5, Weight 1
Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20 Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20
SNAP keyword rcutfac 4.73442 SNAP keyword rcutfac 4.73442
SNAP keyword twojmax 8 SNAP keyword twojmax 8
SNAP keyword gamma 1
SNAP keyword rfac0 0.99363 SNAP keyword rfac0 0.99363
SNAP keyword rmin0 0 SNAP keyword rmin0 0
SNAP keyword diagonalstyle 3 SNAP keyword diagonalstyle 3
SNAP keyword bzeroflag 0
SNAP keyword quadraticflag 0
#Nomenclature on the snap files are Element_DakotaID_Year_Month #Nomenclature on the snap files are Element_DakotaID_Year_Month
@ -99,7 +103,7 @@ Neighbor list info ...
pair build: full/bin/atomonly pair build: full/bin/atomonly
stencil: full/bin/3d stencil: full/bin/3d
bin: standard bin: standard
Memory usage per processor = 5.14696 Mbytes Per MPI rank memory allocation (min/avg/max) = 5.15 | 5.15 | 5.15 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 300 -11.028325 0 -10.98985 3010.497 0 300 -11.028325 0 -10.98985 3010.497
10 293.40666 -11.027479 0 -10.989849 3246.0559 10 293.40666 -11.027479 0 -10.989849 3246.0559
@ -112,20 +116,20 @@ Step Temp E_pair E_mol TotEng Press
80 58.605244 -10.997364 0 -10.989848 11289.914 80 58.605244 -10.997364 0 -10.989848 11289.914
90 39.754503 -10.994946 0 -10.989848 11824.945 90 39.754503 -10.994946 0 -10.989848 11824.945
100 32.524085 -10.994019 0 -10.989848 11932.118 100 32.524085 -10.994019 0 -10.989848 11932.118
Loop time of 11.8271 on 1 procs for 100 steps with 128 atoms Loop time of 9.69738 on 1 procs for 100 steps with 128 atoms
Performance: 0.365 ns/day, 65.706 hours/ns, 8.455 timesteps/s Performance: 0.445 ns/day, 53.874 hours/ns, 10.312 timesteps/s
99.9% CPU use with 1 MPI tasks x no OpenMP threads 99.8% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 11.826 | 11.826 | 11.826 | 0.0 | 99.99 Pair | 9.6961 | 9.6961 | 9.6961 | 0.0 | 99.99
Neigh | 0 | 0 | 0 | 0.0 | 0.00 Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00044084 | 0.00044084 | 0.00044084 | 0.0 | 0.00 Comm | 0.00044036 | 0.00044036 | 0.00044036 | 0.0 | 0.00
Output | 0.00013232 | 0.00013232 | 0.00013232 | 0.0 | 0.00 Output | 0.00024843 | 0.00024843 | 0.00024843 | 0.0 | 0.00
Modify | 0.00021887 | 0.00021887 | 0.00021887 | 0.0 | 0.00 Modify | 0.00023937 | 0.00023937 | 0.00023937 | 0.0 | 0.00
Other | | 0.0002718 | | | 0.00 Other | | 0.0003347 | | | 0.00
Nlocal: 128 ave 128 max 128 min Nlocal: 128 ave 128 max 128 min
Histogram: 1 0 0 0 0 0 0 0 0 0 Histogram: 1 0 0 0 0 0 0 0 0 0
@ -141,4 +145,4 @@ Ave neighs/atom = 58
Neighbor list builds = 0 Neighbor list builds = 0
Dangerous builds = 0 Dangerous builds = 0
Total wall time: 0:00:11 Total wall time: 0:00:09

View File

@ -1,4 +1,6 @@
LAMMPS (13 Feb 2017) LAMMPS (20 Apr 2018)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
using 1 OpenMP thread(s) per MPI task
# Demonstrate SNAP Ta potential # Demonstrate SNAP Ta potential
# Initialize simulation # Initialize simulation
@ -31,20 +33,21 @@ Created orthogonal box = (0 0 0) to (12.7212 12.7212 12.7212)
1 by 2 by 2 MPI processor grid 1 by 2 by 2 MPI processor grid
create_atoms 1 box create_atoms 1 box
Created 128 atoms Created 128 atoms
Time spent = 0.000309944 secs
mass 1 183.84 mass 1 183.84
# choose potential # choose potential
include W_2940_2017_2.pot.snap include W_2940_2017_2.snap
# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. to appear in arxiv Feb2017 # DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. "Quantum-Accurate Molecular Dynamics Potential for Tungsten" arXiv:1702.07042 [physics.comp-ph]
# #
# Definition of SNAP+ZBL potential. # Definition of SNAP+ZBL potential.
variable zblcutinner equal 4 variable zblcutinner equal 4
variable zblcutouter equal 4.8 variable zblcutouter equal 4.8
variable zblz equal 74 variable zblz equal 74
# Specify hybrid with SNAP, ZBL, and long-range Coulomb # Specify hybrid with SNAP and ZBL
pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap
pair_style hybrid/overlay zbl 4 ${zblcutouter} snap pair_style hybrid/overlay zbl 4 ${zblcutouter} snap
@ -58,10 +61,11 @@ SNAP Element = W, Radius 0.5, Weight 1
Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20 Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20
SNAP keyword rcutfac 4.73442 SNAP keyword rcutfac 4.73442
SNAP keyword twojmax 8 SNAP keyword twojmax 8
SNAP keyword gamma 1
SNAP keyword rfac0 0.99363 SNAP keyword rfac0 0.99363
SNAP keyword rmin0 0 SNAP keyword rmin0 0
SNAP keyword diagonalstyle 3 SNAP keyword diagonalstyle 3
SNAP keyword bzeroflag 0
SNAP keyword quadraticflag 0
#Nomenclature on the snap files are Element_DakotaID_Year_Month #Nomenclature on the snap files are Element_DakotaID_Year_Month
@ -99,7 +103,7 @@ Neighbor list info ...
pair build: full/bin/atomonly pair build: full/bin/atomonly
stencil: full/bin/3d stencil: full/bin/3d
bin: standard bin: standard
Memory usage per processor = 5.12833 Mbytes Per MPI rank memory allocation (min/avg/max) = 5.13 | 5.13 | 5.13 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 300 -11.028325 0 -10.98985 3010.497 0 300 -11.028325 0 -10.98985 3010.497
10 293.22504 -11.027456 0 -10.989849 3258.275 10 293.22504 -11.027456 0 -10.989849 3258.275
@ -112,20 +116,20 @@ Step Temp E_pair E_mol TotEng Press
80 56.127265 -10.997046 0 -10.989848 11551.687 80 56.127265 -10.997046 0 -10.989848 11551.687
90 38.025013 -10.994724 0 -10.989847 12069.936 90 38.025013 -10.994724 0 -10.989847 12069.936
100 31.768127 -10.993922 0 -10.989847 12145.648 100 31.768127 -10.993922 0 -10.989847 12145.648
Loop time of 3.03545 on 4 procs for 100 steps with 128 atoms Loop time of 5.15615 on 4 procs for 100 steps with 128 atoms
Performance: 1.423 ns/day, 16.864 hours/ns, 32.944 timesteps/s Performance: 0.838 ns/day, 28.645 hours/ns, 19.394 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads 98.9% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 2.9594 | 2.9866 | 3.0319 | 1.6 | 98.39 Pair | 5.0497 | 5.0762 | 5.092 | 0.8 | 98.45
Neigh | 0 | 0 | 0 | 0.0 | 0.00 Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.0024238 | 0.047825 | 0.075032 | 12.5 | 1.58 Comm | 0.060802 | 0.07661 | 0.10305 | 6.1 | 1.49
Output | 0.00021601 | 0.00024045 | 0.00027442 | 0.0 | 0.01 Output | 0.00040722 | 0.00078458 | 0.0018959 | 0.0 | 0.02
Modify | 9.6798e-05 | 0.00011188 | 0.00011802 | 0.0 | 0.00 Modify | 0.0002389 | 0.00024962 | 0.00027442 | 0.0 | 0.00
Other | | 0.000698 | | | 0.02 Other | | 0.002315 | | | 0.04
Nlocal: 32 ave 32 max 32 min Nlocal: 32 ave 32 max 32 min
Histogram: 4 0 0 0 0 0 0 0 0 0 Histogram: 4 0 0 0 0 0 0 0 0 0
@ -141,4 +145,4 @@ Ave neighs/atom = 58
Neighbor list builds = 0 Neighbor list builds = 0
Dangerous builds = 0 Dangerous builds = 0
Total wall time: 0:00:03 Total wall time: 0:00:05

View File

@ -1,4 +1,6 @@
LAMMPS (13 Feb 2017) LAMMPS (20 Apr 2018)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
using 1 OpenMP thread(s) per MPI task
# Demonstrate SNAP Ta potential # Demonstrate SNAP Ta potential
# Initialize simulation # Initialize simulation
@ -31,6 +33,7 @@ Created orthogonal box = (0 0 0) to (12.7212 12.7212 12.7212)
1 by 1 by 1 MPI processor grid 1 by 1 by 1 MPI processor grid
create_atoms 1 box create_atoms 1 box
Created 128 atoms Created 128 atoms
Time spent = 0.000431538 secs
mass 1 183.84 mass 1 183.84
mass 2 4.0026 mass 2 4.0026
@ -42,15 +45,15 @@ group helium type 2
5 atoms in group helium 5 atoms in group helium
# choose potential # choose potential
include W.SNAP_HePair.pot include W_2940_2017_2_He_JW2013.snap
# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. to appear in arxiv Feb2017, W-He and He-He from Juslin, N. and Wirth, B. D. Journal of Nuclear Materials, 423, (2013) p61-63 # DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. "Quantum-Accurate Molecular Dynamics Potential for Tungsten" arXiv:1702.07042 [physics.comp-ph]
# #
# Definition of SNAP+ZBL+Tabulated potential. # Definition of SNAP+ZBL+Tabulated potential.
variable zblcutinner equal 4 variable zblcutinner equal 4
variable zblcutouter equal 4.8 variable zblcutouter equal 4.8
variable zblz equal 74 variable zblz equal 74
# Specify hybrid with SNAP, ZBL, and long-range Coulomb # Specify hybrid with SNAP and ZBL
pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap table spline 10000 table spline 10000 pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap table spline 10000 table spline 10000
pair_style hybrid/overlay zbl 4 ${zblcutouter} snap table spline 10000 table spline 10000 pair_style hybrid/overlay zbl 4 ${zblcutouter} snap table spline 10000 table spline 10000
@ -64,18 +67,19 @@ SNAP Element = W, Radius 0.5, Weight 1
Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20 Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20
SNAP keyword rcutfac 4.73442 SNAP keyword rcutfac 4.73442
SNAP keyword twojmax 8 SNAP keyword twojmax 8
SNAP keyword gamma 1
SNAP keyword rfac0 0.99363 SNAP keyword rfac0 0.99363
SNAP keyword rmin0 0 SNAP keyword rmin0 0
SNAP keyword diagonalstyle 3 SNAP keyword diagonalstyle 3
SNAP keyword bzeroflag 0
SNAP keyword quadraticflag 0
pair_coeff 2 2 table 1 He_He_JW2013.table HeHe pair_coeff 2 2 table 1 He_He_JW2013.table HeHe
Reading potential file He_He_JW2013.table with DATE: 2017-02-20 Reading potential file He_He_JW2013.table with DATE: 2017-02-20
WARNING: 1 of 4999 force values in table are inconsistent with -dE/dr. WARNING: 1 of 4999 force values in table are inconsistent with -dE/dr.
Should only be flagged at inflection points (../pair_table.cpp:476) Should only be flagged at inflection points (../pair_table.cpp:481)
pair_coeff 1 2 table 2 W_He_JW2013.table WHe pair_coeff 1 2 table 2 W_He_JW2013.table WHe
Reading potential file W_He_JW2013.table with DATE: 2017-02-20 Reading potential file W_He_JW2013.table with DATE: 2017-02-20
WARNING: 3 of 325 force values in table are inconsistent with -dE/dr. WARNING: 3 of 325 force values in table are inconsistent with -dE/dr.
Should only be flagged at inflection points (../pair_table.cpp:476) Should only be flagged at inflection points (../pair_table.cpp:481)
#Hybrid/overlay will take all pair styles and add their contributions equally, order of pair_coeff doesnt matter here #Hybrid/overlay will take all pair styles and add their contributions equally, order of pair_coeff doesnt matter here
#This is not the case for pair_style hybrid ... where only one pair_coeff is read for each type combination, order matters here. #This is not the case for pair_style hybrid ... where only one pair_coeff is read for each type combination, order matters here.
@ -134,7 +138,7 @@ Neighbor list info ...
pair build: full/bin/atomonly pair build: full/bin/atomonly
stencil: full/bin/3d stencil: full/bin/3d
bin: standard bin: standard
Memory usage per processor = 7.6729 Mbytes Per MPI rank memory allocation (min/avg/max) = 7.676 | 7.676 | 7.676 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 300 -10.438105 0 -10.39963 -5445.2808 0 300 -10.438105 0 -10.39963 -5445.2808
10 290.48923 -10.436885 0 -10.399629 -5646.4813 10 290.48923 -10.436885 0 -10.399629 -5646.4813
@ -147,20 +151,20 @@ Step Temp E_pair E_mol TotEng Press
80 85.903126 -10.410645 0 -10.399628 857.74986 80 85.903126 -10.410645 0 -10.399628 857.74986
90 65.223651 -10.407993 0 -10.399628 1494.2746 90 65.223651 -10.407993 0 -10.399628 1494.2746
100 59.833542 -10.407302 0 -10.399628 1938.9164 100 59.833542 -10.407302 0 -10.399628 1938.9164
Loop time of 11.0736 on 1 procs for 100 steps with 128 atoms Loop time of 8.902 on 1 procs for 100 steps with 128 atoms
Performance: 0.390 ns/day, 61.520 hours/ns, 9.030 timesteps/s Performance: 0.485 ns/day, 49.456 hours/ns, 11.233 timesteps/s
99.9% CPU use with 1 MPI tasks x no OpenMP threads 99.8% CPU use with 1 MPI tasks x 1 OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 11.072 | 11.072 | 11.072 | 0.0 | 99.99 Pair | 8.9002 | 8.9002 | 8.9002 | 0.0 | 99.98
Neigh | 0.00041604 | 0.00041604 | 0.00041604 | 0.0 | 0.00 Neigh | 0.00043058 | 0.00043058 | 0.00043058 | 0.0 | 0.00
Comm | 0.00046253 | 0.00046253 | 0.00046253 | 0.0 | 0.00 Comm | 0.00045776 | 0.00045776 | 0.00045776 | 0.0 | 0.01
Output | 0.0001657 | 0.0001657 | 0.0001657 | 0.0 | 0.00 Output | 0.00025344 | 0.00025344 | 0.00025344 | 0.0 | 0.00
Modify | 0.0002265 | 0.0002265 | 0.0002265 | 0.0 | 0.00 Modify | 0.00022483 | 0.00022483 | 0.00022483 | 0.0 | 0.00
Other | | 0.0003119 | | | 0.00 Other | | 0.0003953 | | | 0.00
Nlocal: 128 ave 128 max 128 min Nlocal: 128 ave 128 max 128 min
Histogram: 1 0 0 0 0 0 0 0 0 0 Histogram: 1 0 0 0 0 0 0 0 0 0
@ -176,4 +180,4 @@ Ave neighs/atom = 53.5156
Neighbor list builds = 1 Neighbor list builds = 1
Dangerous builds = 0 Dangerous builds = 0
Total wall time: 0:00:11 Total wall time: 0:00:09

View File

@ -1,4 +1,6 @@
LAMMPS (13 Feb 2017) LAMMPS (20 Apr 2018)
OMP_NUM_THREADS environment is not set. Defaulting to 1 thread. (../comm.cpp:90)
using 1 OpenMP thread(s) per MPI task
# Demonstrate SNAP Ta potential # Demonstrate SNAP Ta potential
# Initialize simulation # Initialize simulation
@ -31,6 +33,7 @@ Created orthogonal box = (0 0 0) to (12.7212 12.7212 12.7212)
1 by 2 by 2 MPI processor grid 1 by 2 by 2 MPI processor grid
create_atoms 1 box create_atoms 1 box
Created 128 atoms Created 128 atoms
Time spent = 0.000274658 secs
mass 1 183.84 mass 1 183.84
mass 2 4.0026 mass 2 4.0026
@ -42,15 +45,15 @@ group helium type 2
5 atoms in group helium 5 atoms in group helium
# choose potential # choose potential
include W.SNAP_HePair.pot include W_2940_2017_2_He_JW2013.snap
# DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. to appear in arxiv Feb2017, W-He and He-He from Juslin, N. and Wirth, B. D. Journal of Nuclear Materials, 423, (2013) p61-63 # DATE: 2017-02-20 CONTRIBUTOR: Mitchell Wood mitwood@sandia.gov CITATION: Wood, M. A. and Thompson, A. P. "Quantum-Accurate Molecular Dynamics Potential for Tungsten" arXiv:1702.07042 [physics.comp-ph]
# #
# Definition of SNAP+ZBL+Tabulated potential. # Definition of SNAP+ZBL+Tabulated potential.
variable zblcutinner equal 4 variable zblcutinner equal 4
variable zblcutouter equal 4.8 variable zblcutouter equal 4.8
variable zblz equal 74 variable zblz equal 74
# Specify hybrid with SNAP, ZBL, and long-range Coulomb # Specify hybrid with SNAP and ZBL
pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap table spline 10000 table spline 10000 pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap table spline 10000 table spline 10000
pair_style hybrid/overlay zbl 4 ${zblcutouter} snap table spline 10000 table spline 10000 pair_style hybrid/overlay zbl 4 ${zblcutouter} snap table spline 10000 table spline 10000
@ -64,18 +67,19 @@ SNAP Element = W, Radius 0.5, Weight 1
Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20 Reading potential file W_2940_2017_2.snapparam with DATE: 2017-02-20
SNAP keyword rcutfac 4.73442 SNAP keyword rcutfac 4.73442
SNAP keyword twojmax 8 SNAP keyword twojmax 8
SNAP keyword gamma 1
SNAP keyword rfac0 0.99363 SNAP keyword rfac0 0.99363
SNAP keyword rmin0 0 SNAP keyword rmin0 0
SNAP keyword diagonalstyle 3 SNAP keyword diagonalstyle 3
SNAP keyword bzeroflag 0
SNAP keyword quadraticflag 0
pair_coeff 2 2 table 1 He_He_JW2013.table HeHe pair_coeff 2 2 table 1 He_He_JW2013.table HeHe
Reading potential file He_He_JW2013.table with DATE: 2017-02-20 Reading potential file He_He_JW2013.table with DATE: 2017-02-20
WARNING: 1 of 4999 force values in table are inconsistent with -dE/dr. WARNING: 1 of 4999 force values in table are inconsistent with -dE/dr.
Should only be flagged at inflection points (../pair_table.cpp:476) Should only be flagged at inflection points (../pair_table.cpp:481)
pair_coeff 1 2 table 2 W_He_JW2013.table WHe pair_coeff 1 2 table 2 W_He_JW2013.table WHe
Reading potential file W_He_JW2013.table with DATE: 2017-02-20 Reading potential file W_He_JW2013.table with DATE: 2017-02-20
WARNING: 3 of 325 force values in table are inconsistent with -dE/dr. WARNING: 3 of 325 force values in table are inconsistent with -dE/dr.
Should only be flagged at inflection points (../pair_table.cpp:476) Should only be flagged at inflection points (../pair_table.cpp:481)
#Hybrid/overlay will take all pair styles and add their contributions equally, order of pair_coeff doesnt matter here #Hybrid/overlay will take all pair styles and add their contributions equally, order of pair_coeff doesnt matter here
#This is not the case for pair_style hybrid ... where only one pair_coeff is read for each type combination, order matters here. #This is not the case for pair_style hybrid ... where only one pair_coeff is read for each type combination, order matters here.
@ -134,7 +138,7 @@ Neighbor list info ...
pair build: full/bin/atomonly pair build: full/bin/atomonly
stencil: full/bin/3d stencil: full/bin/3d
bin: standard bin: standard
Memory usage per processor = 7.65426 Mbytes Per MPI rank memory allocation (min/avg/max) = 7.656 | 7.656 | 7.656 Mbytes
Step Temp E_pair E_mol TotEng Press Step Temp E_pair E_mol TotEng Press
0 300 -10.438105 0 -10.39963 -5445.2808 0 300 -10.438105 0 -10.39963 -5445.2808
10 292.13979 -10.437097 0 -10.39963 -5516.3963 10 292.13979 -10.437097 0 -10.39963 -5516.3963
@ -147,20 +151,20 @@ Step Temp E_pair E_mol TotEng Press
80 79.985938 -10.409886 0 -10.399628 2392.1106 80 79.985938 -10.409886 0 -10.399628 2392.1106
90 62.568933 -10.407652 0 -10.399628 3141.7027 90 62.568933 -10.407652 0 -10.399628 3141.7027
100 56.697933 -10.406899 0 -10.399628 3583.9538 100 56.697933 -10.406899 0 -10.399628 3583.9538
Loop time of 2.8757 on 4 procs for 100 steps with 128 atoms Loop time of 4.82103 on 4 procs for 100 steps with 128 atoms
Performance: 1.502 ns/day, 15.976 hours/ns, 34.774 timesteps/s Performance: 0.896 ns/day, 26.783 hours/ns, 20.742 timesteps/s
99.9% CPU use with 4 MPI tasks x no OpenMP threads 99.0% CPU use with 4 MPI tasks x 1 OpenMP threads
MPI task timing breakdown: MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total Section | min time | avg time | max time |%varavg| %total
--------------------------------------------------------------- ---------------------------------------------------------------
Pair | 2.7363 | 2.8122 | 2.8636 | 2.9 | 97.79 Pair | 4.4837 | 4.6734 | 4.7605 | 5.2 | 96.94
Neigh | 0 | 0 | 0 | 0.0 | 0.00 Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.011014 | 0.062439 | 0.13842 | 19.3 | 2.17 Comm | 0.057389 | 0.14453 | 0.33421 | 29.4 | 3.00
Output | 0.00023842 | 0.00025076 | 0.0002861 | 0.0 | 0.01 Output | 0.00038719 | 0.00073916 | 0.0017841 | 0.0 | 0.02
Modify | 9.2506e-05 | 9.9301e-05 | 0.00010395 | 0.0 | 0.00 Modify | 0.00018716 | 0.00022203 | 0.00026417 | 0.0 | 0.00
Other | | 0.0006654 | | | 0.02 Other | | 0.002119 | | | 0.04
Nlocal: 32 ave 32 max 32 min Nlocal: 32 ave 32 max 32 min
Histogram: 4 0 0 0 0 0 0 0 0 0 Histogram: 4 0 0 0 0 0 0 0 0 0
@ -176,4 +180,4 @@ Ave neighs/atom = 53.5156
Neighbor list builds = 0 Neighbor list builds = 0
Dangerous builds = 0 Dangerous builds = 0
Total wall time: 0:00:02 Total wall time: 0:00:04

View File

@ -276,9 +276,13 @@ void ComputeSNAAtom::compute_peratom()
for (int icoeff = 0; icoeff < ncoeff; icoeff++) { for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
double bi = snaptr[tid]->bvec[icoeff]; double bi = snaptr[tid]->bvec[icoeff];
// diagonal element of quadratic matrix
sna[i][ncount++] = 0.5*bi*bi;
// upper-triangular elements of quadratic matrix // upper-triangular elements of quadratic matrix
for (int jcoeff = icoeff; jcoeff < ncoeff; jcoeff++) for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++)
sna[i][ncount++] = bi*snaptr[tid]->bvec[jcoeff]; sna[i][ncount++] = bi*snaptr[tid]->bvec[jcoeff];
} }
} }

View File

@ -95,6 +95,11 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR,"Illegal compute snad/atom command"); error->all(FLERR,"Illegal compute snad/atom command");
rmin0 = atof(arg[iarg+1]); rmin0 = atof(arg[iarg+1]);
iarg += 2; iarg += 2;
} else if (strcmp(arg[iarg],"bzeroflag") == 0) {
if (iarg+2 > narg)
error->all(FLERR,"Illegal compute snad/atom command");
bzeroflag = atoi(arg[iarg+1]);
iarg += 2;
} else if (strcmp(arg[iarg],"switchflag") == 0) { } else if (strcmp(arg[iarg],"switchflag") == 0) {
if (iarg+2 > narg) if (iarg+2 > narg)
error->all(FLERR,"Illegal compute snad/atom command"); error->all(FLERR,"Illegal compute snad/atom command");
@ -121,16 +126,11 @@ ComputeSNADAtom::ComputeSNADAtom(LAMMPS *lmp, int narg, char **arg) :
} }
ncoeff = snaptr[0]->ncoeff; ncoeff = snaptr[0]->ncoeff;
twoncoeff = 2*ncoeff; nperdim = ncoeff;
threencoeff = 3*ncoeff; if (quadraticflag) nperdim += (ncoeff*(ncoeff+1))/2;
size_peratom_cols = threencoeff*atom->ntypes; yoffset = nperdim;
if (quadraticflag) { zoffset = 2*nperdim;
ncoeffq = (ncoeff*(ncoeff+1))/2; size_peratom_cols = 3*nperdim*atom->ntypes;
twoncoeffq = 2*ncoeffq;
threencoeffq = 3*ncoeffq;
size_peratom_cols +=
threencoeffq*atom->ntypes;
}
comm_reverse = size_peratom_cols; comm_reverse = size_peratom_cols;
peratom_flag = 1; peratom_flag = 1;
@ -248,9 +248,10 @@ void ComputeSNADAtom::compute_peratom()
const int* const jlist = firstneigh[i]; const int* const jlist = firstneigh[i];
const int jnum = numneigh[i]; const int jnum = numneigh[i];
const int typeoffset = threencoeff*(atom->type[i]-1); // const int typeoffset = threencoeff*(atom->type[i]-1);
const int quadraticoffset = threencoeff*atom->ntypes + // const int quadraticoffset = threencoeff*atom->ntypes +
threencoeffq*(atom->type[i]-1); // threencoeffq*(atom->type[i]-1);
const int typeoffset = 3*nperdim*(atom->type[i]-1);
// insure rij, inside, and typej are of size jnum // insure rij, inside, and typej are of size jnum
@ -304,16 +305,17 @@ void ComputeSNADAtom::compute_peratom()
for (int icoeff = 0; icoeff < ncoeff; icoeff++) { for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
snadi[icoeff] += snaptr[tid]->dbvec[icoeff][0]; snadi[icoeff] += snaptr[tid]->dbvec[icoeff][0];
snadi[icoeff+ncoeff] += snaptr[tid]->dbvec[icoeff][1]; snadi[icoeff+yoffset] += snaptr[tid]->dbvec[icoeff][1];
snadi[icoeff+twoncoeff] += snaptr[tid]->dbvec[icoeff][2]; snadi[icoeff+zoffset] += snaptr[tid]->dbvec[icoeff][2];
snadj[icoeff] -= snaptr[tid]->dbvec[icoeff][0]; snadj[icoeff] -= snaptr[tid]->dbvec[icoeff][0];
snadj[icoeff+ncoeff] -= snaptr[tid]->dbvec[icoeff][1]; snadj[icoeff+yoffset] -= snaptr[tid]->dbvec[icoeff][1];
snadj[icoeff+twoncoeff] -= snaptr[tid]->dbvec[icoeff][2]; snadj[icoeff+zoffset] -= snaptr[tid]->dbvec[icoeff][2];
} }
if (quadraticflag) { if (quadraticflag) {
double *snadi = snad[i]+quadraticoffset; const int quadraticoffset = ncoeff;
double *snadj = snad[j]+quadraticoffset; snadi += quadraticoffset;
snadj += quadraticoffset;
int ncount = 0; int ncount = 0;
for (int icoeff = 0; icoeff < ncoeff; icoeff++) { for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
double bi = snaptr[tid]->bvec[icoeff]; double bi = snaptr[tid]->bvec[icoeff];
@ -321,21 +323,36 @@ void ComputeSNADAtom::compute_peratom()
double biy = snaptr[tid]->dbvec[icoeff][1]; double biy = snaptr[tid]->dbvec[icoeff][1];
double biz = snaptr[tid]->dbvec[icoeff][2]; double biz = snaptr[tid]->dbvec[icoeff][2];
// diagonal elements of quadratic matrix
double dbxtmp = bi*bix;
double dbytmp = bi*biy;
double dbztmp = bi*biz;
snadi[ncount] += dbxtmp;
snadi[ncount+yoffset] += dbytmp;
snadi[ncount+zoffset] += dbztmp;
snadj[ncount] -= dbxtmp;
snadj[ncount+yoffset] -= dbytmp;
snadj[ncount+zoffset] -= dbztmp;
ncount++;
// upper-triangular elements of quadratic matrix // upper-triangular elements of quadratic matrix
for (int jcoeff = icoeff; jcoeff < ncoeff; jcoeff++) { for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) {
double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0] double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0]
+ bix*snaptr[tid]->bvec[jcoeff]; + bix*snaptr[tid]->bvec[jcoeff];
double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1] double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1]
+ biy*snaptr[tid]->bvec[jcoeff]; + biy*snaptr[tid]->bvec[jcoeff];
double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2] double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2]
+ biz*snaptr[tid]->bvec[jcoeff]; + biz*snaptr[tid]->bvec[jcoeff];
snadi[ncount] += dbxtmp;
snadi[ncount+ncoeffq] += dbytmp; snadi[ncount] += dbxtmp;
snadi[ncount+twoncoeffq] += dbztmp; snadi[ncount+yoffset] += dbytmp;
snadj[ncount] -= dbxtmp; snadi[ncount+zoffset] += dbztmp;
snadj[ncount+ncoeffq] -= dbytmp; snadj[ncount] -= dbxtmp;
snadj[ncount+twoncoeffq] -= dbztmp; snadj[ncount+yoffset] -= dbytmp;
snadj[ncount+zoffset] -= dbztmp;
ncount++; ncount++;
} }
} }
@ -361,7 +378,7 @@ int ComputeSNADAtom::pack_reverse_comm(int n, int first, double *buf)
for (i = first; i < last; i++) for (i = first; i < last; i++)
for (icoeff = 0; icoeff < size_peratom_cols; icoeff++) for (icoeff = 0; icoeff < size_peratom_cols; icoeff++)
buf[m++] = snad[i][icoeff]; buf[m++] = snad[i][icoeff];
return comm_reverse; return m;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
@ -387,8 +404,7 @@ double ComputeSNADAtom::memory_usage()
double bytes = nmax*size_peratom_cols * sizeof(double); double bytes = nmax*size_peratom_cols * sizeof(double);
bytes += 3*njmax*sizeof(double); bytes += 3*njmax*sizeof(double);
bytes += njmax*sizeof(int); bytes += njmax*sizeof(int);
bytes += threencoeff*atom->ntypes; bytes += 3*nperdim*atom->ntypes;
if (quadraticflag) bytes += threencoeffq*atom->ntypes;
bytes += snaptr[0]->memory_usage()*comm->nthreads; bytes += snaptr[0]->memory_usage()*comm->nthreads;
return bytes; return bytes;
} }

View File

@ -37,7 +37,7 @@ class ComputeSNADAtom : public Compute {
private: private:
int nmax, njmax, diagonalstyle; int nmax, njmax, diagonalstyle;
int ncoeff, twoncoeff, threencoeff, ncoeffq, twoncoeffq, threencoeffq; int ncoeff, nperdim, yoffset, zoffset;
double **cutsq; double **cutsq;
class NeighList *list; class NeighList *list;
double **snad; double **snad;

View File

@ -96,6 +96,11 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) :
error->all(FLERR,"Illegal compute snav/atom command"); error->all(FLERR,"Illegal compute snav/atom command");
switchflag = atoi(arg[iarg+1]); switchflag = atoi(arg[iarg+1]);
iarg += 2; iarg += 2;
} else if (strcmp(arg[iarg],"bzeroflag") == 0) {
if (iarg+2 > narg)
error->all(FLERR,"Illegal compute snav/atom command");
bzeroflag = atoi(arg[iarg+1]);
iarg += 2;
} else if (strcmp(arg[iarg],"quadraticflag") == 0) { } else if (strcmp(arg[iarg],"quadraticflag") == 0) {
if (iarg+2 > narg) if (iarg+2 > narg)
error->all(FLERR,"Illegal compute snav/atom command"); error->all(FLERR,"Illegal compute snav/atom command");
@ -117,22 +122,9 @@ ComputeSNAVAtom::ComputeSNAVAtom(LAMMPS *lmp, int narg, char **arg) :
} }
ncoeff = snaptr[0]->ncoeff; ncoeff = snaptr[0]->ncoeff;
twoncoeff = 2*ncoeff; nperdim = ncoeff;
threencoeff = 3*ncoeff; if (quadraticflag) nperdim += (ncoeff*(ncoeff+1))/2;
fourncoeff = 4*ncoeff; size_peratom_cols = 6*nperdim*atom->ntypes;
fivencoeff = 5*ncoeff;
sixncoeff = 6*ncoeff;
size_peratom_cols = sixncoeff*atom->ntypes;
if (quadraticflag) {
ncoeffq = ncoeff*ncoeff;
twoncoeffq = 2*ncoeffq;
threencoeffq = 3*ncoeffq;
fourncoeffq = 4*ncoeffq;
fivencoeffq = 5*ncoeffq;
sixncoeffq = 6*ncoeffq;
size_peratom_cols +=
sixncoeffq*atom->ntypes;
}
comm_reverse = size_peratom_cols; comm_reverse = size_peratom_cols;
peratom_flag = 1; peratom_flag = 1;
@ -251,9 +243,7 @@ void ComputeSNAVAtom::compute_peratom()
const int* const jlist = firstneigh[i]; const int* const jlist = firstneigh[i];
const int jnum = numneigh[i]; const int jnum = numneigh[i];
const int typeoffset = sixncoeff*(atom->type[i]-1); const int typeoffset = 6*nperdim*(atom->type[i]-1);
const int quadraticoffset = sixncoeff*atom->ntypes +
sixncoeffq*(atom->type[i]-1);
// insure rij, inside, and typej are of size jnum // insure rij, inside, and typej are of size jnum
@ -307,23 +297,24 @@ void ComputeSNAVAtom::compute_peratom()
double *snavj = snav[j]+typeoffset; double *snavj = snav[j]+typeoffset;
for (int icoeff = 0; icoeff < ncoeff; icoeff++) { for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
snavi[icoeff] += snaptr[tid]->dbvec[icoeff][0]*xtmp; snavi[icoeff] += snaptr[tid]->dbvec[icoeff][0]*xtmp;
snavi[icoeff+ncoeff] += snaptr[tid]->dbvec[icoeff][1]*ytmp; snavi[icoeff+nperdim] += snaptr[tid]->dbvec[icoeff][1]*ytmp;
snavi[icoeff+twoncoeff] += snaptr[tid]->dbvec[icoeff][2]*ztmp; snavi[icoeff+2*nperdim] += snaptr[tid]->dbvec[icoeff][2]*ztmp;
snavi[icoeff+threencoeff] += snaptr[tid]->dbvec[icoeff][1]*ztmp; snavi[icoeff+3*nperdim] += snaptr[tid]->dbvec[icoeff][1]*ztmp;
snavi[icoeff+fourncoeff] += snaptr[tid]->dbvec[icoeff][0]*ztmp; snavi[icoeff+4*nperdim] += snaptr[tid]->dbvec[icoeff][0]*ztmp;
snavi[icoeff+fivencoeff] += snaptr[tid]->dbvec[icoeff][0]*ytmp; snavi[icoeff+5*nperdim] += snaptr[tid]->dbvec[icoeff][0]*ytmp;
snavj[icoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][0]; snavj[icoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][0];
snavj[icoeff+ncoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][1]; snavj[icoeff+nperdim] -= snaptr[tid]->dbvec[icoeff][1]*x[j][1];
snavj[icoeff+twoncoeff] -= snaptr[tid]->dbvec[icoeff][2]*x[j][2]; snavj[icoeff+2*nperdim] -= snaptr[tid]->dbvec[icoeff][2]*x[j][2];
snavj[icoeff+threencoeff] -= snaptr[tid]->dbvec[icoeff][1]*x[j][2]; snavj[icoeff+3*nperdim] -= snaptr[tid]->dbvec[icoeff][1]*x[j][2];
snavj[icoeff+fourncoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][2]; snavj[icoeff+4*nperdim] -= snaptr[tid]->dbvec[icoeff][0]*x[j][2];
snavj[icoeff+fivencoeff] -= snaptr[tid]->dbvec[icoeff][0]*x[j][1]; snavj[icoeff+5*nperdim] -= snaptr[tid]->dbvec[icoeff][0]*x[j][1];
} }
if (quadraticflag) { if (quadraticflag) {
double *snavi = snav[i]+quadraticoffset; const int quadraticoffset = ncoeff;
double *snavj = snav[j]+quadraticoffset; snavi += quadraticoffset;
snavj += quadraticoffset;
int ncount = 0; int ncount = 0;
for (int icoeff = 0; icoeff < ncoeff; icoeff++) { for (int icoeff = 0; icoeff < ncoeff; icoeff++) {
double bi = snaptr[tid]->bvec[icoeff]; double bi = snaptr[tid]->bvec[icoeff];
@ -331,27 +322,46 @@ void ComputeSNAVAtom::compute_peratom()
double biy = snaptr[tid]->dbvec[icoeff][1]; double biy = snaptr[tid]->dbvec[icoeff][1];
double biz = snaptr[tid]->dbvec[icoeff][2]; double biz = snaptr[tid]->dbvec[icoeff][2];
// diagonal element of quadratic matrix
double dbxtmp = bi*bix;
double dbytmp = bi*biy;
double dbztmp = bi*biz;
snavi[ncount] += dbxtmp*xtmp;
snavi[ncount+nperdim] += dbytmp*ytmp;
snavi[ncount+2*nperdim] += dbztmp*ztmp;
snavi[ncount+3*nperdim] += dbytmp*ztmp;
snavi[ncount+4*nperdim] += dbxtmp*ztmp;
snavi[ncount+5*nperdim] += dbxtmp*ytmp;
snavj[ncount] -= dbxtmp*x[j][0];
snavj[ncount+nperdim] -= dbytmp*x[j][1];
snavj[ncount+2*nperdim] -= dbztmp*x[j][2];
snavj[ncount+3*nperdim] -= dbytmp*x[j][2];
snavj[ncount+4*nperdim] -= dbxtmp*x[j][2];
snavj[ncount+5*nperdim] -= dbxtmp*x[j][1];
ncount++;
// upper-triangular elements of quadratic matrix // upper-triangular elements of quadratic matrix
for (int jcoeff = icoeff; jcoeff < ncoeff; jcoeff++) { for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) {
double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0] double dbxtmp = bi*snaptr[tid]->dbvec[jcoeff][0]
+ bix*snaptr[tid]->bvec[jcoeff]; + bix*snaptr[tid]->bvec[jcoeff];
double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1] double dbytmp = bi*snaptr[tid]->dbvec[jcoeff][1]
+ biy*snaptr[tid]->bvec[jcoeff]; + biy*snaptr[tid]->bvec[jcoeff];
double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2] double dbztmp = bi*snaptr[tid]->dbvec[jcoeff][2]
+ biz*snaptr[tid]->bvec[jcoeff]; + biz*snaptr[tid]->bvec[jcoeff];
snavi[ncount] += dbxtmp*xtmp; snavi[ncount] += dbxtmp*xtmp;
snavi[ncount+ncoeffq] += dbytmp*ytmp; snavi[ncount+nperdim] += dbytmp*ytmp;
snavi[ncount+twoncoeffq] += dbztmp*ztmp; snavi[ncount+2*nperdim] += dbztmp*ztmp;
snavi[ncount+threencoeffq] += dbytmp*ztmp; snavi[ncount+3*nperdim] += dbytmp*ztmp;
snavi[ncount+fourncoeffq] += dbxtmp*ztmp; snavi[ncount+4*nperdim] += dbxtmp*ztmp;
snavi[ncount+fivencoeffq] += dbxtmp*ytmp; snavi[ncount+5*nperdim] += dbxtmp*ytmp;
snavj[ncount] -= dbxtmp*x[j][0]; snavj[ncount] -= dbxtmp*x[j][0];
snavj[ncount+ncoeffq] -= dbytmp*x[j][1]; snavj[ncount+nperdim] -= dbytmp*x[j][1];
snavj[ncount+twoncoeffq] -= dbztmp*x[j][2]; snavj[ncount+2*nperdim] -= dbztmp*x[j][2];
snavj[ncount+threencoeffq] -= dbytmp*x[j][2]; snavj[ncount+3*nperdim] -= dbytmp*x[j][2];
snavj[ncount+fourncoeffq] -= dbxtmp*x[j][2]; snavj[ncount+4*nperdim] -= dbxtmp*x[j][2];
snavj[ncount+fivencoeffq] -= dbxtmp*x[j][1]; snavj[ncount+5*nperdim] -= dbxtmp*x[j][1];
ncount++; ncount++;
} }
} }
@ -377,7 +387,7 @@ int ComputeSNAVAtom::pack_reverse_comm(int n, int first, double *buf)
for (i = first; i < last; i++) for (i = first; i < last; i++)
for (icoeff = 0; icoeff < size_peratom_cols; icoeff++) for (icoeff = 0; icoeff < size_peratom_cols; icoeff++)
buf[m++] = snav[i][icoeff]; buf[m++] = snav[i][icoeff];
return comm_reverse; return m;
} }
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
@ -403,8 +413,8 @@ double ComputeSNAVAtom::memory_usage()
double bytes = nmax*size_peratom_cols * sizeof(double); double bytes = nmax*size_peratom_cols * sizeof(double);
bytes += 3*njmax*sizeof(double); bytes += 3*njmax*sizeof(double);
bytes += njmax*sizeof(int); bytes += njmax*sizeof(int);
bytes += sixncoeff*atom->ntypes; bytes += 6*nperdim*atom->ntypes;
if (quadraticflag) bytes += sixncoeffq*atom->ntypes; if (quadraticflag) bytes += 6*nperdim*atom->ntypes;
bytes += snaptr[0]->memory_usage()*comm->nthreads; bytes += snaptr[0]->memory_usage()*comm->nthreads;
return bytes; return bytes;
} }

View File

@ -37,8 +37,7 @@ class ComputeSNAVAtom : public Compute {
private: private:
int nmax, njmax, diagonalstyle; int nmax, njmax, diagonalstyle;
int ncoeff, twoncoeff, threencoeff, fourncoeff, fivencoeff, sixncoeff; int ncoeff, nperdim;
int ncoeffq, twoncoeffq, threencoeffq, fourncoeffq, fivencoeffq, sixncoeffq;
double **cutsq; double **cutsq;
class NeighList *list; class NeighList *list;
double **snav; double **snav;

View File

@ -278,14 +278,15 @@ void PairSNAP::compute_regular(int eflag, int vflag)
double bveci = snaptr->bvec[icoeff]; double bveci = snaptr->bvec[icoeff];
double fack = coeffi[k]*bveci; double fack = coeffi[k]*bveci;
double* dbveci = snaptr->dbvec[icoeff]; double* dbveci = snaptr->dbvec[icoeff];
fij[0] += fack*snaptr->dbvec[icoeff][0]; fij[0] += fack*dbveci[0];
fij[1] += fack*snaptr->dbvec[icoeff][1]; fij[1] += fack*dbveci[1];
fij[2] += fack*snaptr->dbvec[icoeff][2]; fij[2] += fack*dbveci[2];
k++; k++;
for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) { for (int jcoeff = icoeff+1; jcoeff < ncoeff; jcoeff++) {
double facki = coeffi[k]*bveci; double facki = coeffi[k]*bveci;
double fackj = coeffi[k]*snaptr->bvec[jcoeff]; double fackj = coeffi[k]*snaptr->bvec[jcoeff];
double* dbvecj = snaptr->dbvec[jcoeff]; double* dbvecj = snaptr->dbvec[jcoeff];
fij[0] += facki*dbvecj[0]+fackj*dbveci[0]; fij[0] += facki*dbvecj[0]+fackj*dbveci[0];
fij[1] += facki*dbvecj[1]+fackj*dbveci[1]; fij[1] += facki*dbvecj[1]+fackj*dbveci[1];
fij[2] += facki*dbvecj[2]+fackj*dbveci[2]; fij[2] += facki*dbvecj[2]+fackj*dbveci[2];
@ -1529,10 +1530,10 @@ void PairSNAP::coeff(int narg, char **arg)
} }
if (comm->me == 0) if (comm->me == 0)
printf("ncoeff = %d snancoeff = %d \n",ncoeff,sna[0]->ncoeff); if (ncoeff != sna[0]->ncoeff) {
if (ncoeff != sna[0]->ncoeff) { printf("ncoeff = %d snancoeff = %d \n",ncoeff,sna[0]->ncoeff);
error->all(FLERR,"Incorrect SNAP parameter file"); error->all(FLERR,"Incorrect SNAP parameter file");
} }
// Calculate maximum cutoff for all elements // Calculate maximum cutoff for all elements

View File

@ -37,11 +37,8 @@ public:
virtual double init_one(int, int); virtual double init_one(int, int);
virtual double memory_usage(); virtual double memory_usage();
double rcutfac, quadraticflag; // declared public to workaround gcc 4.9
int ncoeff; // compiler bug, manifest in KOKKOS package
protected: protected:
int ncoeffq, ncoeffall; int ncoeff, ncoeffq, ncoeffall;
double **bvec, ***dbvec; double **bvec, ***dbvec;
class SNA** sna; class SNA** sna;
int nmax; int nmax;
@ -100,8 +97,8 @@ protected:
double *wjelem; // elements weights double *wjelem; // elements weights
double **coeffelem; // element bispectrum coefficients double **coeffelem; // element bispectrum coefficients
int *map; // mapping from atom types to elements int *map; // mapping from atom types to elements
int twojmax, diagonalstyle, switchflag, bzeroflag; int twojmax, diagonalstyle, switchflag, bzeroflag, quadraticflag;
double rfac0, rmin0, wj1, wj2; double rcutfac, rfac0, rmin0, wj1, wj2;
int rcutfacflag, twojmaxflag; // flags for required parameters int rcutfacflag, twojmaxflag; // flags for required parameters
}; };