module Bio.PDB.Iterable.Utils(firstModel,
numAtoms,
numResidues,
numChains,
numModels)
where
import Data.Proxy(Proxy)
import Bio.PDB.Structure
import Bio.PDB.Iterable.Instances
firstModel :: (Iterable a Model) => a -> Maybe Model
firstModel = itfoldr (\m _ -> Just m) Nothing
numAtoms :: Iterable a Atom => a -> Int
numAtoms = itlength (undefined :: Proxy Atom)
numResidues :: Iterable a Residue => a -> Int
numResidues = itlength (undefined :: Proxy Residue)
numChains :: Iterable a Chain => a -> Int
numChains = itlength (undefined :: Proxy Chain)
numModels :: Iterable a Model => a -> Int
numModels = itlength (undefined :: Proxy Model)