PerturbRotate
-
class PerturbRotate : public feasst::PerturbMove
Rotate the positions of the selection. In 2D, the tunable parameter is the maximum angle of rotation. In 3D, its the relative weight between a random quaternion and quaternion that represents an zero-angle rotation. In either case, the tunable parameter is restricted to values of 2*NEAR_ZERO to 180 by default.
Subclassed by feasst::PerturbCrankshaft, feasst::PerturbCrankshaftSmall, feasst::PerturbLibrary, feasst::PerturbParticlePivot, feasst::PerturbPivot, feasst::PerturbRotateCOM
Public Functions
-
void update_selection(const Position &pivot, const RotationMatrix &rotation, TrialSelect *select)
Change the position in the selection given a pivot and rotation matrix.
-
void update_eulers(const RotationMatrix &rotation, TrialSelect *select, const System *system)
Change the Euler angles in the selection given a rotation matrix.
-
void move(const Position &pivot, const RotationMatrix &rotation, System *system, TrialSelect *select)
Change the position of the selection given a pivot and rotation matrix.
-
void move(const bool is_position_held, System *system, TrialSelect *select, Random *random, Acceptance *acceptance)
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)
Rotate the selected particles using the tuning parameter.
- param pivot:
If pivot is empty, use first particle position.
-
void update_selection(const Position &pivot, const RotationMatrix &rotation, TrialSelect *select)