34#include <boost/optional.hpp>
47 static constexpr int num = 1;
59 friend boost::serialization::access;
60 template <
typename Archive>
61 void serialize(Archive &ar,
long int ) {
71inline boost::optional<Utils::Vector3d>
73 auto const dist = dx.
norm();
79 auto const dr = dist -
r;
86 "This is most likely an error in the system setup.";
95inline boost::optional<double>
97 auto const dist = dx.
norm();
Vector implementation and trait types for boost qvm interoperability.
This file contains the defaults for ESPResSo.
#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 harmonic bond Potential.
boost::optional< Utils::Vector3d > force(Utils::Vector3d const &dx) const
Compute the harmonic bond force.
boost::optional< double > energy(Utils::Vector3d const &dx) const
Compute the harmonic bond energy.
double r
equilibrium bond length
double r_cut
cutoff length
HarmonicBond(double k, double r, double r_cut)