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