Protein structure manipulation — pbxplore.structure — PBxplore 1.1 documentation

# 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

`pbxplore.structure.` `chains_from_files`(path_list)

`pbxplore.structure.` `chains_from_trajectory`(trajectory, topology)

## Objects

class `pbxplore.structure.structure.` `Chain`

  Class to handle PDB chain

  `get_phi_psi_angles`()

    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

    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}}

class `pbxplore.structure.structure.` `Atom`(ident=0, name=None, resname=None, chain=None, resid=0, x=0.0, y=0.0, z=0.0, model=None)

  Class for atoms in PDB or PDBx/mmCIF format.

class `pbxplore.structure.PDB.` `PDB`(name)

  Class to read PDB files.

## Exceptions

exception `pbxplore.structure.structure.` `ChainError`

  Exeption class for the Chain class

exception `pbxplore.structure.structure.` `AtomError`

  Exeption class for the Atom class.