PerturbRotate

class PerturbRotate : public feasst::PerturbMove

Rotate the positions of the selection. Assumes the selection is only one particle.

Subclassed by feasst::PerturbCrankshaft, feasst::PerturbPivot, feasst::PerturbRotateCOM

Public Functions

PerturbRotate(const argtype &args = argtype())

args:

  • pivot_site: set the site index in selection with which to use as the pivot for rotation. If -1, use the particle position (default: -1).

void update_selection(const Position &pivot, const RotationMatrix &rotation, TrialSelect *select, const bool rotate_particle_position = true)

Change the position in the selection given a pivot and rotation matrix.

Parameters
  • rotate_particle_position: Rotate particle positions (default). Otherwise, do not.

void move(const Position &pivot, const RotationMatrix &rotation, System *system, TrialSelect *select, const bool rotate_particle_position = true)

Change the position of the selection given a pivot and rotation matrix.

Parameters
  • rotate_particle_position: Rotate particle positions (default). Otherwise, do not.

void move(System *system, TrialSelect *select, Random *random)

Rotate the selected particles using the tuning parameter. Set the pivot using the first particle position, and also rotate the particle positions.

void move(System *system, TrialSelect *select, Random *random, const Position &pivot, const bool rotate_particle_position)

Rotate the selected particles using the tuning parameter.

Parameters
  • pivot: If pivot is empty, use first particle position.

  • rotate_particle_position: Rotate particle positions if true. Otherwise, do not.