module Bio.PDB.Iterable.Utils(firstModel,
numAtoms,
numResidues,
numChains,
numModels)
where
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 :: Atom)
numResidues :: Iterable a Residue => a -> Int
numResidues = itlength (undefined :: Residue)
numChains :: Iterable a Chain => a -> Int
numChains = itlength (undefined :: Chain)
numModels :: Iterable a Model => a -> Int
numModels = itlength (undefined :: Model)