33#include <boost/optional.hpp>
43 static constexpr int num = 1;
56 friend boost::serialization::access;
57 template <
typename Archive>
58 void serialize(Archive &ar,
long int ) {
69inline boost::optional<Utils::Vector3d>
71 auto const dist = dx.
norm();
77 auto const dr = dist -
r;
78 auto fac = (
k0 *
dr +
k1 * Utils::int_pow<3>(
dr));
85 "This is most likely an error in the system setup.";
94inline boost::optional<double>
96 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.
boost::optional< double > energy(Utils::Vector3d const &dx) const
Compute the quartic bond energy.
boost::optional< Utils::Vector3d > force(Utils::Vector3d const &dx) const
Compute the quartic bond force.
QuarticBond(double k0, double k1, double r, double r_cut)