![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Evaluate forces and energies using a custom potential profile. More...
#include <TabulatedPotential.hpp>
Collaboration diagram for TabulatedPotential:Public Member Functions | |
| TabulatedPotential ()=default | |
| TabulatedPotential (double minval, double maxval, std::vector< double > const &force, std::vector< double > const &energy) | |
| double | force (double x) const |
Evaluate the force at position x. | |
| double | energy (double x) const |
Evaluate the energy at position x. | |
| double | cutoff () const |
Public Attributes | |
| double | minval = -1.0 |
| Position on the x-axis of the first tabulated value. | |
| double | maxval = -1.0 |
| Position on the x-axis of the last tabulated value. | |
| double | invstepsize = 0.0 |
| Inverse distance on the x-axis between tabulated values. | |
| std::vector< double > | force_tab |
| Tabulated forces. | |
| std::vector< double > | energy_tab |
| Tabulated energies. | |
Evaluate forces and energies using a custom potential profile.
Forces and energies are evaluated by linear interpolation. The curves force_tab and energy_tab must be sampled uniformly between minval and maxval.
Definition at line 36 of file TabulatedPotential.hpp.
|
default |
| TabulatedPotential::TabulatedPotential | ( | double | minval, |
| double | maxval, | ||
| std::vector< double > const & | force, | ||
| std::vector< double > const & | energy | ||
| ) |
Definition at line 27 of file TabulatedPotential.cpp.
References energy(), energy_tab, force(), force_tab, invstepsize, maxval, minval, and stream.
|
inline |
Definition at line 71 of file TabulatedPotential.hpp.
References maxval.
Referenced by recalc_maximal_cutoff().
Evaluate the energy at position x.
| x | Bond length/angle |
Definition at line 66 of file TabulatedPotential.hpp.
References energy_tab, invstepsize, Utils::linear_interpolation(), maxval, and minval.
Referenced by TabulatedPotential().
Evaluate the force at position x.
| x | Bond length/angle |
Definition at line 57 of file TabulatedPotential.hpp.
References force_tab, invstepsize, Utils::linear_interpolation(), maxval, and minval.
Referenced by TabulatedPotential().
| std::vector<double> TabulatedPotential::energy_tab |
Tabulated energies.
Definition at line 46 of file TabulatedPotential.hpp.
Referenced by energy(), ScriptInterface::Interactions::InteractionTabulated::InteractionTabulated(), and TabulatedPotential().
| std::vector<double> TabulatedPotential::force_tab |
Tabulated forces.
Definition at line 44 of file TabulatedPotential.hpp.
Referenced by force(), ScriptInterface::Interactions::InteractionTabulated::InteractionTabulated(), and TabulatedPotential().
| double TabulatedPotential::invstepsize = 0.0 |
Inverse distance on the x-axis between tabulated values.
Definition at line 42 of file TabulatedPotential.hpp.
Referenced by energy(), force(), and TabulatedPotential().
| double TabulatedPotential::maxval = -1.0 |
Position on the x-axis of the last tabulated value.
Definition at line 40 of file TabulatedPotential.hpp.
Referenced by cutoff(), energy(), force(), ScriptInterface::Interactions::InteractionTabulated::InteractionTabulated(), and TabulatedPotential().
| double TabulatedPotential::minval = -1.0 |
Position on the x-axis of the first tabulated value.
Definition at line 38 of file TabulatedPotential.hpp.
Referenced by energy(), force(), ScriptInterface::Interactions::InteractionTabulated::InteractionTabulated(), and TabulatedPotential().