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

Square-well potential. More...

#include <potentials.h>

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

Public Member Functions

 SquareWell (const std::string &name="squarewell")
 
double operator() (const Particle &a, const Particle &b, double squared_distance, const Point &) const override
 Pair energy between two particles. More...
 
- 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 Point force (const Particle &a, const Particle &b, double squared_distance, const Point &b_towards_a) const
 Force on particle a due to particle b. More...
 

Protected Member Functions

void extractorsFromJson (const json &j) override
 potential-specific assignment of coefficient extracting functions
 
void initPairMatrices () override
 potential-specific initialization of parameter matrices
 
- 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
 
- 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

Square-well potential.

This is an attractive potential described by

\[ u(r) = -\epsilon \]

when r < , and zero otherwise.

Member Function Documentation

◆ operator()()

double Faunus::pairpotential::SquareWell::operator() ( const Particle particle_a,
const Particle particle_b,
double  squared_distance,
const Point b_towards_a 
) const
inlineoverridevirtual

Pair energy between two particles.

Parameters
particle_aFirst particle
particle_bSecond particle
squared_distanceSquared distance, |𝐚-𝐛|²
b_towards_aDistance vector 𝐛 -> 𝐚 = 𝐚 - 𝐛
Returns
Interaction energy in units of kT

Implements Faunus::pairpotential::PairPotential.


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