faunus
Public Member Functions | List of all members
Faunus::Energy::PairEnergy< TPairPotential, allow_anisotropic_pair_potential > Class Template Reference

Provides a fast inlineable interface for non-bonded pair potential energy computation. More...

#include <energy.h>

Public Member Functions

 PairEnergy (Space &spc, BasePointerVector< EnergyTerm > &potentials)
 
template<typename T >
double potential (const T &a, const T &b) const
 Computes pair potential energy. More...
 
template<typename ParticleType >
Point force (const ParticleType &a, const ParticleType &b) const
 
template<typename... Args>
auto operator() (Args &&... args)
 A functor alias for potential(). More...
 
void addPairPotentialSelfEnergy ()
 Registers the potential self-energy to hamiltonian if needed. More...
 
void from_json (const json &j)
 
void to_json (json &j) const
 

Detailed Description

template<pairpotential::RequirePairPotential TPairPotential, bool allow_anisotropic_pair_potential = true>
class Faunus::Energy::PairEnergy< TPairPotential, allow_anisotropic_pair_potential >

Provides a fast inlineable interface for non-bonded pair potential energy computation.

Template Parameters
TPairPotentiala pair potential to compute with
allow_anisotropic_pair_potentialpass also a distance vector to the pair potential, slower

Constructor & Destructor Documentation

◆ PairEnergy()

template<pairpotential::RequirePairPotential TPairPotential, bool allow_anisotropic_pair_potential = true>
Faunus::Energy::PairEnergy< TPairPotential, allow_anisotropic_pair_potential >::PairEnergy ( Space spc,
BasePointerVector< EnergyTerm > &  potentials 
)
inline
Parameters
spc
potentialsregistered non-bonded potentials

Member Function Documentation

◆ addPairPotentialSelfEnergy()

template<pairpotential::RequirePairPotential TPairPotential, bool allow_anisotropic_pair_potential = true>
void Faunus::Energy::PairEnergy< TPairPotential, allow_anisotropic_pair_potential >::addPairPotentialSelfEnergy ( )
inline

Registers the potential self-energy to hamiltonian if needed.

See also
Hamiltonian::Hamiltonian

◆ operator()()

template<pairpotential::RequirePairPotential TPairPotential, bool allow_anisotropic_pair_potential = true>
template<typename... Args>
auto Faunus::Energy::PairEnergy< TPairPotential, allow_anisotropic_pair_potential >::operator() ( Args &&...  args)
inline

A functor alias for potential().

See also
potential()

◆ potential()

template<pairpotential::RequirePairPotential TPairPotential, bool allow_anisotropic_pair_potential = true>
template<typename T >
double Faunus::Energy::PairEnergy< TPairPotential, allow_anisotropic_pair_potential >::potential ( const T a,
const T b 
) const
inline

Computes pair potential energy.

Parameters
aparticle
bparticle
Returns
pair potential energy between particles a and b

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