hPDB-1.2.0.9: Protein Databank file format library

Safe HaskellNone
LanguageHaskell98

Bio.PDB

Description

Default interface for Bio.PDB package. Ideally should expose all commonly used functions and classes.

Synopsis

Documentation

parse :: FilePath -> IO (Maybe Structure) Source #

Parse a .pdb file and return Structure.

write :: PDBWritable a => a -> FilePath -> IO () Source #

Write structure to a .pdb file.

class PDBWritable a Source #

Class generating events for PDB structure fragments.

Minimal complete definition

pdbEventS

Instances

data Structure Source #

Structure holds all data parsed from a single PDB entry

Constructors

Structure 

Fields

Instances

Eq Structure Source # 
Show Structure Source # 
Generic Structure Source # 

Associated Types

type Rep Structure :: * -> * #

NFData Structure Source # 

Methods

rnf :: Structure -> () #

PDBWritable Structure Source # 

Methods

pdbEvents :: Structure -> [PDBEvent]

pdbEventS :: Structure -> PDBEventS

type Rep Structure Source # 
type Rep Structure = D1 (MetaData "Structure" "Bio.PDB.Structure" "hPDB_5rQudsWmTHnE3ug0qTu0P3" False) (C1 (MetaCons "Structure" PrefixI True) (S1 (MetaSel (Just Symbol "models") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (List Model))))

data Model Source #

PDB entry may contain multiple models, with slight differences in coordinates etc.

Constructors

Model 

Fields

Instances

Eq Model Source # 

Methods

(==) :: Model -> Model -> Bool #

(/=) :: Model -> Model -> Bool #

Show Model Source # 

Methods

showsPrec :: Int -> Model -> ShowS #

show :: Model -> String #

showList :: [Model] -> ShowS #

Generic Model Source # 

Associated Types

type Rep Model :: * -> * #

Methods

from :: Model -> Rep Model x #

to :: Rep Model x -> Model #

NFData Model Source # 

Methods

rnf :: Model -> () #

PDBWritable Model Source # 

Methods

pdbEvents :: Model -> [PDBEvent]

pdbEventS :: Model -> PDBEventS

type Rep Model Source # 
type Rep Model = D1 (MetaData "Model" "Bio.PDB.Structure" "hPDB_5rQudsWmTHnE3ug0qTu0P3" False) (C1 (MetaCons "Model" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "modelId") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int)) (S1 (MetaSel (Just Symbol "chains") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (List Chain)))))

data Chain Source #

Single linear polymer chain of protein, or nucleic acids

Constructors

Chain 

Fields

Instances

Eq Chain Source # 

Methods

(==) :: Chain -> Chain -> Bool #

(/=) :: Chain -> Chain -> Bool #

Show Chain Source # 

Methods

showsPrec :: Int -> Chain -> ShowS #

show :: Chain -> String #

showList :: [Chain] -> ShowS #

Generic Chain Source # 

Associated Types

type Rep Chain :: * -> * #

Methods

from :: Chain -> Rep Chain x #

to :: Rep Chain x -> Chain #

NFData Chain Source # 

Methods

rnf :: Chain -> () #

PDBWritable Chain Source # 

Methods

pdbEvents :: Chain -> [PDBEvent]

pdbEventS :: Chain -> PDBEventS

type Rep Chain Source # 
type Rep Chain = D1 (MetaData "Chain" "Bio.PDB.Structure" "hPDB_5rQudsWmTHnE3ug0qTu0P3" False) (C1 (MetaCons "Chain" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "chainId") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Char)) (S1 (MetaSel (Just Symbol "residues") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (List Residue)))))

data Residue Source #

Residue groups all atoms assigned to the same aminoacid or nucleic acid base within a polymer chain.

Constructors

Residue 

Fields

data Atom Source #

Single atom position | NOTE: disordered atoms are now reported as multiplicates

Constructors

Atom 

Instances

Eq Atom Source # 

Methods

(==) :: Atom -> Atom -> Bool #

(/=) :: Atom -> Atom -> Bool #

Show Atom Source # 

Methods

showsPrec :: Int -> Atom -> ShowS #

show :: Atom -> String #

showList :: [Atom] -> ShowS #

Generic Atom Source # 

Associated Types

type Rep Atom :: * -> * #

Methods

from :: Atom -> Rep Atom x #

to :: Rep Atom x -> Atom #

NFData Atom Source # 

Methods

rnf :: Atom -> () #

PDBWritable Atom Source # 

Methods

pdbEvents :: Atom -> [PDBEvent]

pdbEventS :: Atom -> PDBEventS

type Rep Atom Source # 

class Iterable a b where #

Minimal complete definition

itmapM, itfoldM, itfoldr, itfoldl, itfoldl', itlength

numAtoms :: Iterable a Atom => a -> Int Source #

Number of all atoms within the structure.

numResidues :: Iterable a Residue => a -> Int Source #

Number of all residues within the structure.

numChains :: Iterable a Chain => a -> Int Source #

Number of all chains within the structure.

numModels :: Iterable a Model => a -> Int Source #

Number of all models within the structure.

firstModel :: Iterable a Model => a -> Maybe Model Source #

Takes a first model.

resname2fastacode :: ByteString -> Char Source #

Dictionary mapping three-letter PDB residue code to a single-letter FASTA code.

fastacode2resname :: Char -> ByteString Source #

Dictionary mapping single-letter FASTA standard aminoacid code to a PDB residue name

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

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

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

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

vnorm :: Vector3 -> Double Source #

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

type Element = ByteString Source #

Type alias for Element names.

assignElement :: Atom -> Element Source #

Given a PDB Atom extract or guess its Element name.

atomicNumber :: Element -> Int Source #

Atomic number of a given element

atomicMass :: Element -> Double Source #

Atomic mass of a given element in g/mol

covalentRadius :: Element -> Double Source #

Covalent radius of an element with a given name.

vanDerWaalsRadius :: Element -> Double Source #

Van der Waals radius of the given element