NeighborCriteria

class NeighborCriteria

Criteria for defining neighbors.

Public Functions

void name_to_index(const ParticleFactory &unique_types)

Convert site type names to intergers for optimization. Otherwise, assumes name is index (and index is -1 if stoi fails).

bool is_accepted(const double energy, const double squared_distance, const int site_type0, const int site_type1) const

Return true if criteria are satisfied.

double volume(const int dimension) const

Return the volume based on the distance criteria.

bool is_position_accepted(const Position &position, const Domain &domain)

Return true if position satisfies criteria, taking into account PBCs.

void serialize(std::ostream &ostr) const

Serialize.

NeighborCriteria(std::istream &istr)

Construct from serialization.

Arguments

  • ref: name of RefPotential. If empty, use Potential (default: empty)

  • potential_index: index of potential for pair interaction (default: 0).

  • energy_maximum: maximum energy to be in cluster (default: largest double precision).

  • minimum_distance: minimum separation distance (default: 0).

  • maximum_distance: maximum separation distance (default: NEAR_INFINITY).

  • site_type0: consider only interactions between a specific site type. If -1, consider all sites (default: -1). Otherwise, site_type1 must also be included.

  • site_type1: consider only interactions between a specific site type. If -1, consider all sites (default: -1).

  • site_type0_alt: consider interactions between another specific site type. If -1, ignore (default: -1). Otherwise, site_type1_alt must also be included.

  • site_type1_alt: consider interactions between another specific site type. If -1, ignore (default: -1).