faunus
Public Member Functions | Protected Member Functions | List of all members
Faunus::Energy::GroupPairing< TPolicy > Class Template Reference

Computes pair quantity difference for a systen perturbation. More...

#include <energy.h>

Public Member Functions

template<RequireEnergyAccumulator TAccumulator>
void accumulate (TAccumulator &pair_accumulator, const Change &change)
 Computes pair quantity difference from changed particles. More...
 
 GroupPairing (Space &spc)
 
void from_json (const json &j)
 
void to_json (json &j) const
 
template<typename Accumulator >
void group2group (Accumulator &pair_accumulator, const Space::GroupType &group1, const Space::GroupType &group2)
 

Protected Member Functions

template<RequireEnergyAccumulator TAccumulator>
void accumulateGroup (TAccumulator &pair_accumulator, const Change &change)
 Computes pair quantity difference if only a single group has changed. More...
 
template<RequireEnergyAccumulator TAccumulator>
void accumulateSpeciation (TAccumulator &pair_accumulator, const Change &change)
 Computes pair quantity difference if the number of particles has changed. More...
 

Detailed Description

template<typename TPolicy>
class Faunus::Energy::GroupPairing< TPolicy >

Computes pair quantity difference for a systen perturbation.

Such quantity can be energy using nonponded pair potential

Template Parameters
TPolicya pairing policy

Member Function Documentation

◆ accumulate()

template<typename TPolicy >
template<RequireEnergyAccumulator TAccumulator>
void Faunus::Energy::GroupPairing< TPolicy >::accumulate ( TAccumulator &  pair_accumulator,
const Change change 
)
inline

Computes pair quantity difference from changed particles.

The internal energy contribution, i.e., the contribution from the intra group interactions, is added only if a single group is changed or if all changed.

Parameters
change
pair_accumulatoraccumulator of interacting pairs of particles

◆ accumulateGroup()

template<typename TPolicy >
template<RequireEnergyAccumulator TAccumulator>
void Faunus::Energy::GroupPairing< TPolicy >::accumulateGroup ( TAccumulator &  pair_accumulator,
const Change change 
)
inlineprotected

Computes pair quantity difference if only a single group has changed.

Template Parameters
TAccumulator
Parameters
pair_accumulatoraccumulator of interacting pairs of particles
change

◆ accumulateSpeciation()

template<typename TPolicy >
template<RequireEnergyAccumulator TAccumulator>
void Faunus::Energy::GroupPairing< TPolicy >::accumulateSpeciation ( TAccumulator &  pair_accumulator,
const Change change 
)
inlineprotected

Computes pair quantity difference if the number of particles has changed.

Particles have to be explicitly enumerated in the atom indices of the changed group. Implicit addition of atoms with a group is not supported yet. Note that we do not have to care about missing (removed) particles at all. They are taken into account in the original (old) space where they are present.

Parameters
pair_accumulatoraccumulator of interacting pairs of particles
change

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