def __init__(self, pdbfile): """ Wrapper class for Bio.PDB which makes it convenient to read phi/psi/omega/chi torsion angles from a PDB-file. Arguments: pdbfile -- The PDB file you wish to read. """ try: self._parser = PDBParser(QUIET=True) except: # Workaround for missing QUIET keyword # in certain versions of Biopython. self._parser = PDBParser() self._pdbfile = pdbfile self._structure = self._parser.get_structure("pdb", self._pdbfile) self._chain = self._get_first_chain(self._structure) self._sequence = self._get_sequence_from_chain(self._chain)