Trait qsym2::auxiliary::geometry::Transform

source ·
pub trait Transform {
    // Required methods
    fn transform_mut(&mut self, mat: &Matrix3<f64>);
    fn rotate_mut(&mut self, angle: f64, axis: &Vector3<f64>);
    fn improper_rotate_mut(
        &mut self,
        angle: f64,
        axis: &Vector3<f64>,
        kind: &ImproperRotationKind,
    );
    fn translate_mut(&mut self, tvec: &Vector3<f64>);
    fn recentre_mut(&mut self);
    fn reverse_time_mut(&mut self);
    fn transform(&self, mat: &Matrix3<f64>) -> Self;
    fn rotate(&self, angle: f64, axis: &Vector3<f64>) -> Self;
    fn improper_rotate(
        &self,
        angle: f64,
        axis: &Vector3<f64>,
        kind: &ImproperRotationKind,
    ) -> Self;
    fn translate(&self, tvec: &Vector3<f64>) -> Self;
    fn recentre(&self) -> Self;
    fn reverse_time(&self) -> Self;
}
Expand description

Geometrical transformability in three dimensions.

Required Methods§

source

fn transform_mut(&mut self, mat: &Matrix3<f64>)

Transforms in-place the coordinates about the origin by a given transformation.

§Arguments
  • mat - A three-dimensional transformation matrix.
source

fn rotate_mut(&mut self, angle: f64, axis: &Vector3<f64>)

Rotates in-place the coordinates through angle about axis.

§Arguments
  • angle - The angle of rotation.
  • axis - The axis of rotation.
source

fn improper_rotate_mut( &mut self, angle: f64, axis: &Vector3<f64>, kind: &ImproperRotationKind, )

Improper-rotates in-place the coordinates through angle about axis.

§Arguments
  • angle - The angle of rotation.
  • axis - The axis of rotation.
  • kind - The convention in which the improper rotation is defined.
source

fn translate_mut(&mut self, tvec: &Vector3<f64>)

Translates in-place the coordinates by a specified translation vector in three dimensions.

§Arguments
  • tvec - The translation vector.
source

fn recentre_mut(&mut self)

Recentres in-place to put the centre of mass at the origin.

source

fn reverse_time_mut(&mut self)

Reverses time by reversing in-place the polarity of any magnetic special atoms.

source

fn transform(&self, mat: &Matrix3<f64>) -> Self

Clones and transforms the coordinates about the origin by a given transformation.

§Arguments
  • mat - A three-dimensional transformation matrix.
§Returns

A transformed copy.

source

fn rotate(&self, angle: f64, axis: &Vector3<f64>) -> Self

Clones and rotates the coordinates through angle about axis.

§Arguments
  • angle - The angle of rotation.
  • axis - The axis of rotation.
§Returns

A rotated copy.

source

fn improper_rotate( &self, angle: f64, axis: &Vector3<f64>, kind: &ImproperRotationKind, ) -> Self

Clones and improper-rotates the coordinates through angle about axis.

§Arguments
  • angle - The angle of rotation.
  • axis - The axis of rotation.
  • kind - The convention in which the improper rotation is defined.
§Returns

An improper-rotated copy.

source

fn translate(&self, tvec: &Vector3<f64>) -> Self

Clones and translates in-place the coordinates by a specified translation in three dimensions.

§Arguments
  • tvec - The translation vector.
§Returns

A translated copy.

source

fn recentre(&self) -> Self

Clones and recentres to put the centre of mass at the origin.

§Returns

A recentred copy.

source

fn reverse_time(&self) -> Self

Clones the molecule and reverses time by reversing the polarity of any magnetic special atoms.

§Returns

A time-reversed copy.

Object Safety§

This trait is not object safe.

Implementors§