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

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

#include <bonded_tab.hpp>

+ Inheritance diagram for TabulatedDistanceBond:
+ Collaboration diagram for TabulatedDistanceBond:

Public Member Functions

double cutoff () const
 
 TabulatedDistanceBond (double min, double max, std::vector< double > const &energy, std::vector< double > const &force)
 
std::optional< Utils::Vector3dforce (Utils::Vector3d const &dx) const
 Compute a tabulated bond length force.
 
std::optional< double > energy (Utils::Vector3d const &dx) const
 Compute a tabulated bond length 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 = 1
 

Additional Inherited Members

- Public Attributes inherited from TabulatedBond
std::shared_ptr< TabulatedPotentialpot
 

Detailed Description

Parameters for 2-body tabulated potential.

Definition at line 65 of file bonded_tab.hpp.

Constructor & Destructor Documentation

◆ TabulatedDistanceBond()

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

Definition at line 70 of file bonded_tab.hpp.

References TabulatedBond::pot.

Member Function Documentation

◆ cutoff()

double TabulatedDistanceBond::cutoff ( ) const
inline

Definition at line 66 of file bonded_tab.hpp.

References TabulatedBond::pot.

Referenced by energy(), and force().

◆ energy()

std::optional< double > TabulatedDistanceBond::energy ( Utils::Vector3d const &  dx) const
inline

Compute a tabulated bond length energy.

For distances smaller than the tabulated range it uses a quadratic extrapolation based on the first two tabulated force values and the first tabulated energy value.

Parameters
[in]dxDistance between the particles.

Definition at line 151 of file bonded_tab.hpp.

References cutoff(), Utils::Vector< T, N >::norm(), and TabulatedBond::pot.

◆ force()

std::optional< Utils::Vector3d > TabulatedDistanceBond::force ( Utils::Vector3d const &  dx) const
inline

Compute a tabulated bond length force.

The force acts in the direction of the connecting vector between the particles. For distances smaller than the tabulated range it uses a linear extrapolation based on the first two tabulated force values.

Parameters
[in]dxDistance between the particles.

Definition at line 132 of file bonded_tab.hpp.

References cutoff(), Utils::Vector< T, N >::norm(), and TabulatedBond::pot.

Member Data Documentation

◆ num

constexpr int TabulatedDistanceBond::num = 1
staticconstexpr

Definition at line 68 of file bonded_tab.hpp.


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