packages feed

hPDB 1.2.0.3 → 1.2.0.4

raw patch · 13 files changed

+97/−68 lines, 13 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Bio/PDB.hs view
@@ -1,3 +1,5 @@+-- | Default interface for @Bio.PDB@ package.+-- Ideally should expose all commonly used functions and classes. module Bio.PDB(parse, write, PDBWritable,                Structure(..), Model(..), Chain(..), Residue(..), Atom(..),                Iterable(..),
Bio/PDB/EventParser/PDBEvents.hs view
@@ -39,19 +39,19 @@                        hetatm    :: !Bool                      }                                  |                 SIGATM { no        :: !Int,-			 atomtype  :: !String,-			 restype   :: !String,-			 chain     :: !Char,-			 resid     :: !Int,-			 resins    :: !Char,-			 altloc    :: !Char,-			 coords    :: !Vector3,-			 occupancy :: !Double,-			 bfactor   :: !Double,-			 segid     :: !String,-			 elt       :: !String,-			 charge    :: !String -- why not a number?-		       }                                  |+                         atomtype  :: !String,+                         restype   :: !String,+                         chain     :: !Char,+                         resid     :: !Int,+                         resins    :: !Char,+                         altloc    :: !Char,+                         coords    :: !Vector3,+                         occupancy :: !Double,+                         bfactor   :: !Double,+                         segid     :: !String,+                         elt       :: !String,+                         charge    :: !String -- why not a number?+                       }                                  |                  ANISOU { no        :: !Int,                           atomtype  :: !String,                           restype   :: !String,
Bio/PDB/EventParser/PDBParsingAbstractions.hs view
@@ -395,14 +395,14 @@     Left       (col,        BS.concat-	 [fname, " residue descriptions contains fields: ",-	  BS.pack $ show [r, c, d, i]])+         [fname, " residue descriptions contains fields: ",+          BS.pack $ show [r, c, d, i]])   | otherwise = Right Nothing   where obligatoryFields = if delible then [c, i] else [c, d, i]-	IFStr unr = r-	IFChar unc = c-	IFInt und = d-	IFChar uni = i+        IFStr unr = r+        IFChar unc = c+        IFInt und = d+        IFChar uni = i  {-# INLINE fgAtom #-} -- | Merges a set of values that correspond to a mandatory atom description.@@ -460,14 +460,14 @@     Left       (col,        BS.concat-	 [fname, " atom descriptions contains fields: ",-	  BS.pack $ show [a, r, c, d, i]])+         [fname, " atom descriptions contains fields: ",+          BS.pack $ show [a, r, c, d, i]])   | otherwise = Right Nothing   where IFStr una = a-	IFStr unr = r-	IFChar unc = c-	IFInt und = d-	IFChar uni = i+        IFStr unr = r+        IFChar unc = c+        IFInt und = d+        IFChar uni = i  -- Stage 3 is generation of events - code is separated for each kind of event. 
Bio/PDB/EventParser/ParseLINK.hs view
@@ -35,26 +35,26 @@  {-# INLINE linkFields #-} linkFields = [(6,  mKeyword "record header"     "LINK  "            ),-	      (12, mSpc     6                                       ),-	      (16, mStr     "atom name"                             ),-	      (17, mChr     "alternate location indicator 1"        ),-	      (20, mStr     "residue name 1"                        ),-	      (21, mSpc     1                                       ),-	      (22, mChr     "chain id 1"                            ),-	      (26, mInt     "residue sequence number 1"             ),-	      (27, mChr     "insertion code 1"                      ),-	      (42, mSpc     15                                      ),-	      (46, mStr     "atom name 1"                           ),-	      (47, mChr     "alternate location indicator 2"        ),-	      (50, mStr     "residue name 2"                        ),-	      (51, mSpc     1                                       ),-	      (52, mChr     "chain id 2"                            ),-	      (56, mInt     "residue sequence number 2"             ),-	      (57, mChr     "insertion code 2"                      ),-	      (59, mSpc     2                                       ),-	      (65, mStr     "symmetry operator for atom 1"          ),-	      (66, mSpc     1                                       ),-	      (72, mStr     "symmetry operator for atom 2"          ),+              (12, mSpc     6                                       ),+              (16, mStr     "atom name"                             ),+              (17, mChr     "alternate location indicator 1"        ),+              (20, mStr     "residue name 1"                        ),+              (21, mSpc     1                                       ),+              (22, mChr     "chain id 1"                            ),+              (26, mInt     "residue sequence number 1"             ),+              (27, mChr     "insertion code 1"                      ),+              (42, mSpc     15                                      ),+              (46, mStr     "atom name 1"                           ),+              (47, mChr     "alternate location indicator 2"        ),+              (50, mStr     "residue name 2"                        ),+              (51, mSpc     1                                       ),+              (52, mChr     "chain id 2"                            ),+              (56, mInt     "residue sequence number 2"             ),+              (57, mChr     "insertion code 2"                      ),+              (59, mSpc     2                                       ),+              (65, mStr     "symmetry operator for atom 1"          ),+              (66, mSpc     1                                       ),+              (72, mStr     "symmetry operator for atom 2"          ),               (73, mSpc     1                                       ),               (78, pDouble   "link distance"                         )] 
Bio/PDB/Fasta.hs view
@@ -1,4 +1,6 @@-{-# LANGUAGE OverloadedStrings, FlexibleContexts #-}+{-# LANGUAGE OverloadedStrings     #-}+{-# LANGUAGE FlexibleContexts      #-}+{-# LANGUAGE MultiParamTypeClasses #-} -- | Conversion of PDB residue codes to FASTA single-letter sequence codes. module Bio.PDB.Fasta(resname2fastacode, fastacode2resname  ,                      defaultResname,    defaultFastaCode   ,
Bio/PDB/Structure.hs view
@@ -1,4 +1,6 @@-{-# LANGUAGE DisambiguateRecordFields, DeriveGeneric #-}+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE DeriveGeneric #-}+-- | Module defines all components of high-level data type description of PDB model. module Bio.PDB.Structure(String,                          vdot, vnorm, vproj, vperpend, vperpends, vdihedral, (*|), (|*),                          Structure(..), Model(..), Chain(..), Residue(..), Atom(..))
Bio/PDB/Structure/Elements.hs view
@@ -253,7 +253,10 @@ covalentRadius    "ZR" = 1.75 covalentRadius    x    = defaulting ["Unknown covalent radius for element:", BS.pack $ show x] 0.0 -maxCovalentRadius = covalentRadius "FR"+{-# INLINE maxCovalentRadius #-}+-- | Upper bound of @covalentRadius@.+maxCovalentRadius :: Double+maxCovalentRadius  = covalentRadius "FR"  {-# INLINE atomicMass        #-} -- | Atomic mass of a given element in g/mol@@ -485,7 +488,10 @@ vanDerWaalsRadius "ZR" = 2.00 vanDerWaalsRadius e    = defaulting ["Do not know van der Waals radius of", BS.pack $ show e] 0.0 -maxVanDerWaalsRadius = vanDerWaalsRadius "K"+{-# INLINE maxVanDerWaalsRadius #-}+-- | Upper bound of @vanDerWaalsRadius@.+maxVanDerWaalsRadius :: Double+maxVanDerWaalsRadius  = vanDerWaalsRadius "K"  {-# INLINE assignElement #-} -- | Given a PDB 'Atom' extract or guess its 'Element' name.
Bio/PDB/Structure/Neighbours.hs view
@@ -1,4 +1,6 @@-{-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts #-}+{-# LANGUAGE NoMonomorphismRestriction #-}+{-# LANGUAGE FlexibleContexts          #-}+{-# LANGUAGE MultiParamTypeClasses     #-} -- | Searching for neighbouring atoms in a 3D space using `Octree`. module Bio.PDB.Structure.Neighbours(makeOctree,                                     findInRadius, findNearest,
Bio/PDB/StructureBuilder/Internals.hs view
@@ -1,23 +1,31 @@-{-# LANGUAGE BangPatterns, DisambiguateRecordFields, MultiParamTypeClasses, NamedFieldPuns, FlexibleContexts, OverloadedStrings, RankNTypes #-}-{-# LANGUAGE RecordWildCards #-} -- for convenient debugging+{-# LANGUAGE BangPatterns             #-}+{-# LANGUAGE DisambiguateRecordFields #-}+{-# LANGUAGE FlexibleContexts         #-}+{-# LANGUAGE MultiParamTypeClasses    #-}+{-# LANGUAGE NamedFieldPuns           #-}+{-# LANGUAGE OverloadedStrings        #-}+{-# LANGUAGE RankNTypes               #-}+{-# LANGUAGE RecordWildCards          #-} -- for convenient debugging {-# OPTIONS_GHC -fspec-constr-count=2 #-}+-- | This module allows access to internal interface of @StructureBuilder@ in case that user wants to extend it+-- by redefining parts. module Bio.PDB.StructureBuilder.Internals --(parse)  where -import Prelude hiding (String)-import qualified Data.ByteString.Char8 as BS hiding (reverse)-import qualified Control.Monad.ST      as ST-import Control.Monad.State.Strict      as State -import Control.Monad(when)-import Data.STRef                      as STRef-import Data.Maybe(isNothing, isJust)+import           Prelude                               hiding (String)+import qualified Data.ByteString.Char8           as BS hiding (reverse)+import qualified Control.Monad.ST                as ST+import           Control.Monad.State.Strict      as State +import           Control.Monad(when)+import           Data.STRef                      as STRef+import           Data.Maybe(isNothing, isJust) -import Bio.PDB.EventParser.PDBEvents(PDBEvent(..), RESID(..))+import           Bio.PDB.EventParser.PDBEvents(PDBEvent(..), RESID(..)) import qualified Bio.PDB.EventParser.PDBEventParser(parsePDBRecords)-import Bio.PDB.Structure-import Bio.PDB.Structure.List as L+import           Bio.PDB.Structure+import           Bio.PDB.Structure.List          as L  -- | Shorthand for the State monad in which parsing is done. -- `t` is existential 'phantom' type to keep ST effects from escaping@@ -122,7 +130,6 @@ checkModel :: ParsingMonad t () checkModel = do curModel <- State.gets currentModel                 when (isNothing curModel) $ openModel defaultModelId--- | Closes construction of a current residue and appends this residue to a current chain. (Monadic action.) --closeResidue :: State.State BState () -- TODO: when createing a dummy model, check that there are no models declared before --       [Otherwise one needs to report an error!]@@ -130,6 +137,7 @@ -- | Default model id, in case none was indicated (for comparison.) defaultModelId = 1 +-- | Closes construction of a current residue and appends this residue to a current chain. (Monadic action.) closeResidue :: ParsingMonad t () closeResidue = do r <- State.gets currentResidue                   when (isJust r) $ do let Just res = r@@ -194,7 +202,6 @@  -- | Finalizes construction of record holding PDB entry data. -- NOTE: this one is different and should only be used after parsing is complete!- closeStructure :: ParsingMonad t () closeStructure = do closeModel                     sc  <- State.gets structureContents@@ -205,6 +212,7 @@       bstate { currentStructure  = aStructure { models = sc },                structureContents = undefined } +-- | Updates line counter. nextLine :: ParsingMonad t () nextLine = do lnref <- State.gets lineNo               lift $ STRef.modifySTRef lnref (+1)
Bio/PDB/StructureBuilder/Parallel.hs view
@@ -1,4 +1,6 @@ {-# LANGUAGE BangPatterns, PatternGuards #-}+-- | This module leverages sequential builder interface in @Bio.PDB.StructureBuilder.Internal@+-- to run parser and @StructureBuilder@ in parallel with linear speedup. module Bio.PDB.StructureBuilder.Parallel(parseParallel, parseWithNParallel, joinStructure, joinResult) where 
README.md view
@@ -4,7 +4,7 @@  [![Build Status](https://api.travis-ci.org/BioHaskell/hPDB.svg?branch=master)](https://travis-ci.org/BioHaskell/hPDB) [![Hackage](https://budueba.com/hackage/hPDB)](https://hackage.haskell.org/package/hPDB)-+[![Hackage Dependencies](https://img.shields.io/hackage-deps/v/hPDB.svg?style=flat)](http://packdeps.haskellers.com/feed?needle=hPDB)  Protein Data Bank file format is a most popular format for holding biomolecule data. 
changelog view
@@ -1,4 +1,9 @@ -*-Changelog-*-+1.2.0.4  Jun 2015+	* Cleaned, added some documentation.++1.2.0.3  Apr 2015+	* Version bump.  1.2.0.2  Apr 2015 	* Update for zlib version 0.6.1.0.
hPDB.cabal view
@@ -1,5 +1,5 @@ name:                hPDB-version:             1.2.0.3+version:             1.2.0.4 synopsis:            Protein Databank file format library homepage:            https://github.com/BioHaskell/hPDB stability:           stable@@ -26,13 +26,13 @@ license-file:        LICENSE  author:              Michal J. Gajda-copyright:           Copyright by Michal J. Gajda '2009-'2013+copyright:           Copyright by Michal J. Gajda '2009-'2015 maintainer:          mjgajda@googlemail.com bug-reports:         mailto:mjgajda@googlemail.com  build-type:          Simple cabal-version:       >=1.8-tested-with:         GHC==7.6.3, GHC==7.8.3+tested-with:         GHC==7.6.3, GHC==7.8.4, GHC==7.10.1 extra-source-files:  README.md INSTALL AUTHORS changelog  source-repository head