Protein structure manipulation — pbxplore.structure
¶
Constants¶
PDB_EXTENSIONS
- list of file extensions corresponding to PDB files
PDBx_EXTENSIONS
- list of file extensions corresponding to PDBx/mmCIF files
Functions¶
Objects¶
-
class
pbxplore.structure.structure.
Chain
[source]¶ Class to handle PDB chain
-
get_phi_psi_angles
()[source]¶ Compute phi and psi angles.
Returns: phi_psi_angles – Dict with residue number (int) as keys and a {'phi' : (float), 'psi' : (float)}
dictionnary as values.Return type: dict Raises: FloatingPointError
– If the computation of angles produces NaN. Generally, it means there is some problem with the residue coordinates.Examples
>>> lines = ("ATOM 840 C ARG B 11 22.955 23.561 -4.012 1.00 28.07 C ", ... "ATOM 849 N SER B 12 22.623 24.218 -2.883 1.00 24.77 N ", ... "ATOM 850 CA SER B 12 22.385 23.396 -1.637 1.00 21.99 C ", ... "ATOM 851 C SER B 12 21.150 24.066 -0.947 1.00 32.67 C ", ... "ATOM 855 N ILE B 13 20.421 23.341 -0.088 1.00 30.25 N ") >>> >>> import pbxplore as pbx >>> ch = pbx.structure.structure.Chain() >>> for line in lines: ... at = pbx.structure.structure.Atom() ... at.read_from_PDB(line) ... ch.add_atom(at) ... >>> print(ch.get_phi_psi_angles()) {11: {'phi': None, 'psi': None}, 12: {'phi': -139.77684605036447, 'psi': 157.94348570201197}, 13: {'phi': None, 'psi': None}}
-