TrialSelectParticle
-
class TrialSelectParticle : public feasst::TrialSelect
Select a random particle for trial.
Subclassed by feasst::SelectCrankshaftSmall, feasst::SelectSegment
Public Functions
-
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)
Add random particle in group index to select. Return the number of particles to choose from.
- param exclude:
Exclude from selection.
-
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.
- param 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)
Perform the selection as implemented in the derived class. Return false if the selection cannot be made. Otherwise, return true.
- param perturbed:
Perturbed is included to allow chaining of selection based on previous.
-
void select_particle(const int particle_index, const Configuration &config)
Select a particular particle by index. Note that this index ignores ghost particles.
Arguments
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)
min_particles: do not select if less than min number of particles. If -1, no constraint (default: -1). Note that this is the number of particles before the Trial.
max_particles: do not select if more than max number of particles. If -1, no constraint (default: -1). Note that this is the number of particles before the Trial.
TrialSelect arguments.
-
bool load_coordinates() const