class TrialSelectBond : public feasst::TrialSelect

A random particle of given type is selected if previously perturbed sites are not available. Select a single bond from given anchor to mobile sites.

Subclassed by feasst::TrialSelectAngle

Public Functions

TrialSelectBond(const argtype &args = argtype())


  • mobile_site: index of the mobile site.

  • anchor_site: index of the anchor site.

int anchor_site() const

Return the anchor site.

int mobile_site() const

Return the mobile site.

void precompute(System *system)

bond_type is added as a property. Mobile and anchor are sized.

bool select(const Select &perturbed, System *system, Random *random)

  • perturbed: Perturbed is included to allow chaining of selection based on previous.

Perform the selection as implemented in the derived class. Return false if the selection cannot be made. Otherwise, return true.