EnergyMap
-
class EnergyMap
Define a generic interface for derived classes to track interaction energy.
Subclassed by feasst::EnergyMapAll, feasst::EnergyMapNeighbor
Public Functions
-
double default_value() const
Return the default value.
-
virtual void clear(const int part1_index, const int site1_index, const int part2_index, const int site2_index)
Clear the interaction.
-
virtual double update(const double energy, const int part1_index, const int site1_index, const int site1_type, const int part2_index, const int site2_index, const int site2_type, const double squared_distance, const Position *pbc, const Configuration &config)
Update the interaction.
-
virtual bool is_queryable() const
Return true if the total interaction energy is stored (e.g., no criteria for inclusion.
-
virtual double energy(const int part1_index, const int site1_index) const
Return the interaction energy of given site.
-
void precompute(Configuration *config)
Precompute.
-
virtual double total_energy() const
Return the total energy.
-
virtual void select_cluster(const NeighborCriteria &cluster_criteria, const Configuration &config, const int particle_node, Select *cluster, const Position &frame_of_reference) const
Add neighboring particles to selection which interact with node based on an energy less than or equal to the tolerance. The cluster also has positions taking into account periodic boundary conditions, which is why frame of reference is used recurisvely.
-
virtual bool is_cluster_changed(const NeighborCriteria &cluster_criteria, const Select &select, const Configuration &config) const
Compare old and new maps to see if cluster has changed. This is useful for detailed balance with rigid cluster moves.
-
virtual const NeighborCriteria &neighbor_criteria() const
Return the NeighborCriteria.
-
virtual void neighbors(const NeighborCriteria &neighbor_criteria, const Configuration &config, const int target_particle, const int target_site, const int given_site_index, Select *neighbors, const int new_map = 0) const
Return the neighbors of target particle and site that are of given site index.
- param neighbors:
Return of the neighbors
- param new_map:
If 1, use newly computed map.
Arguments
default_value: set initial or cleared values to this (default: 0).
-
double default_value() const