24#include "system/System.hpp"
32std::tuple<Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d>
49 auto const Ai = n1.norm();
52 auto const Aj = n2.norm();
56 auto const sc = std::min(1.0, n1 * n2);
59 auto theta = acos(sc);
62 auto const desc = (dx1 * direc);
67 auto const DTh = theta -
theta0;
74 auto const v1 = (n2 - sc * n1).normalize();
75 auto const v2 = (n1 - sc * n2).normalize();
92 return std::make_tuple(force1, force2, force3, force4);
96 const int ind4,
const double kb,
const bool flat) {
111 auto const dx1 = box_geo.get_mi_vector(pos1, pos3);
112 auto const dx2 = box_geo.get_mi_vector(pos2, pos3);
113 auto const dx3 = box_geo.get_mi_vector(pos4, pos3);
120 auto const n1 = n1l / n1l.norm();
121 auto const n2 = n2l / n2l.norm();
124 auto const sc = std::min(1.0, n1 * n2);
Vector implementation and trait types for boost qvm interoperability.
Utils::Vector< T, 3 > get_mi_vector(const Utils::Vector< T, 3 > &a, const Utils::Vector< T, 3 > &b) const
Get the minimum-image vector between two coordinates.
std::shared_ptr< BoxGeometry > box_geo
__device__ void vector_product(float const *a, float const *b, float *out)
Utils::Vector3d get_ibm_particle_position(int pid)
Returns the position of a given particle.
DEVICE_QUALIFIER constexpr T pi()
Ratio of diameter and circumference of a circle.
double theta0
Reference angle.
IBMTribend(int ind1, int ind2, int ind3, int ind4, double kb, bool flat)
Set the IBM Tribend parameters.
double kb
Interaction data.
std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > calc_forces(BoxGeometry const &box_geo, Particle const &p1, Particle const &p2, Particle const &p3, Particle const &p4) const
Calculate the forces The equations can be found in Appendix C of .
Struct holding all information for one particle.