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

Computes non-bonded energy contribution from changed particles. More...

#include <energy.h>

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

Public Member Functions

 NonbondedCached (const json &j, Space &spc, BasePointerVector< EnergyTerm > &pot)
 
void init () override
 Cache pair interactions in matrix.
 
double energy (const Change &change) override
 energy due to change
 
void sync (EnergyTerm *base_ptr, const Change &change) override
 Copy energy matrix from other. More...
 
- Public Member Functions inherited from Faunus::Energy::Nonbonded< TPairEnergy, TPairingPolicy >
 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
 
void force (std::vector< Point > &forces) override
 Calculates the force on all particles. More...
 
- Public Member Functions inherited from Faunus::Energy::EnergyTerm
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
 

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.
 
- Protected Attributes inherited from Faunus::Energy::Nonbonded< TPairEnergy, TPairingPolicy >
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
 

Detailed Description

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

Computes non-bonded energy contribution from changed particles.

Cache group2group energy once calculated, until a new trial configuration is provided. Not for general use as only partially implemented!

Original implementation, only refurbished. Generally suboptimal as only PairingPolicy::group2group method may be called. No internal energy is ever computed. Cannot deal with particle count changes. And other unmentioned constrains.

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

◆ sync()

template<RequirePairEnergy TPairEnergy, typename TPairingPolicy >
void Faunus::Energy::NonbondedCached< TPairEnergy, TPairingPolicy >::sync ( EnergyTerm base_ptr,
const Change change 
)
inlineoverridevirtual

Copy energy matrix from other.

Parameters
base_ptr
change

Reimplemented from Faunus::Energy::EnergyTerm.


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