crystals.PDBParser
- class crystals.PDBParser(ID: str, download_dir: PathLike | None = None, overwrite: bool = False)
Collection of methods that parses Protein DataBank (PDB) files. This object should be used as a context manager.
- Parameters:
ID (str) – Protein DataBank identification. The correct .pdb file will be downloaded, cached and parsed.
download_dir (path-like object or None, optional) – Directory where to save the PDB file.
overwrite (bool, optional) – Whether or not to overwrite files in cache if they exist. If no revision number is provided, files will always be overwritten.
Methods
__delattr__(name, /)Implement delattr(self, name).
__dir__()Default dir() implementation.
__enter__()Return self upon entering the runtime context.
__eq__(value, /)Return self==value.
__exit__(*args, **kwargs)Raise any exception triggered within the runtime context.
__format__(format_spec, /)Default object formatter.
__ge__(value, /)Return self>=value.
__getattribute__(name, /)Return getattr(self, name).
__gt__(value, /)Return self>value.
__hash__()Return hash(self).
__init__(ID[, download_dir, overwrite])__init_subclass__This method is called when a class is subclassed.
__le__(value, /)Return self<=value.
__lt__(value, /)Return self<value.
__ne__(value, /)Return self!=value.
__new__(**kwargs)__reduce__()Helper for pickle.
__reduce_ex__(protocol, /)Helper for pickle.
__repr__()Return repr(self).
__setattr__(name, value, /)Implement setattr(self, name, value).
__sizeof__()Size of object in memory, in bytes.
__str__()Return str(self).
__subclasshook__(C)Abstract classes can override this to customize issubclass().
atoms()Returns a list of atoms associated with a PDB structure in fractional coordinates.
download_pdb_file(pdb_code[, download_dir, ...])Retrieves a PDB structure file from a PDB server and stores it in a local file tree.
helices([ignored])Returns an iterable of helices present in the protein.
lattice_vectors()Returns the lattice vectors associated to a PDB structure.
residues([ignored])Iterable of residues present in the structure.
secondary_structures([ignored])Iterable of all secondary structures present in this file.
sheets([ignored])Returns an iterable of sheets present in the protein.
symmetry_operators()Returns the symmetry operators that map the atomic positions in a PDB file to the crystal unit cell.
Attributes
__abstractmethods____annotations____class_getitem____slots___abc_implfilename