hPDB-0.99: Parser, print and manipulate structures in PDB file format.

Safe HaskellNone

Bio.PDB.Structure.Vector

Synopsis

Documentation

type Vec3D = Vector3Source

This module wraps 3D vector operations, and adds missing ones. Also hides a Vector class

Defines type alias for position and translation vectors in PDB structures.

unpackVec3D :: Vec3D -> (Double, Double, Double)Source

Unpacks an abstract 3D vector into a triple of Doubles.

vnormalise :: Vec3D -> Vec3DSource

Normalises to a unit vector in the same direction as input.

vdot :: Vec3D -> Vec3D -> DoubleSource

Computes a dot product of two 3D vectors.

(*|) :: Double -> Vec3D -> Vec3DSource

Scalar product. (* indicates side on which one can put a scalar.)

(|*) :: Vec3D -> Double -> Vec3DSource

Scalar product. (* indicates side on which one can put a scalar.)

vzip :: (Double -> Double -> Double) -> Vec3D -> Vec3D -> Vec3DSource

Maps an operation on a pair of Doubles onto a pair of 3D vectors coordinatewise.

vmap :: (Double -> Double) -> Vec3D -> Vec3DSource

Maps an operation that modifies a Double onto a 3D vector.

vnorm :: Vec3D -> DoubleSource

2-norm of a vector (also called a magnitude or length.)

vproj :: Vector3 -> Vector3 -> Vec3DSource

Finds a vector component of the first vector that is a projection onto direction of second vector.

vperpend :: Vec3D -> Vector3 -> Vec3DSource

Returns a component of the vector v that is perpendicular to w.

vperpends :: Vec3D -> [Vector3] -> Vec3DSource

Finds a component of the vector v that is perpendicular to all vectors in a list.

vdihedral :: Vec3D -> Vec3D -> Vec3D -> DoubleSource

Compute dihedral between three bond vectors using spherical angle formula.