ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Common code for functions calculating angle forces. More...
Go to the source code of this file.
Functions | |
double | calc_cosine (Utils::Vector3d const &vec1, Utils::Vector3d const &vec2, bool sanitize_cosine=false) |
Compute the cosine of the angle between three particles. | |
template<typename ForceFactor > | |
std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > | angle_generic_force (Utils::Vector3d const &vec1, Utils::Vector3d const &vec2, ForceFactor forceFactor, bool sanitize_cosine) |
Compute a three-body angle interaction force. | |
Common code for functions calculating angle forces.
Definition in file angle_common.hpp.
std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > angle_generic_force | ( | Utils::Vector3d const & | vec1, |
Utils::Vector3d const & | vec2, | ||
ForceFactor | forceFactor, | ||
bool | sanitize_cosine | ||
) |
Compute a three-body angle interaction force.
See the details in General expressions for the forces. The \( K(\theta_{ijk}) \) term is provided as a lambda function in forceFactor
.
[in] | vec1 | Vector from central particle to left particle. |
[in] | vec2 | Vector from central particle to right particle. |
[in] | forceFactor | Angle force term. |
[in] | sanitize_cosine | Sanitize the cosine of the angle. |
ForceFactor | Function evaluating the angle force term for a given angle. |
Definition at line 81 of file angle_common.hpp.
References Utils::Vector< T, N >::norm().
Referenced by AngleCosineBond::forces(), AngleCossquareBond::forces(), AngleHarmonicBond::forces(), and TabulatedAngleBond::forces().
|
inline |
Compute the cosine of the angle between three particles.
[in] | vec1 | Vector from central particle to left particle. |
[in] | vec2 | Vector from central particle to right particle. |
[in] | sanitize_cosine | Sanitize the cosine of the angle. |
Definition at line 55 of file angle_common.hpp.
References Utils::Vector< T, N >::norm2().
Referenced by AngleCosineBond::energy(), AngleCossquareBond::energy(), AngleHarmonicBond::energy(), and TabulatedAngleBond::energy().