faunus
Classes | Typedefs | Enumerations | Functions | Variables
Faunus::pairpotential Namespace Reference

Namespace for particle pair-potentials. More...

Classes

class  AshbaughHatch
 Ashbaugh-Hatch pair potential. More...
 
struct  BondData
 Base class for bonded potentials. More...
 
class  CigarWithCigar
 Template for interactions between patchy sphero-cylinders (PSCs) interactions. More...
 
class  CigarWithSphere
 Pair potential between a patchy sphero-cylinder (first particle) and a sphere (second particle) More...
 
struct  CombinedPairPotential
 Statically combines two pair potentials at compile-time. More...
 
class  CompleteCigarPotential
 Set pair potential between cigar-cigar, sphere-sphere, cigar-sphere. More...
 
class  CosAttract
 Cosine attraction. More...
 
class  CosAttractMixed
 Cosine attraction using combination rules (Eq. More...
 
class  Coulomb
 Plain Coulomb potential. More...
 
struct  CustomInteractionData
 Data for a custom (heterogeneous) interaction between two given atom types. More...
 
class  CustomPairPotential
 Custom pair-potential taking math. More...
 
class  DipoleDipole
 
class  FENE
 Finite Extensible Nonlinear Elastic (FENE) potential. More...
 
struct  FENEBond
 FENE bond. More...
 
struct  FENEWCABond
 FENE+WCA bond. More...
 
class  FunctorPotential
 Arbitrary potentials for specific atom types. More...
 
struct  GromosTorsion
 Gromos torsion. More...
 
class  HardSphere
 Hardsphere potential. More...
 
class  HardSpheroCylinder
 Hard-sphere pair potential for spherocylinders. More...
 
struct  HarmonicBond
 Harmonic Bond. More...
 
struct  HarmonicDihedral
 Harmonic dihedral. More...
 
struct  HarmonicTorsion
 Harmonic torsion. More...
 
class  Hertz
 Hertz potential. More...
 
class  LennardJones
 Lennard-Jones potential with an arbitrary combination rule. More...
 
class  MixerPairPotentialBase
 A common ancestor for potentials that use parameter matrices computed from atomic properties and/or custom atom pair properties. More...
 
class  Multipole
 Multipole interactions. More...
 
class  NewCoulombGalore
 Wrapper for external CoulombGalore library. More...
 
class  PairMixer
 Exception for handling pair potential initialization. More...
 
class  PairPotential
 Base for all pair-potentials. More...
 
struct  PeriodicDihedral
 Periodic dihedral. More...
 
class  Polarizability
 Charge-nonpolar pair interaction. More...
 
class  RepulsionR3
 
class  SASApotential
 Pairwise SASA potential calculating the surface area of inter-secting spheres. More...
 
class  SplinedPotential
 Splined pair potentials. More...
 
class  SquareWell
 Square-well potential. More...
 
struct  TorsionData
 
class  WeeksChandlerAndersen
 Weeks-Chandler-Andersen pair potential. More...
 

Typedefs

using PrimitiveModel = CombinedPairPotential< Coulomb, HardSphere >
 Primitive model of electrolytes.
 
using PrimitiveModelWCA = CombinedPairPotential< Coulomb, WeeksChandlerAndersen >
 
using CigarCosAttractWCA = CompleteCigarPotential< CosAttractMixed, WeeksChandlerAndersen >
 
using TPairMatrix = Eigen::MatrixXd
 type of a matrix containing pair potential coefficients
 
using TPairMatrixPtr = std::shared_ptr< TPairMatrix >
 
using TExtractorFunc = std::function< double(const InteractionData &)>
 type of a function extracting a potential coefficient from the InteractionData, e.g., sigma or eps
 
using TCombinatorFunc = std::function< double(double, double)>
 type of a function defining a combination rule of a heterogeneous pair interaction
 
using TModifierFunc = std::function< double(double)>
 type of a function modifying combinator's output
 

Enumerations

enum  CombinationRuleType { UNDEFINED, ARITHMETIC, GEOMETRIC, LORENTZ_BERTHELOT }
 Known named combination rules for parameters of pair potential interaction. More...
 

Functions

void to_json (Faunus::json &j, const std::shared_ptr< const BondData > &bond)
 
void to_json (Faunus::json &j, const BondData &bond)
 
void from_json (const json &j, std::shared_ptr< BondData > &bond)
 
 TEST_SUITE_BEGIN ("Bonds")
 
 TEST_CASE ("[Faunus] BondData")
 
 TEST_SUITE_END ()
 
constexpr unsigned int factorial (unsigned int n)
 Returns the factorial of 'n'. More...
 
 TEST_CASE ("[Faunus] Factorial")
 
void dipoleDipoleQ2Help_3 (double &a3, double &b3, double q)
 Help-function for sfQpotential using order 3.
 
void dipoleDipoleQ2Help_4 (double &a4, double &b4, double q)
 Help-function for sfQpotential using order 4.
 
double dipoleDipoleQ2Help (double q, int l=0, int P=300, bool a=true)
 Help-function for sfQ0potential.
 
double qPochhammerSymbol (double q, int k=1, int P=300)
 Help-function for the q-potential in class CoulombGalore. More...
 
 TEST_CASE ("[Faunus] qPochhammerSymbol")
 
 TEST_CASE ("[Faunus] PairMixer")
 
void from_json (const json &j, CustomInteractionData &c)
 
void to_json (json &j, const CustomInteractionData &interaction)
 
void from_json (const json &j, std::vector< CustomInteractionData > &interactions)
 
void to_json (json &j, const PairPotential &base)
 Serialize any pair potential to json.
 
void from_json (const json &j, PairPotential &base)
 Serialize any pair potential from json.
 
 TEST_CASE ("[Faunus] CosAttract")
 
 TEST_CASE ("[Faunus] SASApotential")
 
 TEST_CASE ("[Faunus] CustomPairPotential")
 
 TEST_CASE ("[Faunus] LennardJones")
 
 TEST_CASE ("[Faunus] AshbaughHatch")
 
 TEST_CASE ("[Faunus] HardSphere")
 
 TEST_CASE ("[Faunus] Hertz")
 
 TEST_CASE ("[Faunus] SquareWell")
 
 TEST_CASE ("[Faunus] FunctorPotential")
 
 TEST_CASE ("[Faunus] NewCoulombGalore")
 
 TEST_CASE ("[Faunus] Dipole-dipole interactions")
 
 TEST_CASE ("[Faunus] WeeksChandlerAndersen")
 
template<RequirePairPotential T>
auto makePairPotential (const json &j)
 Convenience function to generate a pair potential initialized from JSON object.
 
 TEST_CASE ("[Faunus] CigarWithCigar")
 

Variables

template<class T >
concept RequirePairPotential = std::derived_from<T, pairpotential::PairPotential>
 Concept matching a particle pair potential derived from Potential::PairPotentialBase
 

Detailed Description

Namespace for particle pair-potentials.

Enumeration Type Documentation

◆ CombinationRuleType

Known named combination rules for parameters of pair potential interaction.

When adding a new one, add a json mapping. Also consider appending the PairMixer::getCombinator() method to recognize the new rule.

Function Documentation

◆ factorial()

constexpr unsigned int Faunus::pairpotential::factorial ( unsigned int  n)

Returns the factorial of 'n'.

Note that 'n' must be positive semidefinite.

Note
Calculated at compile time and thus have no run-time overhead.

◆ qPochhammerSymbol()

double Faunus::pairpotential::qPochhammerSymbol ( double  q,
int  k = 1,
int  P = 300 
)
inline

Help-function for the q-potential in class CoulombGalore.

More information here: http://mathworld.wolfram.com/q-PochhammerSymbol.html P = 300 gives an error of about 10^-17 for k < 4