[][src]Struct codenano::Helix

pub struct Helix {
    pub origin: Point<f64>,
    pub roll: f64,
    pub yaw: f64,
    pub pitch: f64,
}

A DNA helix. All bases of all strands must be on a helix.

The three angles are illustrated in the following image, from the NASA website:

Aircraft angles

Fields

origin: Point<f64>

Position of the origin of the helix axis.

roll: f64

Angle around the axis of the helix.

yaw: f64

Horizontal rotation.

pitch: f64

Vertical rotation.

Implementations

impl Helix[src]

pub fn theta(&self, n: isize, right: bool, cst: &Parameters) -> f64[src]

Angle of base number n around this helix.

pub fn space_pos(&self, p: &Parameters, n: isize, right: bool) -> [f64; 3][src]

3D position of a nucleotide on this helix. n is the position along the axis, and right is true iff the 5' to 3' direction of the strand containing that nucleotide runs in the same direction as the axis of the helix.

pub fn basis(&self) -> [[f64; 3]; 3][src]

Return a basis of the Helix PoV

pub fn axis_pos(&self, p: &Parameters, n: isize) -> [f64; 3][src]

3D position of the projection of the nucleotide on its helix. n is the position along the axis.

pub fn overlap(&self, other: &Helix, p: &Parameters) -> bool[src]

Test if two helices overlap.

pub fn clone_up(&self, p: &Parameters) -> Self[src]

A clone of self translated by one step along the y vector

pub fn clone_down(&self, p: &Parameters) -> Self[src]

A clone of self translated by minus one step along the y vector

pub fn clone_left(&self, p: &Parameters) -> Self[src]

A clone of self translated by minus one step along the z vector

pub fn clone_right(&self, p: &Parameters) -> Self[src]

A clone of self translated by one step along the z vector

pub fn closest_nucl<F: Into<f64> + Copy>(
    &self,
    point: [F; 3],
    p: &Parameters
) -> isize
[src]

Return the position on axis that is the closest to the point given in argument

Trait Implementations

impl Clone for Helix[src]

impl Debug for Helix[src]

impl<'de> Deserialize<'de> for Helix[src]

impl Serialize for Helix[src]

Auto Trait Implementations

impl RefUnwindSafe for Helix

impl Send for Helix

impl Sync for Helix

impl Unpin for Helix

impl UnwindSafe for Helix

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.