NeighborCriteria

class NeighborCriteria

Criteria for defining neighbors.

Public Functions

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

  • reference_potential: index of reference potentials (default: -1). If -1, use full potentials.

  • 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).

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