PotentialFactory¶
-
class
PotentialFactory
¶ A list of potentials.
Public Functions
Add potential.
Set a potential.
-
int
num
() const¶ Return the number of potentials.
-
void
precompute
(Configuration *config)¶ Precompute quantities for optimizations before calculation of energies.
-
void
precompute
(const int index, Configuration *config)¶ Precompute a particular potential by index.
-
double
energy
(Configuration *config)¶ Compute the energy of the given configuration.
-
double
select_energy
(const Select &select, Configuration *config)¶ Compute the energy of the selection in the configuration.
-
std::vector<double>
stored_energy_profile
() const¶ Return the profile of energies that were last computed.
-
double
stored_energy
() const¶ Return the last computed value of the energy.
-
std::string
str
() const¶ Return a human-readable status.
-
void
change_volume
(const double delta_volume, const int dimension)¶ Change the volume.
-
void
revert
(const Select &select)¶ Revert any changes to the configuration due to the last energy computation.
-
void
load_cache
(const bool load)¶ Set cache to load energy calculations.
-
void
unload_cache
(const PotentialFactory &factory)¶ Set cache to unload energy calclatuions.
-
void
serialize
(std::ostream &sstr) const¶ Serialize.
-
PotentialFactory
(std::istream &sstr)¶ Deserialize.