faunus
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Faunus::pairpotential::LennardJones Class Reference

Lennard-Jones potential with an arbitrary combination rule. More...

#include <potentials.h>

Inheritance diagram for Faunus::pairpotential::LennardJones:
Inheritance graph
[legend]
Collaboration diagram for Faunus::pairpotential::LennardJones:
Collaboration graph
[legend]

Public Member Functions

 LennardJones (const std::string &name="lennardjones", const std::string &cite=std::string(), CombinationRuleType combination_rule=CombinationRuleType::LORENTZ_BERTHELOT)
 
Point force (const Particle &particle_a, const Particle &particle_b, double squared_distance, const Point &b_towards_a) const override
 Force on particle a due to particle b. More...
 
double operator() (const Particle &particle_a, const Particle &particle_b, double squared_distance, [[maybe_unused]] const Point &b_towards_a) const override
 
- Public Member Functions inherited from Faunus::pairpotential::MixerPairPotentialBase
 MixerPairPotentialBase (const std::string &name=std::string(), const std::string &cite=std::string(), CombinationRuleType combination_rule=CombinationRuleType::UNDEFINED, bool isotropic=true)
 
void from_json (const json &j) override
 
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...
 

Protected Member Functions

void initPairMatrices () override
 potential-specific initialization of parameter matrices
 
void extractorsFromJson (const json &j) override
 potential-specific assignment of coefficient extracting functions
 
- Protected Member Functions inherited from Faunus::pairpotential::MixerPairPotentialBase
void init ()
 initialize the potential when data, e.g., atom parameters, are available
 
- Protected Member Functions inherited from Faunus::pairpotential::PairPotential
 PairPotential (std::string name=std::string(), std::string cite=std::string(), bool isotropic=true)
 

Protected Attributes

TPairMatrixPtr sigma_squared
 
TPairMatrixPtr epsilon_quadruple
 
- Protected Attributes inherited from Faunus::pairpotential::MixerPairPotentialBase
CombinationRuleType combination_rule
 
std::shared_ptr< std::vector< CustomInteractionData > > custom_pairs
 
json json_extra_params
 pickled extra parameters like a coefficient names mapping
 

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)
 

Detailed Description

Lennard-Jones potential with an arbitrary combination rule.

Note
Mixing data is shared upon copying

Member Function Documentation

◆ force()

Point Faunus::pairpotential::LennardJones::force ( const Particle a,
const Particle b,
double  squared_distance,
const Point b_towards_a 
) const
inlineoverridevirtual

Force on particle a due to particle b.

Calculates force on particle a due to another particle, b.

Parameters
particle_aFirst particle
particle_bSecond particle
squared_distanceSquared distance, |𝐚-𝐛|²
b_towards_aDistance vector 𝐛 -> 𝐚 = 𝐚 - 𝐛
Returns
Force acting on a dur to b in units of kT/Å
Parameters
particle_aParticle a
particle_bParticle b
squared_distanceSquared norm |𝐚-𝐛|²
b_towards_aDistance vector 𝐛 -> 𝐚 = 𝐚 - 𝐛
Returns
Force on particle a due to particle b

Reimplemented from Faunus::pairpotential::PairPotential.

Reimplemented in Faunus::pairpotential::WeeksChandlerAndersen.


The documentation for this class was generated from the following files: