# SelectSegment¶

class SelectSegment : public feasst::TrialSelectParticle

Select a random segment.

Subclassed by feasst::SelectEndSegment

Public Functions

SelectSegment(const argtype &args = argtype())

args:

• max_length : maximum length of selected segment. If -1 (default), then randomly select all possible lengths.

int max_length() const

Return the maximum length.

bool random_segment_in_particle(const Configuration &config, Select *select, Random *random, const int max_length = -1)

Parameters
• max_length: Set the maximum length of the segment. If -1 (default), consider all possible lengths.

Select all sites between two randomly selected sites in a randomly selected particle in group. Return true if selection is valid

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.