TrialSelectParticle

class TrialSelectParticle : public feasst::TrialSelect

Select a random particle for trial.

Subclassed by feasst::SelectSegment

Public Functions

TrialSelectParticle(const argtype &args = argtype())

args:

  • load_coordinates: load the coordinates into the selection (default: true)

  • site: site index to select. If all sites, set to -1 (default).

  • ghost: select ghost particles (default: false).

  • exclude_perturbed: if true, exclude perturbed particle (default: false)

bool load_coordinates() const

Return true if loading coordinates into selection.

int site() const

Return site.

int random_particle(const Configuration &config, const Select *exclude, Select *select, Random *random)

Parameters
  • exclude: Exclude from selection.

Add random particle in group index to select. Return the number of particles to choose from.

int random_particle(const Configuration &config, Select *select, Random *random)

Same as above, but no exclusions.

void ghost_particle(Configuration *config, const Select *exclude, Select *select)

Select a ghost particle.

Parameters
  • exclude: Exclude from selection.

void ghost_particle(Configuration *config, Select *select)

Same as above, but no exclusions.

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

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

void select_particle(const int particle_index, const Configuration &config)

Select a particular particle by index. Note that this index ignores ghost particles.