|
faunus
|
Statically combines two pair potentials at compile-time. More...
#include <potentials_base.h>


Public Member Functions | |
| CombinedPairPotential (const std::string &name="") | |
| double | operator() (const Particle &particle_a, const Particle &particle_b, const double squared_distance, const Point &b_towards_a={0, 0, 0}) const override |
| Combine pair energy. | |
| Point | force (const Particle &particle_a, const Particle &particle_b, const double squared_distance, const Point &b_towards_a) const override |
| Calculates force on particle a due to another particle, b. More... | |
| void | from_json (const json &j) override |
| void | to_json (json &j) const override |
Public Attributes | |
| T1 | first |
| First pair potential of type T1. | |
| T2 | second |
| Second pair potential of type T2. | |
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) | |
Additional Inherited Members | |
Protected Member Functions inherited from Faunus::pairpotential::PairPotential | |
| PairPotential (std::string name=std::string(), std::string cite=std::string(), bool isotropic=true) | |
Statically combines two pair potentials at compile-time.
This is the most efficient way to combining pair-potentials due to the possibility for compile-time optimisation.
|
inlineoverridevirtual |
Calculates force on particle a due to another particle, b.
| 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