|
faunus
|
Custom pair-potential taking math. More...
#include <potentials.h>


Public Member Functions | |
| double | operator() (const Particle &particle1, const Particle &particle2, double squared_distance, [[maybe_unused]] const Point &b_towards_a) const override |
| Point | force (const Particle &particle_a, const Particle &particle_b, double squared_distance, const Point &b_towards_b) const override |
| Force on particle a due to particle b. More... | |
| CustomPairPotential (const std::string &name="custom") | |
| void | to_json (json &j) const override |
Public Member Functions inherited from Faunus::pairpotential::PairPotential | |
| virtual double | operator() (const Particle &particle_a, const Particle &particle_b, double squared_distance, const Point &b_towards_a) const =0 |
| Pair energy between two particles. More... | |
Additional Inherited Members | |
Public Attributes inherited from Faunus::pairpotential::PairPotential | |
| std::string | name |
| unique name per polymorphic call; used in FunctorPotential::combinePairPotentials | |
| std::string | cite |
| Typically a short-doi litterature reference. | |
| bool | isotropic = true |
| true if pair-potential is independent of particle orientation | |
| std::function< double(const Particle &)> | selfEnergy = nullptr |
| self energy of particle (kT) | |
Protected Member Functions inherited from Faunus::pairpotential::PairPotential | |
| PairPotential (std::string name=std::string(), std::string cite=std::string(), bool isotropic=true) | |
Custom pair-potential taking math.
expressions at runtime
symbols is a shared_ptr as this allows it to be modified by operator() const. A hack, but would otherwise require const-removal in all pair-potentials.
|
inlineoverridevirtual |
Force on particle a due to particle b.
Calculates force on particle a due to another particle, b.
| particle_a | First particle |
| particle_b | Second particle |
| squared_distance | Squared distance, |𝐚-𝐛|² |
| b_towards_a | Distance vector 𝐛 -> 𝐚 = 𝐚 - 𝐛 |
| particle_a | Particle a |
| particle_b | Particle b |
| squared_distance | Squared norm |𝐚-𝐛|² |
| b_towards_a | Distance vector 𝐛 -> 𝐚 = 𝐚 - 𝐛 |
Reimplemented from Faunus::pairpotential::PairPotential.
1.8.13