EnergyMap¶
-
class
EnergyMap
¶ Define a generic interface for derived classes to track interaction energy.
Subclassed by feasst::EnergyMapAll, feasst::EnergyMapNeighbor
Public Functions
-
EnergyMap
(const argtype &args = argtype())¶ args:
default_value: set initial or cleared values to this.
-
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)¶ Update the interaction.
-
virtual bool
is_queryable
() const¶ Return true if the total interaction energy is stored (e.g., no criteria for inclusion.
-
double
query
(const int part1_index, const int site1_index, const int part2_index, const int site2_index)¶ Return the interaction energy.
-
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¶ - Parameters
neighbors
: Return of the neighborsnew_map
: If 1, use newly computed map.
Return the neighbors of target particle and site that are of given site index.
-