faunus
Public Member Functions | Protected Attributes | List of all members
Faunus::Energy::Nonbonded< TPairEnergy, TPairingPolicy > Class Template Reference

Computes change in the non-bonded energy, assuming pairwise additive energy terms. More...

#include <energy.h>

Inheritance diagram for Faunus::Energy::Nonbonded< TPairEnergy, TPairingPolicy >:
Inheritance graph
[legend]
Collaboration diagram for Faunus::Energy::Nonbonded< TPairEnergy, TPairingPolicy >:
Collaboration graph
[legend]

Public Member Functions

 Nonbonded (const json &j, Space &spc, BasePointerVector< EnergyTerm > &pot)
 
double particleParticleEnergy (const Particle &particle1, const Particle &particle2) override
 
double groupGroupEnergy (const Group &group1, const Group &group2) override
 
void from_json (const json &j)
 
void to_json (json &j) const override
 json output
 
double energy (const Change &change) override
 energy due to change
 
void force (std::vector< Point > &forces) override
 Calculates the force on all particles. More...
 
- Public Member Functions inherited from Faunus::Energy::EnergyTerm
virtual void sync (EnergyTerm *other_energy, const Change &change)
 Sync (copy from) another energy instance. More...
 
virtual void init ()
 reset and initialize
 
virtual void updateState (const Change &change)
 Update internal state to reflect change in e.g. Space. More...
 
virtual void force (PointVector &forces)
 update forces on all particles
 

Protected Attributes

const Spacespc
 space to operate on
 
TPairEnergy pair_energy
 a functor to compute non-bonded energy between two particles, see PairEnergy
 
TPairingPolicy pairing
 pairing policy to effectively sum up the pairwise additive non-bonded energy
 
std::shared_ptr< EnergyAccumulatorBaseenergy_accumulator
 energy accumulator used for storing and summing pair-wise energies
 

Additional Inherited Members

- Public Types inherited from Faunus::Energy::EnergyTerm
enum  MonteCarloState { ACCEPTED, TRIAL, NONE }
 
- Public Attributes inherited from Faunus::Energy::EnergyTerm
MonteCarloState state = MonteCarloState::NONE
 
std::string name
 Meaningful name.
 
std::string citation_information
 Possible reference; may be left empty.
 
TimeRelativeOfTotal< std::chrono::microseconds > timer
 Timer for measuring speed.
 

Detailed Description

template<RequirePairEnergy TPairEnergy, typename TPairingPolicy>
class Faunus::Energy::Nonbonded< TPairEnergy, TPairingPolicy >

Computes change in the non-bonded energy, assuming pairwise additive energy terms.

Template Parameters
TPairEnergya functor to compute non-bonded energy between two particles
TPairingPolicypairing policy to effectively sum up the pairwise additive non-bonded energy

Member Function Documentation

◆ force()

template<RequirePairEnergy TPairEnergy, typename TPairingPolicy >
void Faunus::Energy::Nonbonded< TPairEnergy, TPairingPolicy >::force ( std::vector< Point > &  forces)
inlineoverride

Calculates the force on all particles.

Todo:
A stub. Change to reflect only active particle, see Space::activeParticles().

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