-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Parser, print and manipulate structures in PDB file format.
--
-- Protein Data Bank file format is a most popular format for holding
-- biomolecule data. This is a very fast parser (below 7s for the largest
-- entry in PDB - 1HTQ which is over 70MB - as compared with 11s of
-- RASMOL 2.7.5, or 2m15s of BioPython with Python 2.6 interpreter.) It
-- is aimed to not only deliver event-based interface, but also a
-- high-level data structure for manipulating data in spirit of
-- BioPython's PDB parser.
@package hPDB
@version 0.99
-- | Opening and reading a either normal or gzipped file in an efficient
-- way - either using strict ByteString or mmap
module Bio.PDB.IO.OpenAnyFile
readFile :: FilePath -> IO ByteString
writeFile :: FilePath -> (Handle -> IO a) -> IO ()
module Bio.PDB.Structure.Vector
-- | 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.
type Vec3D = Vector3
-- | Unpacks an abstract 3D vector into a triple of Doubles.
unpackVec3D :: Vec3D -> (Double, Double, Double)
-- | Normalises to a unit vector in the same direction as input.
vnormalise :: Vec3D -> Vec3D
-- | Computes a dot product of two 3D vectors.
vdot :: Vec3D -> Vec3D -> Double
-- | Scalar product. (* indicates side on which one can put a
-- scalar.)
(*|) :: Double -> Vec3D -> Vec3D
-- | Scalar product. (* indicates side on which one can put a
-- scalar.)
(|*) :: Vec3D -> Double -> Vec3D
-- | Maps an operation on a pair of Doubles onto a pair of 3D vectors
-- coordinatewise.
vzip :: (Double -> Double -> Double) -> Vec3D -> Vec3D -> Vec3D
-- | Maps an operation that modifies a Double onto a 3D vector.
vmap :: (Double -> Double) -> Vec3D -> Vec3D
-- | 2-norm of a vector (also called a magnitude or length.)
vnorm :: Vec3D -> Double
-- | Finds a vector component of the first vector that is a projection onto
-- direction of second vector.
vproj :: Vector3 -> Vector3 -> Vec3D
-- | Returns a component of the vector v that is perpendicular to w.
vperpend :: Vec3D -> Vector3 -> Vec3D
-- | Finds a component of the vector v that is perpendicular to all vectors
-- in a list.
vperpends :: Vec3D -> [Vector3] -> Vec3D
-- | Compute dihedral between three bond vectors using spherical angle
-- formula.
vdihedral :: Vec3D -> Vec3D -> Vec3D -> Double
instance Arbitrary Vector3
module Bio.PDB.Structure.List
-- | Type alias for a immutable sequence of elements.
type List a = Vector a
-- | Type alias for a mutable sequence of elements.
data TempList m a
-- | Allocate initial space for a new mutable vector.
initialNew :: Int -> ST m (TempList m a)
-- | Create a new mutable vector.
new :: MonadTrans t => Int -> t (ST m) (TempList m a)
-- | Appends an element to a mutable vector.
add :: MonadTrans t => TempList s a -> a -> t (ST s) ()
-- | Finalizes a mutable vector, and returns immutable vector. [Does it
-- shrink allocated space?]
finalize :: MonadTrans t => TempList s a -> t (ST s) (Vector a)
-- | Length of mutable vector.
tempLength :: MonadTrans t1 => TempList s t -> t1 (ST s) Int
-- | Empty vector.
empty :: Vector a
-- | last on immutable vectors.
last :: Vector a -> a
-- | Vector with a single element
singleton :: a -> Vector a
-- | map on immutable vectors.
map :: (a -> b) -> Vector a -> Vector b
-- | mapM on immutable vectors.
mapM :: Monad m => (a -> m b) -> Vector a -> m (Vector b)
-- | foldl on immutable vectors.
foldl :: (a -> b -> a) -> a -> Vector b -> a
-- | foldl' on immutable vectors.
foldl' :: (a -> b -> a) -> a -> Vector b -> a
-- | foldr on immutable vectors.
foldr :: (a -> b -> b) -> b -> Vector a -> b
-- | foldM on immutable vectors.
foldM :: Monad m => (a -> b -> m a) -> a -> Vector b -> m a
-- | filter on immutable vectors.
filter :: (a -> Bool) -> Vector a -> Vector a
-- | length on immutable vectors.
length :: Vector a -> Int
-- | Default initial size of a mutable vector for structure contents.
defaultSize :: Num a => a
-- | Default initial size of a mutable vector for residue contents.
residueVectorSize :: Num a => a
-- | Default initial size of a mutable vector for chain contents.
chainVectorSize :: Num a => a
-- | Conversion of an immutable vector to list.
toList :: Vector a -> [a]
-- | map on immutable vectors.
vimap :: (Int -> a -> b) -> Vector a -> Vector b
-- | Indexing of an immutable vector.
(!) :: Vector a -> Int -> a
instance NFData (TempList m a)
-- | Module with enumeration of beta-strand senses.
module Bio.PDB.EventParser.StrandSense
-- | Enumeration of beta-strand sense.
data StrandSenseT
Parallel :: StrandSenseT
Antiparallel :: StrandSenseT
instance Eq StrandSenseT
instance Ord StrandSenseT
instance Show StrandSenseT
instance Read StrandSenseT
-- | Module contains enumeration of helix types, and auxiliary functions
-- for converting these into numeric PDB CLASS code.
module Bio.PDB.EventParser.HelixTypes
-- | Enumeration of helix types
--
-- PDB Class number in columns 39-40 for each type of helix in HELIX
-- record:
--
--
-- - Right-handed alpha (default)
-- - Right-handed omega
-- - Right-handed pi
-- - Right-handed gamma
-- - Right-handed 3 - 10
-- - Left-handed alpha
-- - Left-handed omega
-- - Left-handed gamma
-- - 2 - 7 ribbon/helix
-- - Polyproline
--
data HelixT
-- | helix2code converts a HelixT enumeration into an PDB CLASS
-- number.
helix2code :: Num a => HelixT -> a
-- | helix2code converts an PDB CLASS number into a HelixT
-- enumeration.
code2helix :: (Eq a, Num a) => a -> HelixT
instance Eq HelixT
instance Ord HelixT
instance Show HelixT
instance Read HelixT
-- | This module contains an enumeration of experimental methods.
module Bio.PDB.EventParser.ExperimentalMethods
-- | Enumeration of experimental methods occuring in the PDB archive.
data ExpMethod
XRayDiffraction :: ExpMethod
FiberDiffraction :: ExpMethod
NeutronDiffraction :: ExpMethod
ElectronCrystallography :: ExpMethod
ElectronMicroscopy :: ExpMethod
SolidStateNMR :: ExpMethod
SolutionNMR :: ExpMethod
SolutionScattering :: ExpMethod
OtherExpMethod :: !ByteString -> ExpMethod
-- | Generates an ExpMethod from words in PDB
mkExpMethod :: [ByteString] -> ExpMethod
-- | Converts an ExpMethod back into text
showExpMethod :: ExpMethod -> ByteString
instance Show ExpMethod
instance Read ExpMethod
instance Eq ExpMethod
instance Ord ExpMethod
-- | This module contains datatype declaration for PDB parsing events
-- generated by PDBEventParser module.
module Bio.PDB.EventParser.PDBEvents
-- | We use only strict ByteString as strings in PDB parser.
type String = ByteString
data Vector3 :: *
Vector3 :: {-# UNPACK #-} !Scalar -> {-# UNPACK #-} !Scalar -> {-# UNPACK #-} !Scalar -> Vector3
v3x :: Vector3 -> {-# UNPACK #-} !Scalar
v3y :: Vector3 -> {-# UNPACK #-} !Scalar
v3z :: Vector3 -> {-# UNPACK #-} !Scalar
-- | Atom id: atom name, residue name, chain, residue id, residue insertion
-- code
newtype ATID
ATID :: (String, String, Char, Int, Char) -> ATID
-- | Residue id: residue name, chain, residue id, residue insertion code
newtype RESID
RESID :: (String, Char, Int, Char) -> RESID
-- | Datatype for event-based PDB parser
data PDBEvent
ATOM :: !Int -> !String -> !String -> !Char -> !Int -> !Char -> !Char -> !Vector3 -> !Double -> !Double -> !String -> !String -> !String -> !Bool -> PDBEvent
no :: PDBEvent -> !Int
atomtype :: PDBEvent -> !String
restype :: PDBEvent -> !String
chain :: PDBEvent -> !Char
resid :: PDBEvent -> !Int
resins :: PDBEvent -> !Char
altloc :: PDBEvent -> !Char
coords :: PDBEvent -> !Vector3
occupancy :: PDBEvent -> !Double
bfactor :: PDBEvent -> !Double
segid :: PDBEvent -> !String
elt :: PDBEvent -> !String
charge :: PDBEvent -> !String
hetatm :: PDBEvent -> !Bool
SIGATM :: !Int -> !String -> !String -> !Char -> !Int -> !Char -> !Char -> !Vector3 -> !Double -> !Double -> !String -> !String -> !String -> PDBEvent
no :: PDBEvent -> !Int
atomtype :: PDBEvent -> !String
restype :: PDBEvent -> !String
chain :: PDBEvent -> !Char
resid :: PDBEvent -> !Int
resins :: PDBEvent -> !Char
altloc :: PDBEvent -> !Char
coords :: PDBEvent -> !Vector3
occupancy :: PDBEvent -> !Double
bfactor :: PDBEvent -> !Double
segid :: PDBEvent -> !String
elt :: PDBEvent -> !String
charge :: PDBEvent -> !String
ANISOU :: !Int -> !String -> !String -> !Char -> !Int -> !Char -> !Char -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !String -> !String -> !String -> PDBEvent
no :: PDBEvent -> !Int
atomtype :: PDBEvent -> !String
restype :: PDBEvent -> !String
chain :: PDBEvent -> !Char
resid :: PDBEvent -> !Int
resins :: PDBEvent -> !Char
altloc :: PDBEvent -> !Char
u_1_1 :: PDBEvent -> !Int
u_2_2 :: PDBEvent -> !Int
u_3_3 :: PDBEvent -> !Int
u_1_2 :: PDBEvent -> !Int
u_1_3 :: PDBEvent -> !Int
u_2_3 :: PDBEvent -> !Int
segid :: PDBEvent -> !String
elt :: PDBEvent -> !String
charge :: PDBEvent -> !String
SIGUIJ :: !Int -> !String -> !String -> !Char -> !Int -> !Char -> !Char -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !String -> !String -> !String -> PDBEvent
no :: PDBEvent -> !Int
atomtype :: PDBEvent -> !String
restype :: PDBEvent -> !String
chain :: PDBEvent -> !Char
resid :: PDBEvent -> !Int
resins :: PDBEvent -> !Char
altloc :: PDBEvent -> !Char
u_1_1 :: PDBEvent -> !Int
u_2_2 :: PDBEvent -> !Int
u_3_3 :: PDBEvent -> !Int
u_1_2 :: PDBEvent -> !Int
u_1_3 :: PDBEvent -> !Int
u_2_3 :: PDBEvent -> !Int
segid :: PDBEvent -> !String
elt :: PDBEvent -> !String
charge :: PDBEvent -> !String
SEQRES :: !Int -> !Char -> !Int -> ![String] -> PDBEvent
serial :: PDBEvent -> !Int
chain :: PDBEvent -> !Char
num :: PDBEvent -> !Int
resList :: PDBEvent -> ![String]
HEADER :: !String -> !String -> !String -> PDBEvent
classification :: PDBEvent -> !String
depDate :: PDBEvent -> !String
idCode :: PDBEvent -> !String
TITLE :: !Int -> !String -> PDBEvent
continuation :: PDBEvent -> !Int
title :: PDBEvent -> !String
KEYWDS :: !Int -> ![String] -> PDBEvent
continuation :: PDBEvent -> !Int
aList :: PDBEvent -> ![String]
AUTHOR :: !Int -> ![String] -> PDBEvent
continuation :: PDBEvent -> !Int
aList :: PDBEvent -> ![String]
REMARK :: !Int -> ![String] -> PDBEvent
num :: PDBEvent -> !Int
text :: PDBEvent -> ![String]
EXPDTA :: !Int -> ![ExpMethod] -> PDBEvent
continuation :: PDBEvent -> !Int
expMethods :: PDBEvent -> ![ExpMethod]
MDLTYP :: !Int -> ![String] -> PDBEvent
continuation :: PDBEvent -> !Int
aList :: PDBEvent -> ![String]
NUMMDL :: !Int -> PDBEvent
num :: PDBEvent -> !Int
MODEL :: !Int -> PDBEvent
num :: PDBEvent -> !Int
CONECT :: ![Int] -> PDBEvent
atoms :: PDBEvent -> ![Int]
CAVEAT :: !Int -> !String -> !String -> PDBEvent
cont :: PDBEvent -> !Int
pdbid :: PDBEvent -> !String
comment :: PDBEvent -> !String
DBREF :: !String -> !Char -> !Int -> !Char -> !Int -> !Char -> !String -> !String -> !String -> !Int -> !Char -> !Int -> !Char -> PDBEvent
idCode :: PDBEvent -> !String
chain :: PDBEvent -> !Char
iniSeqNumPDB :: PDBEvent -> !Int
iniInsCodePDB :: PDBEvent -> !Char
endSeqNumPDB :: PDBEvent -> !Int
endInsCodePDB :: PDBEvent -> !Char
seqDbName :: PDBEvent -> !String
seqDbAccCode :: PDBEvent -> !String
seqDbIdCode :: PDBEvent -> !String
iniSeqNumInDb :: PDBEvent -> !Int
iniInsCodeInPDBRef :: PDBEvent -> !Char
endSeqNumInDb :: PDBEvent -> !Int
endInsCodeInPDBRef :: PDBEvent -> !Char
REVDAT :: !Int -> !Int -> !String -> !String -> !Int -> ![String] -> PDBEvent
modNum :: PDBEvent -> !Int
cont :: PDBEvent -> !Int
modDat :: PDBEvent -> !String
modId :: PDBEvent -> !String
modTyp :: PDBEvent -> !Int
details :: PDBEvent -> ![String]
HETNAM :: !Int -> !String -> !String -> !Bool -> PDBEvent
cont :: PDBEvent -> !Int
hetId :: PDBEvent -> !String
name :: PDBEvent -> !String
notSynonym :: PDBEvent -> !Bool
HET :: !String -> !Char -> !Int -> !Char -> !Int -> !String -> PDBEvent
hetId :: PDBEvent -> !String
chain :: PDBEvent -> !Char
seqNum :: PDBEvent -> !Int
insCode :: PDBEvent -> !Char
atmNum :: PDBEvent -> !Int
description :: PDBEvent -> !String
FORMUL :: !Int -> !String -> !Int -> !Bool -> ![String] -> PDBEvent
compNum :: PDBEvent -> !Int
hetId :: PDBEvent -> !String
cont :: PDBEvent -> !Int
isWater :: PDBEvent -> !Bool
formula :: PDBEvent -> ![String]
CISPEP :: !Int -> !RESID -> !RESID -> !Int -> Maybe Double -> PDBEvent
serial :: PDBEvent -> !Int
res1 :: PDBEvent -> !RESID
res2 :: PDBEvent -> !RESID
modNum :: PDBEvent -> !Int
angle :: PDBEvent -> Maybe Double
HELIX :: Int -> RESID -> RESID -> HelixT -> String -> Int -> PDBEvent
serial :: PDBEvent -> Int
iniRes :: PDBEvent -> RESID
endRes :: PDBEvent -> RESID
helixClass :: PDBEvent -> HelixT
comment :: PDBEvent -> String
len :: PDBEvent -> Int
SHEET :: Int -> String -> Int -> Maybe StrandSenseT -> RESID -> RESID -> Maybe ATID -> Maybe ATID -> PDBEvent
strandId :: PDBEvent -> Int
sheetId :: PDBEvent -> String
numStrands :: PDBEvent -> Int
sense :: PDBEvent -> Maybe StrandSenseT
iniRes :: PDBEvent -> RESID
endRes :: PDBEvent -> RESID
curAt :: PDBEvent -> Maybe ATID
prevAt :: PDBEvent -> Maybe ATID
ORIGXn :: Int -> [Vector3] -> [Double] -> PDBEvent
n :: PDBEvent -> Int
o :: PDBEvent -> [Vector3]
t :: PDBEvent -> [Double]
SCALEn :: Int -> [Vector3] -> [Double] -> PDBEvent
n :: PDBEvent -> Int
o :: PDBEvent -> [Vector3]
t :: PDBEvent -> [Double]
MTRIXn :: !Int -> !Bool -> !Int -> ![Vector3] -> ![Double] -> PDBEvent
serial :: PDBEvent -> !Int
relMol :: PDBEvent -> !Bool
n :: PDBEvent -> !Int
o :: PDBEvent -> ![Vector3]
t :: PDBEvent -> ![Double]
CRYST1 :: !Double -> !Double -> !Double -> !Double -> !Double -> !Double -> !String -> !Int -> PDBEvent
a :: PDBEvent -> !Double
b :: PDBEvent -> !Double
c :: PDBEvent -> !Double
alpha :: PDBEvent -> !Double
beta :: PDBEvent -> !Double
gamma :: PDBEvent -> !Double
spcGrp :: PDBEvent -> !String
zValue :: PDBEvent -> !Int
COMPND :: !Int -> ![(String, String)] -> PDBEvent
cont :: PDBEvent -> !Int
tokens :: PDBEvent -> ![(String, String)]
SOURCE :: !Int -> ![(String, String)] -> PDBEvent
cont :: PDBEvent -> !Int
tokens :: PDBEvent -> ![(String, String)]
TER :: !Int -> !String -> !Char -> !Int -> !Char -> PDBEvent
num :: PDBEvent -> !Int
resname :: PDBEvent -> !String
chain :: PDBEvent -> !Char
resid :: PDBEvent -> !Int
insCode :: PDBEvent -> !Char
MASTER :: !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> !Int -> PDBEvent
numRemark :: PDBEvent -> !Int
numHet :: PDBEvent -> !Int
numHelix :: PDBEvent -> !Int
numSheet :: PDBEvent -> !Int
numTurn :: PDBEvent -> !Int
numSite :: PDBEvent -> !Int
numXform :: PDBEvent -> !Int
numAts :: PDBEvent -> !Int
numMaster :: PDBEvent -> !Int
numConect :: PDBEvent -> !Int
numSeqres :: PDBEvent -> !Int
END :: PDBEvent
ENDMDL :: PDBEvent
SITE :: !Int -> !String -> !Int -> ![RESID] -> PDBEvent
serial :: PDBEvent -> !Int
siteid :: PDBEvent -> !String
numres :: PDBEvent -> !Int
residues :: PDBEvent -> ![RESID]
OBSLTE :: !Int -> !String -> !String -> ![String] -> PDBEvent
cont :: PDBEvent -> !Int
date :: PDBEvent -> !String
this :: PDBEvent -> !String
entries :: PDBEvent -> ![String]
SPRSDE :: !Int -> !String -> !String -> ![String] -> PDBEvent
cont :: PDBEvent -> !Int
date :: PDBEvent -> !String
this :: PDBEvent -> !String
entries :: PDBEvent -> ![String]
SPLIT :: !Int -> ![String] -> PDBEvent
cont :: PDBEvent -> !Int
codes :: PDBEvent -> ![String]
SSBOND :: !Int -> RESID -> RESID -> !String -> !String -> !Double -> PDBEvent
serial :: PDBEvent -> !Int
res1 :: PDBEvent -> RESID
res2 :: PDBEvent -> RESID
symOp1 :: PDBEvent -> !String
symOp2 :: PDBEvent -> !String
bondLen :: PDBEvent -> !Double
LINK :: !ATID -> !Char -> !ATID -> !Char -> !String -> !String -> Maybe Double -> PDBEvent
at1 :: PDBEvent -> !ATID
altloc1 :: PDBEvent -> !Char
at2 :: PDBEvent -> !ATID
altloc2 :: PDBEvent -> !Char
symop1 :: PDBEvent -> !String
symop2 :: PDBEvent -> !String
linkdist :: PDBEvent -> Maybe Double
SLTBRG :: !ATID -> !Char -> !ATID -> !Char -> !String -> !String -> PDBEvent
at1 :: PDBEvent -> !ATID
altloc1 :: PDBEvent -> !Char
at2 :: PDBEvent -> !ATID
altloc2 :: PDBEvent -> !Char
symOp1 :: PDBEvent -> !String
symOp2 :: PDBEvent -> !String
HYDBND :: !ATID -> !Char -> !ATID -> !Char -> !ATID -> !Char -> !String -> !String -> PDBEvent
at1 :: PDBEvent -> !ATID
altloc1 :: PDBEvent -> !Char
atH :: PDBEvent -> !ATID
altlocH :: PDBEvent -> !Char
at2 :: PDBEvent -> !ATID
altloc2 :: PDBEvent -> !Char
symOp1 :: PDBEvent -> !String
symOp2 :: PDBEvent -> !String
TVECT :: !Int -> Vector3 -> PDBEvent
serial :: PDBEvent -> !Int
vec :: PDBEvent -> Vector3
JRNL :: !Int -> ![(String, String)] -> !Bool -> PDBEvent
cont :: PDBEvent -> !Int
content :: PDBEvent -> ![(String, String)]
isFirst :: PDBEvent -> !Bool
MODRES :: !String -> !RESID -> !String -> !String -> PDBEvent
pdbCode :: PDBEvent -> !String
residue :: PDBEvent -> !RESID
stdRes :: PDBEvent -> !String
comment :: PDBEvent -> !String
SEQADV :: !String -> Maybe RESID -> !String -> !String -> !String -> Maybe Int -> !String -> PDBEvent
pdbId :: PDBEvent -> !String
advResidue :: PDBEvent -> Maybe RESID
database :: PDBEvent -> !String
accessionCode :: PDBEvent -> !String
dbResname :: PDBEvent -> !String
dbSeqNum :: PDBEvent -> Maybe Int
comment :: PDBEvent -> !String
PDBParseError :: !Int -> !Int -> !String -> PDBEvent
PDBIgnoredLine :: ByteString -> PDBEvent
-- | Enumeration of beta-strand sense.
data StrandSenseT
Parallel :: StrandSenseT
Antiparallel :: StrandSenseT
-- | Enumeration of helix types
--
-- PDB Class number in columns 39-40 for each type of helix in HELIX
-- record:
--
--
-- - Right-handed alpha (default)
-- - Right-handed omega
-- - Right-handed pi
-- - Right-handed gamma
-- - Right-handed 3 - 10
-- - Left-handed alpha
-- - Left-handed omega
-- - Left-handed gamma
-- - 2 - 7 ribbon/helix
-- - Polyproline
--
data HelixT
-- | Enumeration of experimental methods occuring in the PDB archive.
data ExpMethod
XRayDiffraction :: ExpMethod
FiberDiffraction :: ExpMethod
NeutronDiffraction :: ExpMethod
ElectronCrystallography :: ExpMethod
ElectronMicroscopy :: ExpMethod
SolidStateNMR :: ExpMethod
SolutionNMR :: ExpMethod
SolutionScattering :: ExpMethod
OtherExpMethod :: !ByteString -> ExpMethod
instance Show ATID
instance Ord ATID
instance Eq ATID
instance Show RESID
instance Ord RESID
instance Eq RESID
instance Show PDBEvent
instance Eq PDBEvent
module Bio.PDB.EventParser.PDBEventParser
-- | Parses a strict ByteString contents named fname and
-- performs action on events given by parsing chunks, returning
-- accumulated results. Accumulator is primed by acc.
parsePDBRecords :: Monad m => t -> ByteString -> (b -> PDBEvent -> m b) -> b -> m b
module Bio.PDB.Structure
-- | We use only strict ByteString as strings in PDB parser.
type String = ByteString
-- | Computes a dot product of two 3D vectors.
vdot :: Vec3D -> Vec3D -> Double
-- | 2-norm of a vector (also called a magnitude or length.)
vnorm :: Vec3D -> Double
-- | Finds a vector component of the first vector that is a projection onto
-- direction of second vector.
vproj :: Vector3 -> Vector3 -> Vec3D
-- | Returns a component of the vector v that is perpendicular to w.
vperpend :: Vec3D -> Vector3 -> Vec3D
-- | Finds a component of the vector v that is perpendicular to all vectors
-- in a list.
vperpends :: Vec3D -> [Vector3] -> Vec3D
-- | Compute dihedral between three bond vectors using spherical angle
-- formula.
vdihedral :: Vec3D -> Vec3D -> Vec3D -> Double
-- | Scalar product. (* indicates side on which one can put a
-- scalar.)
(*|) :: Double -> Vec3D -> Vec3D
-- | Scalar product. (* indicates side on which one can put a
-- scalar.)
(|*) :: Vec3D -> Double -> Vec3D
-- | Structure holds all data parsed from a single PDB entry
data Structure
Structure :: List Model -> Structure
models :: Structure -> List Model
-- | PDB entry may contain multiple models, with slight differences in
-- coordinates etc.
data Model
Model :: !Int -> List Chain -> Model
modelId :: Model -> !Int
chains :: Model -> List Chain
-- | Single linear polymer chain of protein, or nucleic acids
data Chain
Chain :: !Char -> List Residue -> Chain
chainId :: Chain -> !Char
residues :: Chain -> List Residue
-- | Residue groups all atoms assigned to the same aminoacid or nucleic
-- acid base within a polymer chain.
data Residue
Residue :: !String -> !Int -> List Atom -> !Char -> Residue
resName :: Residue -> !String
resSeq :: Residue -> !Int
atoms :: Residue -> List Atom
insCode :: Residue -> !Char
-- | Single atom position | NOTE: disordered atoms are now reported as
-- multiplicates
data Atom
Atom :: !String -> !Int -> !Vector3 -> !Double -> !Double -> !String -> !String -> !String -> !Bool -> Atom
atName :: Atom -> !String
atSerial :: Atom -> !Int
coord :: Atom -> !Vector3
bFactor :: Atom -> !Double
occupancy :: Atom -> !Double
element :: Atom -> !String
segid :: Atom -> !String
charge :: Atom -> !String
hetatm :: Atom -> !Bool
instance Eq Atom
instance Show Atom
instance Eq Residue
instance Show Residue
instance Eq Chain
instance Show Chain
instance Eq Model
instance Show Model
instance Eq Structure
instance Show Structure
instance NFData Atom
instance NFData Residue
instance NFData Chain
instance NFData Model
instance NFData Structure
module Bio.PDB.Iterable
class Iterable a b where imap f e = runIdentity $ imapM (\ b -> return $ f b) e
imapM :: (Iterable a b, Monad m) => (b -> m b) -> a -> m a
imap :: Iterable a b => (b -> b) -> a -> a
ifoldM :: (Iterable a b, Monad m) => (c -> b -> m c) -> c -> a -> m c
ifoldr :: Iterable a b => (b -> c -> c) -> c -> a -> c
ifoldl :: Iterable a b => (c -> b -> c) -> c -> a -> c
ifoldl' :: Iterable a b => (c -> b -> c) -> c -> a -> c
ilength :: Iterable a b => b -> a -> Int
instance [overlap ok] Iterable Chain Atom
instance [overlap ok] Iterable Model Atom
instance [overlap ok] Iterable Model Residue
instance [overlap ok] Iterable Structure Atom
instance [overlap ok] Iterable Structure Residue
instance [overlap ok] Iterable Structure Chain
instance [overlap ok] Iterable Atom Atom
instance [overlap ok] Iterable Residue Residue
instance [overlap ok] Iterable Chain Chain
instance [overlap ok] Iterable Model Model
instance [overlap ok] Iterable Structure Structure
instance [overlap ok] Iterable Residue Atom
instance [overlap ok] Iterable Chain Residue
instance [overlap ok] Iterable Model Chain
instance [overlap ok] Iterable Structure Model
module Bio.PDB.Fasta
-- | Dictionary mapping three-letter PDB residue code to a single-letter
-- FASTA code.
resname2fastacode :: String -> Char
-- | Dictionary mapping single-letter FASTA standard aminoacid code to a
-- PDB residue name
fastacode2resname :: Char -> String
-- | Three-letter PDB code for an unknown type of residue.
defaultResname :: String
-- | One-letter aminoacid code for an unknown type of residue.
defaultFastaCode :: Char
-- | Converts an Iterable yielding Residues into a list of
-- aminoacid one-character codes.
fastaSequence :: Iterable a Residue => a -> [Char]
-- | Converts an Iterable yielding Residues into a list of
-- aminoacid one-character codes.
fastaGappedSequence :: Iterable a Residue => a -> [Char]
fastaRecord :: [Char] -> Chain -> [Char]
fastaGappedRecord :: [Char] -> Chain -> [Char]
module Bio.PDB.Structure.Elements
-- | Basic elemental parameters as suggested by CSD.
--
-- TODO: May be better as a newtype, and make sure that other modules use
-- this declaration
type Element = ByteString
assignElement :: Atom -> Element
guessElement :: ByteString -> Element
-- | Atomic number of a given element
atomicNumber :: Element -> Int
-- | Atomic mass of a given element in g/mol
atomicMass :: Element -> Double
covalentRadius :: (Eq a1, Fractional a, Show a1, IsString a1) => a1 -> a
-- | Van der Waals radius of the given element
vanDerWaalsRadius :: Element -> Double
module Bio.PDB.StructureBuilder
-- | Given filename, and contents, parses a whole PDB file, returning a
-- monadic action | with a tuple of (Structure, [PDBEvent]), where the
-- list of events contains all | parsing or construction errors.
parse :: ByteString -> ByteString -> (Structure, List PDBEvent)
module Bio.PDB.EventParser.PDBEventPrinter
-- | Prints a PDBEvent to a filehandle.
print :: Handle -> PDBEvent -> IO ()
-- | Reports whether a given PDB record is already printable [temporary
-- method, they all should be.] Including errors.
isPrintable :: PDBEvent -> Bool
module Bio.PDB.StructurePrinter
-- | Writes a structure in a PDB format to a filehandle.
write :: Handle -> Structure -> IO ()
module Bio.PDB.IO
parse :: String -> IO (Maybe Structure)
-- | Write structure to a .pdb file. (NOT YET IMPLEMENTED)
write :: Structure -> String -> IO ()
module Bio.PDB
parse :: String -> IO (Maybe Structure)
-- | Write structure to a .pdb file. (NOT YET IMPLEMENTED)
write :: Structure -> String -> IO ()
-- | Structure holds all data parsed from a single PDB entry
data Structure
Structure :: List Model -> Structure
models :: Structure -> List Model
-- | PDB entry may contain multiple models, with slight differences in
-- coordinates etc.
data Model
Model :: !Int -> List Chain -> Model
modelId :: Model -> !Int
chains :: Model -> List Chain
-- | Single linear polymer chain of protein, or nucleic acids
data Chain
Chain :: !Char -> List Residue -> Chain
chainId :: Chain -> !Char
residues :: Chain -> List Residue
-- | Residue groups all atoms assigned to the same aminoacid or nucleic
-- acid base within a polymer chain.
data Residue
Residue :: !String -> !Int -> List Atom -> !Char -> Residue
resName :: Residue -> !String
resSeq :: Residue -> !Int
atoms :: Residue -> List Atom
insCode :: Residue -> !Char
-- | Single atom position | NOTE: disordered atoms are now reported as
-- multiplicates
data Atom
Atom :: !String -> !Int -> !Vector3 -> !Double -> !Double -> !String -> !String -> !String -> !Bool -> Atom
atName :: Atom -> !String
atSerial :: Atom -> !Int
coord :: Atom -> !Vector3
bFactor :: Atom -> !Double
occupancy :: Atom -> !Double
element :: Atom -> !String
segid :: Atom -> !String
charge :: Atom -> !String
hetatm :: Atom -> !Bool
class Iterable a b where imap f e = runIdentity $ imapM (\ b -> return $ f b) e
imapM :: (Iterable a b, Monad m) => (b -> m b) -> a -> m a
imap :: Iterable a b => (b -> b) -> a -> a
ifoldM :: (Iterable a b, Monad m) => (c -> b -> m c) -> c -> a -> m c
ifoldr :: Iterable a b => (b -> c -> c) -> c -> a -> c
ifoldl :: Iterable a b => (c -> b -> c) -> c -> a -> c
ifoldl' :: Iterable a b => (c -> b -> c) -> c -> a -> c
ilength :: Iterable a b => b -> a -> Int
numAtoms :: Iterable a Atom => a -> Int
numResidues :: Iterable a Residue => a -> Int
numChains :: Iterable a Chain => a -> Int
numModels :: Iterable a Model => a -> Int
firstModel :: Iterable a Model => a -> Maybe Model
-- | Dictionary mapping three-letter PDB residue code to a single-letter
-- FASTA code.
resname2fastacode :: String -> Char
-- | Dictionary mapping single-letter FASTA standard aminoacid code to a
-- PDB residue name
fastacode2resname :: Char -> String
-- | Scalar product. (* indicates side on which one can put a
-- scalar.)
(*|) :: Double -> Vec3D -> Vec3D
-- | Scalar product. (* indicates side on which one can put a
-- scalar.)
(|*) :: Vec3D -> Double -> Vec3D
-- | 2-norm of a vector (also called a magnitude or length.)
vnorm :: Vec3D -> Double
-- | Basic elemental parameters as suggested by CSD.
--
-- TODO: May be better as a newtype, and make sure that other modules use
-- this declaration
type Element = ByteString
assignElement :: Atom -> Element
-- | Atomic number of a given element
atomicNumber :: Element -> Int
-- | Atomic mass of a given element in g/mol
atomicMass :: Element -> Double
covalentRadius :: (Eq a1, Fractional a, Show a1, IsString a1) => a1 -> a
-- | Van der Waals radius of the given element
vanDerWaalsRadius :: Element -> Double