hPDB-1.2.0.9: Protein Databank file format library

Safe HaskellSafe
LanguageHaskell98

Bio.PDB.Structure.Vector

Contents

Description

This module wraps 3D vector operations, and adds missing ones.

Synopsis

Documentation

unpackVector3 :: Vector3 -> (Double, Double, Double) #

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

vnormalise :: Vector3 -> Vector3 #

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

vdot :: Vector3 -> Vector3 -> Double #

Computes a dot product of two 3D vectors.

(*|) :: Double -> Vector3 -> Vector3 #

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

(|*) :: Vector3 -> Double -> Vector3 #

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

vzip :: (Double -> Double -> Double) -> Vector3 -> Vector3 -> Vector3 #

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

vmap :: (Double -> Double) -> Vector3 -> Vector3 #

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

vnorm :: Vector3 -> Double #

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

vproj :: Vector3 -> Vector3 -> Vector3 #

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

vperpend :: Vector3 -> Vector3 -> Vector3 #

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

vperpends :: Foldable t => Vector3 -> t Vector3 -> Vector3 #

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

vdihedral :: Vector3 -> Vector3 -> Vector3 -> Double #

Compute dihedral between three bond vectors using spherical angle formula.

Orphan instances