Unverified Commit e6c4036a authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

Merge branch 'master' into more-internal-convenience

# Conflicts:
#	src/group.cpp
parents ab04416b d84a4770
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -48,7 +48,7 @@ and :math:`sigma_i` are calculated as
   \sigma_i  = & \sum_{j=i_1}^{i_N} q_j \cdot \psi_{ij} \left(r_{ij}\right) \\
   \sigma_i  = & \sum_{j=i_1}^{i_N} q_j \cdot \psi_{ij} \left(r_{ij}\right) \\
   E_i\left(q_i,\sigma_i\right)  = & \frac{1}{2} \cdot q_i \cdot \sigma_i
   E_i\left(q_i,\sigma_i\right)  = & \frac{1}{2} \cdot q_i \cdot \sigma_i


where :math:`\eta_{ji} is a pairwise function describing electron flow from atom
where :math:`\eta_{ji}` is a pairwise function describing electron flow from atom
I to atom J, and :math:`\psi_{ij}` is another pairwise function.  The multi-body
I to atom J, and :math:`\psi_{ij}` is another pairwise function.  The multi-body
nature of the EIM potential is a result of the embedding energy term.
nature of the EIM potential is a result of the embedding energy term.
A complete list of all the pair functions used in EIM is summarized
A complete list of all the pair functions used in EIM is summarized
@@ -63,7 +63,7 @@ below
   \right.\\
   \right.\\
   \eta_{ji} = & A_{\eta,ij}\left(\chi_j-\chi_i\right)f_c\left(r,r_{s,\eta,ij},r_{c,\eta,ij}\right) \\
   \eta_{ji} = & A_{\eta,ij}\left(\chi_j-\chi_i\right)f_c\left(r,r_{s,\eta,ij},r_{c,\eta,ij}\right) \\
   \psi_{ij}\left(r\right) = & A_{\psi,ij}\exp\left(-\zeta_{ij}r\right)f_c\left(r,r_{s,\psi,ij},r_{c,\psi,ij}\right) \\
   \psi_{ij}\left(r\right) = & A_{\psi,ij}\exp\left(-\zeta_{ij}r\right)f_c\left(r,r_{s,\psi,ij},r_{c,\psi,ij}\right) \\
   f_{c}\left(r,r_p,r_c\right) = & 0.510204 \mathrm{erfc}\left[\frac{1.64498\left(2r-r_p-r_c\right)}{r_c-r_p}\right] - 0.010204
   f_{c}\left(r,r_p,r_c\right) = & 0.510204 \cdot \mathrm{erfc}\left[\frac{1.64498\left(2r-r_p-r_c\right)}{r_c-r_p}\right] - 0.010204


Here :math:`E_b, r_e, r_(c,\phi), \alpha, \beta, A_(\psi), \zeta, r_(s,\psi),
Here :math:`E_b, r_e, r_(c,\phi), \alpha, \beta, A_(\psi), \zeta, r_(s,\psi),
r_(c,\psi), A_(\eta), r_(s,\eta), r_(c,\eta), \chi,` and pair function type
r_(c,\psi), A_(\eta), r_(s,\eta), r_(c,\eta), \chi,` and pair function type

examples/threebody/Si.sw

deleted100644 → 0
+1 −18
Original line number Original line Diff line number Diff line
# DATE: 2007-06-11 CONTRIBUTOR: Aidan Thompson, athomps@sandia.gov CITATION: Stillinger and Weber,  Phys Rev B, 31, 5262, (1985)
# Stillinger-Weber parameters for various elements and mixtures
# multiple entries can be added to this file, LAMMPS reads the ones it needs
# these entries are in LAMMPS "metal" units:
#   epsilon = eV; sigma = Angstroms
#   other quantities are unitless

# format of a single entry (one or more lines):
#   element 1, element 2, element 3, 
#   epsilon, sigma, a, lambda, gamma, costheta0, A, B, p, q, tol

# Here are the original parameters in metal units, for Silicon from:
#
# Stillinger and Weber,  Phys. Rev. B, v. 31, p. 5262, (1985)
#

Si Si Si 2.1683  2.0951  1.80  21.0  1.20  -0.333333333333
         7.049556277  0.6022245584  4.0  0.0 0.0
+1 −18
Original line number Original line Diff line number Diff line
../../potentials/Si.sw
 No newline at end of file
+1 −1
Original line number Original line Diff line number Diff line
# DATE: 2016-07-29 UNITS: metal CONTRIBUTOR: Todd Zeitler, tzeitle@sandia.gov CITATION: none 
# DATE: 2016-07-29 UNITS: real CONTRIBUTOR: Todd Zeitler, tzeitle@sandia.gov CITATION: none
# nb3b/harmonic (nonbonded 3-body harmonic) parameters for various elements
# nb3b/harmonic (nonbonded 3-body harmonic) parameters for various elements
#
#
# multiple entries can be added to this file, LAMMPS reads the ones it needs
# multiple entries can be added to this file, LAMMPS reads the ones it needs
+6 −9
Original line number Original line Diff line number Diff line
@@ -552,10 +552,7 @@ void SNAKokkos<DeviceType>::compute_bi(const int& iatom_mod, const int& jjb, con
  int idouble = 0;
  int idouble = 0;
  for (int elem1 = 0; elem1 < nelements; elem1++) {
  for (int elem1 = 0; elem1 < nelements; elem1++) {
    for (int elem2 = 0; elem2 < nelements; elem2++) {
    for (int elem2 = 0; elem2 < nelements; elem2++) {
      const int jalloy = idouble;

      for (int elem3 = 0; elem3 < nelements; elem3++) {
      for (int elem3 = 0; elem3 < nelements; elem3++) {
        const int jjballoy = itriple;


        double sumzu = 0.0;
        double sumzu = 0.0;
        double sumzu_temp = 0.0;
        double sumzu_temp = 0.0;
@@ -566,7 +563,7 @@ void SNAKokkos<DeviceType>::compute_bi(const int& iatom_mod, const int& jjb, con
            const int jjz_index = jjz+mb*(j+1)+ma;
            const int jjz_index = jjz+mb*(j+1)+ma;
            if (2*mb == j) return; // I think we can remove this?
            if (2*mb == j) return; // I think we can remove this?
            const auto utot = ulisttot_pack(iatom_mod, jju_index, elem3, iatom_div);
            const auto utot = ulisttot_pack(iatom_mod, jju_index, elem3, iatom_div);
            const auto zloc = zlist_pack(iatom_mod, jjz_index, jalloy, iatom_div);
            const auto zloc = zlist_pack(iatom_mod, jjz_index, idouble, iatom_div);
            sumzu_temp += utot.re * zloc.re + utot.im * zloc.im;
            sumzu_temp += utot.re * zloc.re + utot.im * zloc.im;
          }
          }
        }
        }
@@ -582,7 +579,7 @@ void SNAKokkos<DeviceType>::compute_bi(const int& iatom_mod, const int& jjb, con
            const int jjz_index = jjz+(mb-1)*(j+1)+(j+1)+ma;
            const int jjz_index = jjz+(mb-1)*(j+1)+(j+1)+ma;


            const auto utot = ulisttot_pack(iatom_mod, jju_index, elem3, iatom_div);
            const auto utot = ulisttot_pack(iatom_mod, jju_index, elem3, iatom_div);
            const auto zloc = zlist_pack(iatom_mod, jjz_index, jalloy, iatom_div);
            const auto zloc = zlist_pack(iatom_mod, jjz_index, idouble, iatom_div);
            sumzu_temp += utot.re * zloc.re + utot.im * zloc.im;
            sumzu_temp += utot.re * zloc.re + utot.im * zloc.im;


          }
          }
@@ -593,7 +590,7 @@ void SNAKokkos<DeviceType>::compute_bi(const int& iatom_mod, const int& jjb, con
          const int jjz_index = jjz+(mb-1)*(j+1)+(j+1)+ma;
          const int jjz_index = jjz+(mb-1)*(j+1)+(j+1)+ma;


          const auto utot = ulisttot_pack(iatom_mod, jju_index, elem3, iatom_div);
          const auto utot = ulisttot_pack(iatom_mod, jju_index, elem3, iatom_div);
          const auto zloc = zlist_pack(iatom_mod, jjz_index, jalloy, iatom_div);
          const auto zloc = zlist_pack(iatom_mod, jjz_index, idouble, iatom_div);
          sumzu += 0.5 * (utot.re * zloc.re + utot.im * zloc.im);
          sumzu += 0.5 * (utot.re * zloc.re + utot.im * zloc.im);
        } // end if jeven
        } // end if jeven


@@ -607,7 +604,7 @@ void SNAKokkos<DeviceType>::compute_bi(const int& iatom_mod, const int& jjb, con
            sumzu -= bzero[j];
            sumzu -= bzero[j];
          }
          }
        }
        }
        blist_pack(iatom_mod, jjb, jjballoy, iatom_div) = sumzu;
        blist_pack(iatom_mod, jjb, itriple, iatom_div) = sumzu;
            //} // end loop over j
            //} // end loop over j
          //} // end loop over j1, j2
          //} // end loop over j1, j2
        itriple++; 
        itriple++; 
@@ -1078,7 +1075,7 @@ void SNAKokkos<DeviceType>::compute_bi_cpu(const typename Kokkos::TeamPolicy<Dev
  int idouble = 0;
  int idouble = 0;
  for (int elem1 = 0; elem1 < nelements; elem1++) {
  for (int elem1 = 0; elem1 < nelements; elem1++) {
    for (int elem2 = 0; elem2 < nelements; elem2++) {
    for (int elem2 = 0; elem2 < nelements; elem2++) {
      const auto jalloy = idouble;
      auto jalloy = idouble; // must be non-const to work around gcc compiler bug
      for (int elem3 = 0; elem3 < nelements; elem3++) {
      for (int elem3 = 0; elem3 < nelements; elem3++) {
        Kokkos::parallel_for(Kokkos::TeamThreadRange(team,idxb_max),
        Kokkos::parallel_for(Kokkos::TeamThreadRange(team,idxb_max),
          [&] (const int& jjb) {
          [&] (const int& jjb) {
@@ -1146,7 +1143,7 @@ void SNAKokkos<DeviceType>::compute_bi_cpu(const typename Kokkos::TeamPolicy<Dev
              }
              }
            }
            }


            blist(jjb, jjballoy, iatom) = sumzu;
            blist(jjb, itriple, iatom) = sumzu;
          });
          });
        });
        });
          //} // end loop over j
          //} // end loop over j
Loading