This commit is contained in:
tomswinburne 2021-07-06 14:06:27 +02:00
parent 2c0b87573f
commit 3675bef2b0
8 changed files with 63 additions and 1 deletions

View File

@ -188,6 +188,8 @@ formulas for the meaning of these parameters:
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`reax/c <pair_reaxc>` | chi, eta, gamma | type global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`snap <pair_snap>` | scale | type pairs |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`spin/dmi <pair_spin_dmi>` | coulombic_cutoff | type global |
+------------------------------------------------------------------------------+--------------------------------------------------+-------------+
| :doc:`spin/exchange <pair_spin_exchange>` | coulombic_cutoff | type global |

View File

@ -173,10 +173,12 @@ styles and their energy formulas for the meaning of these parameters:
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`nm/cut/coul/cut, nm/cut/coul/long <pair_nm>` | e0,r0,nn,mm | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`ufm <pair_ufm>` | epsilon,sigma,scale | type pairs |
| :doc:`snap <pair_snap>` | scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`soft <pair_soft>` | a | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
| :doc:`ufm <pair_ufm>` | epsilon,sigma,scale | type pairs |
+------------------------------------------------------------------------------+-------------------------+------------+
.. note::

View File

@ -0,0 +1 @@
../../potentials/Ni_Zuo_JPCA2020.quadratic.snapcoeff

View File

@ -0,0 +1 @@
../../potentials/Ni_Zuo_JPCA2020.quadratic.snapparam

View File

@ -0,0 +1 @@
../../potentials/Ni_Zuo_JPCA2020.snapcoeff

View File

@ -0,0 +1 @@
../../potentials/Ni_Zuo_JPCA2020.snapparam

View File

@ -0,0 +1,53 @@
# Toy demonstration of SNAP "scale" parameter, using fix/adapt and hybrid/overlay
# Mixing linear and quadratic SNAP Ni potentials by Zuo et al. JCPA 2020
# mixing parameter
variable lambda equal 0.2
# Initialize simulation
variable nsteps index 100
variable nrep equal 3
variable a equal 3.52
units metal
# generate the box and atom positions using a FCC lattice
variable nx equal ${nrep}
variable ny equal ${nrep}
variable nz equal ${nrep}
boundary p p p
lattice fcc $a
region box block 0 ${nx} 0 ${ny} 0 ${nz}
create_box 1 box
create_atoms 1 box
mass 1 34.
# choose bundled SNAP Ni potential from Zuo et al. JCPA 2020
pair_style hybrid/overlay snap snap
pair_coeff * * snap 1 Ni_Zuo_JPCA2020.snapcoeff Ni_Zuo_JPCA2020.snapparam Ni
pair_coeff * * snap 2 Ni_Zuo_JPCA2020.quadratic.snapcoeff Ni_Zuo_JPCA2020.quadratic.snapparam Ni
# scale according to mixing parameter
variable l1 equal ${lambda}
variable l2 equal 1.0-${lambda}
fix scale1 all adapt 1 pair snap:1 scale * * v_l1
fix scale2 all adapt 1 pair snap:2 scale * * v_l2
# Setup output
thermo 1
thermo_modify norm yes
# Set up NVE run
timestep 0.5e-3
neighbor 1.0 bin
neigh_modify every 1 delay 0 check yes
# Run MD
velocity all create 300.0 4928459 loop geom
fix 1 all nve
run ${nsteps}

View File

@ -165,6 +165,7 @@ void PairSNAP::compute(int eflag, int vflag)
// for neighbors of I within cutoff:
// compute Fij = dEi/dRj = -dEi/dRi
// add to Fi, subtract from Fj
// scaling is that for type I
snaptr->compute_yi(beta[ii]);