ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
TabulatedDihedralBond Struct Reference

Parameters for 4-body tabulated potential. More...

#include <bonded_tab.hpp>

Inheritance diagram for TabulatedDihedralBond:
Collaboration diagram for TabulatedDihedralBond:

Public Member Functions

double cutoff () const
 TabulatedDihedralBond (double min, double max, std::vector< double > const &energy, std::vector< double > const &force)
std::optional< std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > > forces (Utils::Vector3d const &v12, Utils::Vector3d const &v23, Utils::Vector3d const &v34) const
 Compute the four-body dihedral interaction force.
std::optional< double > energy (Utils::Vector3d const &v12, Utils::Vector3d const &v23, Utils::Vector3d const &v34) const
 Compute the four-body dihedral interaction energy.
Public Member Functions inherited from TabulatedBond
 TabulatedBond (double min, double max, std::vector< double > const &energy, std::vector< double > const &force)
 Set the parameters of a bonded tabulated potential.

Static Public Attributes

static constexpr int num = 3

Additional Inherited Members

Public Attributes inherited from TabulatedBond
std::shared_ptr< TabulatedPotential > pot

Detailed Description

Parameters for 4-body tabulated potential.

Definition at line 101 of file bonded_tab.hpp.

Constructor & Destructor Documentation

◆ TabulatedDihedralBond()

TabulatedDihedralBond::TabulatedDihedralBond ( double min,
double max,
std::vector< double > const & energy,
std::vector< double > const & force )
inline

Member Function Documentation

◆ cutoff()

double TabulatedDihedralBond::cutoff ( ) const
inline

Definition at line 102 of file bonded_tab.hpp.

◆ energy()

std::optional< double > TabulatedDihedralBond::energy ( Utils::Vector3d const & v12,
Utils::Vector3d const & v23,
Utils::Vector3d const & v34 ) const
inline

Compute the four-body dihedral interaction energy.

The energy doesn't have any singularity if the angle phi is well-defined.

Parameters
[in]v12Vector from p1 to p2
[in]v23Vector from p2 to p3
[in]v34Vector from p3 to p4

Definition at line 249 of file bonded_tab.hpp.

References calc_dihedral_angle(), and TabulatedBond::pot.

Referenced by TabulatedDihedralBond().

◆ forces()

std::optional< std::tuple< Utils::Vector3d, Utils::Vector3d, Utils::Vector3d, Utils::Vector3d > > TabulatedDihedralBond::forces ( Utils::Vector3d const & v12,
Utils::Vector3d const & v23,
Utils::Vector3d const & v34 ) const
inline

Compute the four-body dihedral interaction force.

The forces have a singularity at \( \phi = 0 \) and \( \phi = \pi \) (see [42] page 592).

Parameters
[in]v12Vector from p1 to p2
[in]v23Vector from p2 to p3
[in]v34Vector from p3 to p4
Returns
the forces on p2, p1, p3

Definition at line 205 of file bonded_tab.hpp.

References calc_dihedral_angle(), TabulatedBond::pot, and vector_product().

Member Data Documentation

◆ num

int TabulatedDihedralBond::num = 3
staticconstexpr

Definition at line 104 of file bonded_tab.hpp.


The documentation for this struct was generated from the following file: