hPDB-1.2.0.6: Protein Databank file format library

Bio.PDB.Structure.Vector

Contents

Description

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

Synopsis

# Documentation

data Vector3 :: * #

Constructors

 Vector3 Fieldsv3x :: ~Scalar v3y :: ~Scalar v3z :: ~Scalar

Instances

 Methods(==) :: Vector3 -> Vector3 -> Bool #(/=) :: Vector3 -> Vector3 -> Bool # Methods Methods MethodsshowList :: [Vector3] -> ShowS # Vector Vector3 BasicVector Vector3 Methodsvmap :: (Scalar -> Scalar) -> Vector3 -> Vector3vzip :: (Scalar -> Scalar -> Scalar) -> Vector3 -> Vector3 -> Vector3vfold :: (Scalar -> Scalar -> Scalar) -> Vector3 -> Scalarvpack :: [Scalar] -> Maybe Vector3vunpack :: Vector3 -> [Scalar]vpromote :: Scalar -> Vector3

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

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

Computes a dot product of two 3D vectors.

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

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

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

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

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

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

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

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

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

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

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

Compute dihedral between three bond vectors using spherical angle formula.

# Orphan instances

 Arbitrary Vector3 Source # Methodsarbitrary :: Gen Vector3shrink :: Vector3 -> [Vector3]