faunus
Public Types | Public Member Functions | Static Public Member Functions | List of all members
Faunus::pairpotential::PairMixer Class Reference

Exception for handling pair potential initialization. More...

#include <potentials_base.h>

Public Types

enum  CoefficientType { ANY, SIGMA, EPSILON }
 

Public Member Functions

 PairMixer (TExtractorFunc extractor, TCombinatorFunc combinator, TModifierFunc modifier=&modIdentity)
 
TPairMatrixPtr createPairMatrix (const std::vector< AtomData > &atoms)
 
TPairMatrixPtr createPairMatrix (const std::vector< AtomData > &atoms, const std::vector< CustomInteractionData > &interactions)
 

Static Public Member Functions

static TCombinatorFunc getCombinator (CombinationRuleType combination_rule, CoefficientType coefficient=CoefficientType::ANY)
 
static constexpr double combUndefined (double=0.0, double=0.0)
 
static double combArithmetic (double a, double b)
 
static double combGeometric (double a, double b)
 
static double modIdentity (double x)
 
static double modSquared (double x)
 

Detailed Description

Exception for handling pair potential initialization.

PairMixer creates a matrix of pair potential coefficients based on the atom properties and/or custom values using an arbitrary combination rule.

PairMixer holds three functions that are applied in order extractor → combinator → modifier to create a coefficient matrix for all possible interactions. The function createPairMatrix applies the functions on all atom type pairs, and optionally also on the list of custom pair parameters (not the combinator function).

Member Function Documentation

◆ createPairMatrix() [1/2]

TPairMatrixPtr Faunus::pairpotential::PairMixer::createPairMatrix ( const std::vector< AtomData > &  atoms)
Returns
a square matrix of atoms.size()

◆ createPairMatrix() [2/2]

TPairMatrixPtr Faunus::pairpotential::PairMixer::createPairMatrix ( const std::vector< AtomData > &  atoms,
const std::vector< CustomInteractionData > &  interactions 
)
Returns
a square matrix of atoms.size()

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