43 static constexpr int num = 1;
59inline std::optional<Utils::Vector3d>
61 auto const dist = dx.
norm();
67 auto const dr = dist -
r;
68 auto fac = (
k0 * dr +
k1 * Utils::int_pow<3>(dr));
75 "This is most likely an error in the system setup.";
84inline std::optional<double>
86 auto const dist = dx.
norm();
Vector implementation and trait types for boost qvm interoperability.
#define ROUND_ERROR_PREC
Precision for capture of round off errors.
This file contains the errorhandling code for severe errors, like a broken bond or illegal parameter ...
#define runtimeErrorMsg()
DEVICE_QUALIFIER constexpr T sqr(T x)
Calculates the SQuaRe of x.
Parameters for quartic bond Potential.
std::optional< Utils::Vector3d > force(Utils::Vector3d const &dx) const
Compute the quartic bond force.
std::optional< double > energy(Utils::Vector3d const &dx) const
Compute the quartic bond energy.
QuarticBond(double k0, double k1, double r, double r_cut)