|
faunus
|
All energies inherit from this class. More...
#include <externalpotential.h>


Public Types | |
| enum | MonteCarloState { ACCEPTED, TRIAL, NONE } |
Public Member Functions | |
| virtual double | energy (const Change &change)=0 |
| energy due to change | |
| virtual void | to_json (json &j) const |
| json output | |
| 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 | |
Public Attributes | |
| 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. | |
All energies inherit from this class.
|
virtual |
Sync (copy from) another energy instance.
| other_energy | Other energy instance to copy data from |
| change | Describes the difference with the other energy term |
Reimplemented in Faunus::Energy::Hamiltonian, Faunus::Energy::NonbondedCached< TPairEnergy, TPairingPolicy >, Faunus::Energy::Ewald, and Faunus::Energy::Penalty.
|
virtual |
Update internal state to reflect change in e.g. Space.
This should be called whenever the Space is modified (particles, volume, etc) as some energy terms may depend on this.
One example is Ewald summation that needs to update k-vectors before calculating the energy.
Reimplemented in Faunus::Energy::Hamiltonian, and Faunus::Energy::Ewald.
1.8.13