50 KOKKOS_INLINE_FUNCTION
53 auto r = std::sqrt(distSqr);
54 real_t prefac = 138.935458_r * q1 * q2;
57 auto force = prefac * (erfc / r + 2_r * alpha_ *
inv_sqrtpi * expX2 + r * forceShift_);
58 return force / distSqr;
64 KOKKOS_INLINE_FUNCTION
67 auto r = std::sqrt(distSqr);
68 real_t prefac = 138.935458_r * q1 * q2;
70 return prefac * (erfc / r - energyShift_ - forceShift_ * (r - rc_));
73 CoulombDSF(
const real_t& rc,
const real_t& alpha) : alpha_(alpha), rc_(rc), rcSqr_(rc * rc)
75 real_t erfc = std::erfc(alpha_ * rc);
76 real_t exp = std::exp(-alpha_ * alpha_ * rcSqr_);
77 forceShift_ = -(erfc / rcSqr_ + 2_r *
inv_sqrtpi * alpha_ * exp / rc);
78 energyShift_ = erfc / rc;
Everything to evolve the simulation physically.
KOKKOS_INLINE_FUNCTION real_t approxErfc(const real_t &x, real_t &expX2)
"Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Table" Milton Abramowitz ...
Definition math.hpp:58
Top-level namespace of MRMD.
constexpr auto inv_sqrtpi
Definition constants.hpp:27
double real_t
Definition datatypes.hpp:99