class OERamachandranAnalysis

This class represents an OERamachandranAnalysis, which holds information about the backbone conformation, of a protein residue, which can be used for plotting a Ramachandran plot. A Ramachandran plot, is a plot of the protein backbone \(\phi\) and \(\psi\) angles of an amino acid residue, on the x- and y-axis, respectively. The diagram was originally developed in 1963 by G. N. Ramachandran [Ramachandran-1963] to visualizes energetically accessible regions of protein conformational space. Initially, there was a single plot used for all standard amino acid residues, but recent work has been done on certain residue types that do not follow the general pattern [Lovell-2003] [Chen-2010] [Hintze-2016], specifically new diagrams have been derived for: glycine, isoleucine and valine, cis-proline, trans-proline, and for residues preceding proline residues, since their backbone conformational space is affected by the following proline residue. The data was extracted from the open-source Computational Crystallography Toolbox (CCTBX) [Grosse-Kunstleve-2002].


The function expects alternate conformations of the protein to be collapsed, meaning only a single alternate conformation should exist in the molecule object

The following is an example of determining the Ramachandran classification for each standard residue in a protein:

  1. Read in a PDB and collapse the alternate conformations (if present). See chapter How to Correctly Read a PDB File in Spruce TK.

  2. Loop over the CA atoms in the protein molecule. Alternatively, (not shown) loop over the residues in the protein.

  3. For each CA atom or residue construct the OERamachandranAnalysis

  4. Print out information about outliers for further analysis

Listing 1: Example of Ramachandran outlier analysis

    # Loop over the CA atoms in the protein
    for atom in mol.GetAtoms(oechem.OEIsCAlpha()):
        rama = oechem.OERamachandranAnalysis(atom)
        # Print out information about outliers for further analysis
        if rama.GetRamaCategory() == oechem.OERamaCategory_Outlier:
            res = oechem.OEAtomGetResidue(atom)
            print("Found: {}".format(oechem.OEGetRamachandranCategoryName(rama.GetRamaCategory())))
            print("  Residue: {} {} {}"
                  .format(res.GetName(), res.GetResidueNumber(), res.GetChainID()))
            ramatype = oechem.OEGetRamachandranTypeName(rama.GetRamaType())
            print("  Type: {}, Score: {}".format(ramatype, rama.GetRamaScore()))

See also

Example of Grapeheme TK visualization of Ramachandran plot


OERamachandranAnalysis(const OEChem::OEAtomBase* atom)

The atom based constructor accepts any atom of a given amino acid residue and returns an OERamachandranAnalysis. While any atom from a residue is acceptable, it is advised to loop over the protein atoms with a predicate selecting e.g. only CA atoms, as this ensures the analysis is only done once per residue. See code example above.

OERamachandranAnalysis(const OEHierResidue &res)
OERamachandranAnalysis(const OEChem::OEMolBase &mol, const OEChem::OEResidue &res)

Residue based constructors. These constructors, like the atom based one, use OEGetTorsion, to determine the \(\phi\), \(\psi\), and \(\omega\) dihedrals angles. The dihedral is used to differentiate Cis/Trans proline.

OERamachandranAnalysis(double phi, double psi, const unsigned int ramaType)

Constructor that determines the Ramachandran category based on raw data, where the user specifies which underlying Ramachandran plot to use, by specifying the type using the OERamaType namespace.


double GetPhi() const

Returns the value of the backbone \(\phi\) dihedral angle used to evaluate the score, in radians.


double GetPsi() const

Returns the value of the backbone \(\psi\) dihedral angle used to evaluate the score, in radians.


unsigned int GetRamaCategory() const

Returns a value corresponding to the classification for the residue from the OERamaCategory namespace.


double GetRamaScore() const

Returns the value of the residue’s Ramachandran score, which is a score relative to contours of expected Ramachandran behavior.


unsigned int GetRamaType() const

Returns a value corresponding to the OERamaCategory namespace of the type of Ramachandran plot data used to determine the classification.