Removed redundant element list from pair_coeff snap syntax
This commit is contained in:
@ -16,7 +16,7 @@ pair_style snap :pre
|
|||||||
[Examples:]
|
[Examples:]
|
||||||
|
|
||||||
pair_style snap
|
pair_style snap
|
||||||
pair_coeff * * InP.snapcoeff In P InP.snapparam In In P P :pre
|
pair_coeff * * InP.snapcoeff InP.snapparam In In P P :pre
|
||||||
|
|
||||||
[Description:]
|
[Description:]
|
||||||
|
|
||||||
@ -48,14 +48,12 @@ not set in the pair_style or pair_coeff command; they are specified in
|
|||||||
the SNAP potential files themselves.
|
the SNAP potential files themselves.
|
||||||
|
|
||||||
Only a single pair_coeff command is used with the {snap} style which
|
Only a single pair_coeff command is used with the {snap} style which
|
||||||
specifies two SNAP files and the list SNAP element(s) to be
|
specifies a SNAP coefficient file followed by a SNAP parameter file
|
||||||
extracted.
|
and then N additional arguments specifying the mapping of SNAP
|
||||||
The SNAP elements are mapped to LAMMPS atom types by specifying
|
elements to LAMMPS atom types, where N is the number of
|
||||||
N additional arguments after the 2nd filename in the pair_coeff
|
LAMMPS atom types:
|
||||||
command, where N is the number of LAMMPS atom types:
|
|
||||||
|
|
||||||
SNAP element file
|
SNAP coefficient file
|
||||||
Elem1, Elem2, ...
|
|
||||||
SNAP parameter file
|
SNAP parameter file
|
||||||
N element names = mapping of SNAP elements to atom types :ul
|
N element names = mapping of SNAP elements to atom types :ul
|
||||||
|
|
||||||
@ -63,13 +61,11 @@ As an example, if a LAMMPS indium phosphide simulation has 4 atoms
|
|||||||
types, with the first two being indium and the 3rd and 4th being
|
types, with the first two being indium and the 3rd and 4th being
|
||||||
phophorous, the pair_coeff command would look like this:
|
phophorous, the pair_coeff command would look like this:
|
||||||
|
|
||||||
pair_coeff * * snap InP.snapcoeff In P InP.snapparam In In P P :pre
|
pair_coeff * * snap InP.snapcoeff InP.snapparam In In P P :pre
|
||||||
|
|
||||||
The 1st 2 arguments must be * * so as to span all LAMMPS atom types.
|
The 1st 2 arguments must be * * so as to span all LAMMPS atom types.
|
||||||
The two filenames are for the element and parameter files, respectively.
|
The two filenames are for the coefficient and parameter files, respectively.
|
||||||
The 'In' and 'P' arguments (between the file names) are the two elements
|
The two trailing 'In' arguments map LAMMPS atom types 1 and 2 to the
|
||||||
which will be extracted from the element file. The
|
|
||||||
two trailing 'In' arguments map LAMMPS atom types 1 and 2 to the
|
|
||||||
SNAP 'In' element. The two trailing 'P' arguments map LAMMPS atom types
|
SNAP 'In' element. The two trailing 'P' arguments map LAMMPS atom types
|
||||||
3 and 4 to the SNAP 'P' element.
|
3 and 4 to the SNAP 'P' element.
|
||||||
|
|
||||||
@ -79,10 +75,11 @@ This can be used when a {snap} potential is used as part of the
|
|||||||
{hybrid} pair style. The NULL values are placeholders for atom types
|
{hybrid} pair style. The NULL values are placeholders for atom types
|
||||||
that will be used with other potentials.
|
that will be used with other potentials.
|
||||||
|
|
||||||
The name of the SNAP element file usually ends in the
|
The name of the SNAP coefficient file usually ends in the
|
||||||
".snapcoeff" extension. It may contain coefficients
|
".snapcoeff" extension. It may contain coefficients
|
||||||
for many SNAP elements.
|
for many SNAP elements. The only requirement is that it
|
||||||
Only those elements listed in the pair_coeff command are extracted.
|
contain at least those element names appearing in the
|
||||||
|
LAMMPS mapping list.
|
||||||
The name of the SNAP parameter file usually ends in the ".snapparam"
|
The name of the SNAP parameter file usually ends in the ".snapparam"
|
||||||
extension. It contains a small number
|
extension. It contains a small number
|
||||||
of parameters that define the overall form of the SNAP potential.
|
of parameters that define the overall form of the SNAP potential.
|
||||||
@ -110,8 +107,7 @@ It is convenient to keep these commands in a separate file that can
|
|||||||
be inserted in any LAMMPS input script using the "include"_include.html
|
be inserted in any LAMMPS input script using the "include"_include.html
|
||||||
command.
|
command.
|
||||||
|
|
||||||
The top of the SNAP element file can contain any number of blank and comment
|
The top of the SNAP coefficient file can contain any number of blank and comment lines (start with #), but follows a strict
|
||||||
lines (start with #), but follows a strict
|
|
||||||
format after that. The first non-blank non-comment
|
format after that. The first non-blank non-comment
|
||||||
line must contain two integers:
|
line must contain two integers:
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
1
examples/snap/Mo_Chen_PRM2017.snap
Symbolic link
1
examples/snap/Mo_Chen_PRM2017.snap
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../potentials/Mo_Chen_PRM2017.snap
|
||||||
@ -1,35 +0,0 @@
|
|||||||
# 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
|
|
||||||
1 31
|
|
||||||
Mo 0.5 1
|
|
||||||
-17.2757958404
|
|
||||||
0.00431015861472
|
|
||||||
0.0657685117891
|
|
||||||
0.477733335702
|
|
||||||
0.0152688837211
|
|
||||||
0.77559888196
|
|
||||||
0.284846429566
|
|
||||||
0.148804982644
|
|
||||||
0.0573702179736
|
|
||||||
0.19281989434
|
|
||||||
0.323441703578
|
|
||||||
0.101324335724
|
|
||||||
0.0139639846514
|
|
||||||
-0.0324444749083
|
|
||||||
0.0349797952779
|
|
||||||
0.0613023441282
|
|
||||||
0.0881078513046
|
|
||||||
0.118716074611
|
|
||||||
0.0069662975532
|
|
||||||
-0.0174658914685
|
|
||||||
-0.0178902177779
|
|
||||||
0.0195993756659
|
|
||||||
0.0719238160707
|
|
||||||
0.0344832661036
|
|
||||||
-0.0358616891662
|
|
||||||
-0.0292380783172
|
|
||||||
-0.0334933909866
|
|
||||||
0.00595462520243
|
|
||||||
0.0754556638328
|
|
||||||
-0.000972545258845
|
|
||||||
-0.0100170422751
|
|
||||||
1
examples/snap/Mo_Chen_PRM2017.snapcoeff
Symbolic link
1
examples/snap/Mo_Chen_PRM2017.snapcoeff
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../potentials/Mo_Chen_PRM2017.snapcoeff
|
||||||
@ -1,4 +0,0 @@
|
|||||||
# 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
|
|
||||||
rcutfac 4.615858
|
|
||||||
twojmax 6
|
|
||||||
1
examples/snap/Mo_Chen_PRM2017.snapparam
Symbolic link
1
examples/snap/Mo_Chen_PRM2017.snapparam
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../potentials/Mo_Chen_PRM2017.snapparam
|
||||||
@ -1,17 +0,0 @@
|
|||||||
# 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
|
|
||||||
# Assumes 1 LAMMPS atom type
|
|
||||||
|
|
||||||
variable zblcutinner equal 4
|
|
||||||
variable zblcutouter equal 4.8
|
|
||||||
variable zblz equal 73
|
|
||||||
|
|
||||||
# Specify hybrid with SNAP, ZBL
|
|
||||||
|
|
||||||
pair_style hybrid/overlay &
|
|
||||||
zbl ${zblcutinner} ${zblcutouter} &
|
|
||||||
snap
|
|
||||||
pair_coeff 1 1 zbl ${zblz} ${zblz}
|
|
||||||
pair_coeff * * snap Ta06A.snapcoeff Ta Ta06A.snapparam Ta
|
|
||||||
|
|
||||||
1
examples/snap/Ta06A.snap
Symbolic link
1
examples/snap/Ta06A.snap
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../potentials/Ta06A.snap
|
||||||
@ -1,37 +0,0 @@
|
|||||||
# DATE: 2014-09-05 CONTRIBUTOR: Aidan Thompson athomps@sandia.gov CITATION: Thompson, Swiler, Trott, Foiles and Tucker, arxiv.org, 1409.3880 (2014)
|
|
||||||
|
|
||||||
# LAMMPS SNAP coefficients for Ta_Cand06A
|
|
||||||
|
|
||||||
1 31
|
|
||||||
Ta 0.5 1
|
|
||||||
-2.92477
|
|
||||||
-0.01137
|
|
||||||
-0.00775
|
|
||||||
-0.04907
|
|
||||||
-0.15047
|
|
||||||
0.09157
|
|
||||||
0.05590
|
|
||||||
0.05785
|
|
||||||
-0.11615
|
|
||||||
-0.17122
|
|
||||||
-0.10583
|
|
||||||
0.03941
|
|
||||||
-0.11284
|
|
||||||
0.03939
|
|
||||||
-0.07331
|
|
||||||
-0.06582
|
|
||||||
-0.09341
|
|
||||||
-0.10587
|
|
||||||
-0.15497
|
|
||||||
0.04820
|
|
||||||
0.00205
|
|
||||||
0.00060
|
|
||||||
-0.04898
|
|
||||||
-0.05084
|
|
||||||
-0.03371
|
|
||||||
-0.01441
|
|
||||||
-0.01501
|
|
||||||
-0.00599
|
|
||||||
-0.06373
|
|
||||||
0.03965
|
|
||||||
0.01072
|
|
||||||
1
examples/snap/Ta06A.snapcoeff
Symbolic link
1
examples/snap/Ta06A.snapcoeff
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../potentials/Ta06A.snapcoeff
|
||||||
@ -1,15 +0,0 @@
|
|||||||
# DATE: 2014-09-05 CONTRIBUTOR: Aidan Thompson athomps@sandia.gov CITATION: Thompson, Swiler, Trott, Foiles and Tucker, arxiv.org, 1409.3880 (2014)
|
|
||||||
|
|
||||||
# LAMMPS SNAP parameters for Ta_Cand06A
|
|
||||||
|
|
||||||
# required
|
|
||||||
rcutfac 4.67637
|
|
||||||
twojmax 6
|
|
||||||
|
|
||||||
# optional
|
|
||||||
|
|
||||||
rfac0 0.99363
|
|
||||||
rmin0 0
|
|
||||||
diagonalstyle 3
|
|
||||||
bzeroflag 0
|
|
||||||
quadraticflag 0
|
|
||||||
1
examples/snap/Ta06A.snapparam
Symbolic link
1
examples/snap/Ta06A.snapparam
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../potentials/Ta06A.snapparam
|
||||||
@ -1,16 +0,0 @@
|
|||||||
# 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.
|
|
||||||
variable zblcutinner equal 4
|
|
||||||
variable zblcutouter equal 4.8
|
|
||||||
variable zblz equal 74
|
|
||||||
|
|
||||||
# Specify hybrid with SNAP and ZBL
|
|
||||||
|
|
||||||
pair_style hybrid/overlay &
|
|
||||||
zbl ${zblcutinner} ${zblcutouter} &
|
|
||||||
snap
|
|
||||||
pair_coeff 1 1 zbl ${zblz} ${zblz}
|
|
||||||
pair_coeff * * snap W_2940_2017_2.snapcoeff W W_2940_2017_2.snapparam W
|
|
||||||
|
|
||||||
#Nomenclature on the snap files are Element_DakotaID_Year_Month
|
|
||||||
1
examples/snap/W_2940_2017_2.snap
Symbolic link
1
examples/snap/W_2940_2017_2.snap
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../potentials/W_2940_2017_2.snap
|
||||||
@ -1,62 +0,0 @@
|
|||||||
# 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]
|
|
||||||
#
|
|
||||||
# LAMMPS SNAP coefficients for W
|
|
||||||
|
|
||||||
1 56
|
|
||||||
W 0.5 1
|
|
||||||
0.781170857801
|
|
||||||
-0.001794941735
|
|
||||||
-0.016628679036
|
|
||||||
-0.066625537037
|
|
||||||
-0.073716343967
|
|
||||||
-0.062913923923
|
|
||||||
0.032552694672
|
|
||||||
-0.134901744419
|
|
||||||
-0.075076334103
|
|
||||||
-0.148558616547
|
|
||||||
-0.140808831101
|
|
||||||
-0.166749145704
|
|
||||||
-0.047487675984
|
|
||||||
-0.049892090603
|
|
||||||
-0.032483739965
|
|
||||||
-0.114766534860
|
|
||||||
-0.106759718242
|
|
||||||
-0.125894850485
|
|
||||||
-0.103409735225
|
|
||||||
-0.095247335447
|
|
||||||
-0.061998736346
|
|
||||||
-0.053895610976
|
|
||||||
-0.010799734206
|
|
||||||
-0.011644828900
|
|
||||||
-0.028316826924
|
|
||||||
0.011176085541
|
|
||||||
0.064619474684
|
|
||||||
-0.023886279996
|
|
||||||
-0.004099224312
|
|
||||||
-0.056084222496
|
|
||||||
-0.035551497650
|
|
||||||
-0.056678501024
|
|
||||||
-0.004905851656
|
|
||||||
-0.015701146162
|
|
||||||
-0.008462280779
|
|
||||||
0.016429018676
|
|
||||||
0.032432633993
|
|
||||||
-0.010805361272
|
|
||||||
-0.014841893457
|
|
||||||
0.019414134562
|
|
||||||
-0.008112452759
|
|
||||||
-0.002700775447
|
|
||||||
0.007032887063
|
|
||||||
-0.009706065042
|
|
||||||
0.008385967833
|
|
||||||
0.028606085876
|
|
||||||
-0.007003591067
|
|
||||||
0.006467260152
|
|
||||||
-0.006666986361
|
|
||||||
0.029243285316
|
|
||||||
0.002477673872
|
|
||||||
-0.000199497504
|
|
||||||
0.004068954075
|
|
||||||
0.006036129972
|
|
||||||
-0.013010633924
|
|
||||||
-0.008314173699
|
|
||||||
1
examples/snap/W_2940_2017_2.snapcoeff
Symbolic link
1
examples/snap/W_2940_2017_2.snapcoeff
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../potentials/W_2940_2017_2.snapcoeff
|
||||||
@ -1,13 +0,0 @@
|
|||||||
# 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]
|
|
||||||
#
|
|
||||||
# required
|
|
||||||
rcutfac 4.73442
|
|
||||||
twojmax 8
|
|
||||||
|
|
||||||
# optional
|
|
||||||
|
|
||||||
rfac0 0.99363
|
|
||||||
rmin0 0
|
|
||||||
diagonalstyle 3
|
|
||||||
bzeroflag 0
|
|
||||||
quadraticflag 0
|
|
||||||
1
examples/snap/W_2940_2017_2.snapparam
Symbolic link
1
examples/snap/W_2940_2017_2.snapparam
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../potentials/W_2940_2017_2.snapparam
|
||||||
@ -1,17 +0,0 @@
|
|||||||
# 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.
|
|
||||||
variable zblcutinner equal 4
|
|
||||||
variable zblcutouter equal 4.8
|
|
||||||
variable zblz equal 74
|
|
||||||
|
|
||||||
# Specify hybrid with SNAP and ZBL
|
|
||||||
|
|
||||||
pair_style hybrid/overlay zbl ${zblcutinner} ${zblcutouter} snap table spline 10000 table spline 10000
|
|
||||||
pair_coeff 1 1 zbl ${zblz} ${zblz}
|
|
||||||
pair_coeff * * snap W_2940_2017_2.snapcoeff W W_2940_2017_2.snapparam W NULL
|
|
||||||
pair_coeff 2 2 table 1 He_He_JW2013.table HeHe
|
|
||||||
pair_coeff 1 2 table 2 W_He_JW2013.table WHe
|
|
||||||
#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.
|
|
||||||
|
|
||||||
1
examples/snap/W_2940_2017_2_He_JW2013.snap
Symbolic link
1
examples/snap/W_2940_2017_2_He_JW2013.snap
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../potentials/W_2940_2017_2_He_JW2013.snap
|
||||||
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
# 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)
|
# 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
|
# Generated by Materials Virtual Lab
|
||||||
# Definition of SNAP potential.
|
# Definition of SNAP potential.
|
||||||
pair_style snap
|
pair_style snap
|
||||||
pair_coeff * * Mo_Chen_PRM2017.snapcoeff Mo Mo_Chen_PRM2017.snapparam Mo
|
pair_coeff * * Mo_Chen_PRM2017.snapcoeff Mo_Chen_PRM2017.snapparam Mo
|
||||||
|
|
||||||
|
|||||||
@ -13,5 +13,5 @@ pair_style hybrid/overlay &
|
|||||||
zbl ${zblcutinner} ${zblcutouter} &
|
zbl ${zblcutinner} ${zblcutouter} &
|
||||||
snap
|
snap
|
||||||
pair_coeff 1 1 zbl ${zblz} ${zblz}
|
pair_coeff 1 1 zbl ${zblz} ${zblz}
|
||||||
pair_coeff * * snap Ta06A.snapcoeff Ta Ta06A.snapparam Ta
|
pair_coeff * * snap Ta06A.snapcoeff Ta06A.snapparam Ta
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,8 @@ twojmax 6
|
|||||||
|
|
||||||
# optional
|
# optional
|
||||||
|
|
||||||
gamma 1
|
|
||||||
rfac0 0.99363
|
rfac0 0.99363
|
||||||
rmin0 0
|
rmin0 0
|
||||||
diagonalstyle 3
|
diagonalstyle 3
|
||||||
|
bzeroflag 0
|
||||||
|
quadraticflag 0
|
||||||
|
|||||||
@ -5,12 +5,12 @@ 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 &
|
pair_style hybrid/overlay &
|
||||||
zbl ${zblcutinner} ${zblcutouter} &
|
zbl ${zblcutinner} ${zblcutouter} &
|
||||||
snap
|
snap
|
||||||
pair_coeff 1 1 zbl ${zblz} ${zblz}
|
pair_coeff 1 1 zbl ${zblz} ${zblz}
|
||||||
pair_coeff * * snap W_2940_2017_2.snapcoeff W W_2940_2017_2.snapparam W
|
pair_coeff * * snap W_2940_2017_2.snapcoeff W_2940_2017_2.snapparam W
|
||||||
|
|
||||||
#Nomenclature on the snap files are Element_DakotaID_Year_Month
|
#Nomenclature on the snap files are Element_DakotaID_Year_Month
|
||||||
|
|||||||
@ -6,7 +6,8 @@ twojmax 8
|
|||||||
|
|
||||||
# optional
|
# optional
|
||||||
|
|
||||||
gamma 1
|
|
||||||
rfac0 0.99363
|
rfac0 0.99363
|
||||||
rmin0 0
|
rmin0 0
|
||||||
diagonalstyle 3
|
diagonalstyle 3
|
||||||
|
bzeroflag 0
|
||||||
|
quadraticflag 0
|
||||||
|
|||||||
@ -5,11 +5,11 @@ 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_coeff 1 1 zbl ${zblz} ${zblz}
|
pair_coeff 1 1 zbl ${zblz} ${zblz}
|
||||||
pair_coeff * * snap W_2940_2017_2.snapcoeff W W_2940_2017_2.snapparam W NULL
|
pair_coeff * * snap W_2940_2017_2.snapcoeff W_2940_2017_2.snapparam W NULL
|
||||||
pair_coeff 2 2 table 1 He_He_JW2013.table HeHe
|
pair_coeff 2 2 table 1 He_He_JW2013.table HeHe
|
||||||
pair_coeff 1 2 table 2 W_He_JW2013.table WHe
|
pair_coeff 1 2 table 2 W_He_JW2013.table WHe
|
||||||
#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
|
||||||
|
|||||||
@ -1416,11 +1416,7 @@ void PairSNAP::settings(int narg, char **arg)
|
|||||||
|
|
||||||
void PairSNAP::coeff(int narg, char **arg)
|
void PairSNAP::coeff(int narg, char **arg)
|
||||||
{
|
{
|
||||||
// read SNAP element names between 2 filenames
|
if (narg < 5) error->all(FLERR,"Incorrect args for pair coefficients");
|
||||||
// nelements = # of SNAP elements
|
|
||||||
// elements = list of unique element names
|
|
||||||
|
|
||||||
if (narg < 6) error->all(FLERR,"Incorrect args for pair coefficients");
|
|
||||||
if (!allocated) allocate();
|
if (!allocated) allocate();
|
||||||
|
|
||||||
if (nelements) {
|
if (nelements) {
|
||||||
@ -1432,30 +1428,17 @@ void PairSNAP::coeff(int narg, char **arg)
|
|||||||
memory->destroy(coeffelem);
|
memory->destroy(coeffelem);
|
||||||
}
|
}
|
||||||
|
|
||||||
nelements = narg - 4 - atom->ntypes;
|
|
||||||
if (nelements < 1) error->all(FLERR,"Incorrect args for pair coefficients");
|
|
||||||
|
|
||||||
char* type1 = arg[0];
|
char* type1 = arg[0];
|
||||||
char* type2 = arg[1];
|
char* type2 = arg[1];
|
||||||
char* coefffilename = arg[2];
|
char* coefffilename = arg[2];
|
||||||
char** elemlist = &arg[3];
|
char* paramfilename = arg[3];
|
||||||
char* paramfilename = arg[3+nelements];
|
char** elemtypes = &arg[4];
|
||||||
char** elemtypes = &arg[4+nelements];
|
|
||||||
|
|
||||||
// insure I,J args are * *
|
// insure I,J args are * *
|
||||||
|
|
||||||
if (strcmp(type1,"*") != 0 || strcmp(type2,"*") != 0)
|
if (strcmp(type1,"*") != 0 || strcmp(type2,"*") != 0)
|
||||||
error->all(FLERR,"Incorrect args for pair coefficients");
|
error->all(FLERR,"Incorrect args for pair coefficients");
|
||||||
|
|
||||||
elements = new char*[nelements];
|
|
||||||
|
|
||||||
for (int i = 0; i < nelements; i++) {
|
|
||||||
char* elemname = elemlist[i];
|
|
||||||
int n = strlen(elemname) + 1;
|
|
||||||
elements[i] = new char[n];
|
|
||||||
strcpy(elements[i],elemname);
|
|
||||||
}
|
|
||||||
|
|
||||||
// read snapcoeff and snapparam files
|
// read snapcoeff and snapparam files
|
||||||
|
|
||||||
read_files(coefffilename,paramfilename);
|
read_files(coefffilename,paramfilename);
|
||||||
@ -1631,22 +1614,19 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename)
|
|||||||
iword = 1;
|
iword = 1;
|
||||||
words[iword] = strtok(NULL,"' \t\n\r\f");
|
words[iword] = strtok(NULL,"' \t\n\r\f");
|
||||||
|
|
||||||
int nelemfile = atoi(words[0]);
|
nelements = atoi(words[0]);
|
||||||
ncoeffall = atoi(words[1]);
|
ncoeffall = atoi(words[1]);
|
||||||
|
|
||||||
// Set up element lists
|
// set up element lists
|
||||||
|
|
||||||
|
elements = new char*[nelements];
|
||||||
memory->create(radelem,nelements,"pair:radelem");
|
memory->create(radelem,nelements,"pair:radelem");
|
||||||
memory->create(wjelem,nelements,"pair:wjelem");
|
memory->create(wjelem,nelements,"pair:wjelem");
|
||||||
memory->create(coeffelem,nelements,ncoeffall,"pair:coeffelem");
|
memory->create(coeffelem,nelements,ncoeffall,"pair:coeffelem");
|
||||||
|
|
||||||
int *found = new int[nelements];
|
// Loop over nelements blocks in the SNAP coefficient file
|
||||||
for (int ielem = 0; ielem < nelements; ielem++)
|
|
||||||
found[ielem] = 0;
|
|
||||||
|
|
||||||
// Loop over elements in the SNAP coefficient file
|
for (int ielem = 0; ielem < nelements; ielem++) {
|
||||||
|
|
||||||
for (int ielemfile = 0; ielemfile < nelemfile; ielemfile++) {
|
|
||||||
|
|
||||||
if (comm->me == 0) {
|
if (comm->me == 0) {
|
||||||
ptr = fgets(line,MAXLINE,fpcoeff);
|
ptr = fgets(line,MAXLINE,fpcoeff);
|
||||||
@ -1673,33 +1653,12 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename)
|
|||||||
words[iword] = strtok(NULL,"' \t\n\r\f");
|
words[iword] = strtok(NULL,"' \t\n\r\f");
|
||||||
|
|
||||||
char* elemtmp = words[0];
|
char* elemtmp = words[0];
|
||||||
double radtmp = atof(words[1]);
|
int n = strlen(elemtmp) + 1;
|
||||||
double wjtmp = atof(words[2]);
|
elements[ielem] = new char[n];
|
||||||
|
strcpy(elements[ielem],elemtmp);
|
||||||
|
|
||||||
// skip if element name isn't in element list
|
radelem[ielem] = atof(words[1]);
|
||||||
|
wjelem[ielem] = atof(words[2]);
|
||||||
int ielem;
|
|
||||||
for (ielem = 0; ielem < nelements; ielem++)
|
|
||||||
if (strcmp(elemtmp,elements[ielem]) == 0) break;
|
|
||||||
if (ielem == nelements) {
|
|
||||||
if (comm->me == 0)
|
|
||||||
for (int icoeff = 0; icoeff < ncoeffall; icoeff++)
|
|
||||||
ptr = fgets(line,MAXLINE,fpcoeff);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// skip if element already appeared
|
|
||||||
|
|
||||||
if (found[ielem]) {
|
|
||||||
if (comm->me == 0)
|
|
||||||
for (int icoeff = 0; icoeff < ncoeffall; icoeff++)
|
|
||||||
ptr = fgets(line,MAXLINE,fpcoeff);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
found[ielem] = 1;
|
|
||||||
radelem[ielem] = radtmp;
|
|
||||||
wjelem[ielem] = wjtmp;
|
|
||||||
|
|
||||||
|
|
||||||
if (comm->me == 0) {
|
if (comm->me == 0) {
|
||||||
@ -1821,7 +1780,6 @@ void PairSNAP::read_files(char *coefffilename, char *paramfilename)
|
|||||||
if (rcutfacflag == 0 || twojmaxflag == 0)
|
if (rcutfacflag == 0 || twojmaxflag == 0)
|
||||||
error->all(FLERR,"Incorrect SNAP parameter file");
|
error->all(FLERR,"Incorrect SNAP parameter file");
|
||||||
|
|
||||||
delete[] found;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
/* ----------------------------------------------------------------------
|
||||||
|
|||||||
@ -173,4 +173,8 @@ E: Incorrect format in SNAP parameter file
|
|||||||
|
|
||||||
Incorrect number of words per line in the parameter file.
|
Incorrect number of words per line in the parameter file.
|
||||||
|
|
||||||
|
E: Did not find all elements in SNAP coefficient file.
|
||||||
|
|
||||||
|
One or more elements listed in the pair_coeff command were not found in the coefficient file.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user