34#include <boost/optional.hpp>
53 static constexpr int num = 1;
61 this->drmax2i = 1. / this->
drmax2;
68 friend boost::serialization::access;
69 template <
typename Archive>
70 void serialize(Archive &ar,
long int ) {
82inline boost::optional<Utils::Vector3d>
84 auto const len = dx.
norm();
85 auto const dr = len -
r0;
97 "This is most likely an error in the system setup.";
107inline boost::optional<double>
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 FENE bond Potential.
double drmax2i
inverse square of drmax (internal parameter)
double drmax
maximal bond stretching
boost::optional< double > energy(Utils::Vector3d const &dx) const
Compute the FENE bond energy.
FeneBond(double k, double drmax, double r0)
double drmax2
square of drmax (internal parameter)
double r0
equilibrium bond length
boost::optional< Utils::Vector3d > force(Utils::Vector3d const &dx) const
Compute the FENE bond force.