|
faunus
|
Aggregate and sum energy terms. More...
#include <energy.h>


Public Member Functions | |
| Hamiltonian (Space &spc, const json &j) | |
| void | init () override |
| reset and initialize | |
| void | updateState (const Change &change) override |
| Update internal state to reflect change in e.g. Space. More... | |
| void | sync (EnergyTerm *other_hamiltonian, const Change &change) override |
| Sync (copy from) another energy instance. More... | |
| double | energy (const Change &change) override |
| Energy due to changes. | |
| const std::vector< double > & | latestEnergies () const |
Energies for each term from the latest call to energy() | |
Public Member Functions inherited from Faunus::BasePointerVector< EnergyTerm > | |
| auto | begin () noexcept |
| auto | begin () const noexcept |
| auto | end () noexcept |
| auto | end () const noexcept |
| auto | empty () const noexcept |
| auto | size () const noexcept |
| auto & | back () noexcept |
| auto & | back () const noexcept |
| auto & | front () noexcept |
| auto & | front () const noexcept |
| auto & | at (size_t n) |
| auto & | at (size_t n) const |
| void | emplace_back (Args &... args) |
| Create an (derived) instance and append a pointer to it to the vector. | |
| void | emplace_back (const Args &... args) |
| Create an (derived) instance and append a pointer to it to the vector. | |
| auto & | push_back (value_type arg) |
| Append a pointer to a (derived) instance to the vector. | |
| auto & | operator= (const BasePointerVector< Tderived > &d) |
| Allow assignment to a vector of ancestors. | |
| auto | find () const |
| Pointer list to all matching type. | |
| std::shared_ptr< Tderived > | findFirstOf () const |
Additional Inherited Members | |
Public Types inherited from Faunus::Energy::EnergyTerm | |
| enum | MonteCarloState { ACCEPTED, TRIAL, NONE } |
Public Types inherited from Faunus::BasePointerVector< EnergyTerm > | |
| using | value_type = std::shared_ptr< EnergyTerm > |
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. | |
Public Attributes inherited from Faunus::BasePointerVector< EnergyTerm > | |
| std::vector< value_type > | vec |
| Vector of shared pointers to base class. | |
Aggregate and sum energy terms.
|
overridevirtual |
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 from Faunus::Energy::EnergyTerm.
|
overridevirtual |
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 from Faunus::Energy::EnergyTerm.
1.8.13