Main Content

ramachandran

Draw Ramachandran plot for Protein Data Bank (PDB) data

Syntax

ramachandran(PDBid)
ramachandran(File)
ramachandran(PDBStruct)
RamaStruct = ramachandran(...)
ramachandran(..., 'Chain', ChainValue, ...)
ramachandran(..., 'Plot', PlotValue, ...)
ramachandran(..., 'Model', ModelValue, ...)
ramachandran(..., 'Glycine', GlycineValue, ...)
ramachandran(..., 'Regions', RegionsValue, ...)
ramachandran(..., 'RegionDef', RegionDefValue, ...)

Input Arguments

PDBidCharacter vector or string specifying a unique identifier for a protein structure record in the PDB database.

Note

Each structure in the PDB database is represented by a four-character alphanumeric identifier. For example, 4hhb is the identifier for hemoglobin.

File

Character vector or string specifying a file name or a path and file name. The referenced file is a Protein Data Bank (PDB)-formatted file. If you specify only a file name, that file must be on the MATLAB® search path or in the MATLAB Current Directory.

PDBStruct MATLAB structure containing PDB-formatted data, such as returned by getpdb or pdbread.
ChainValue

Character vector, string, string vector, or cell array of character vectors that specifies the chain(s) to compute the torsion angles for and plot.

Choices are:

  • 'All' (default) — Torsion angles for all chains are computed and plotted.

  • A character vector or string specifying the chain ID, which is case sensitive.

  • A cell array of character vectors or string vector specifying chain IDs, which are case sensitive.

PlotValue

Character vector or string specifying how to plot chains. Choices are:

  • 'None' — Plots nothing.

  • 'Separate' — Plots torsion angles for all specified chains in separate plots.

  • 'Combined' (default) — Plots torsion angles for all specified chains in one combined plot.

ModelValueInteger that specifies the structure model to consider. Default is 1.
GlycineValueControls the highlighting of glycine residues with a circle in the plot. Choices are true or false (default).
RegionsValue

Controls the drawing of Ramachandran reference regions in the plot. Choices are true or false (default).

The default regions are core right-handed alpha, core beta, core left-handed alpha, and allowed, with the core regions corresponding to data points of preferred values of psi/phi angle pairs, and the allowed regions corresponding to possible, but disfavored values of psi/phi angle pairs, based on simple energy considerations. The boundaries of these default regions are based on the calculations by Morris et al., 1992.

Note

If using the default colormap, red = right-handed core alpha, core beta, and core left-handed alpha, while yellow = allowed.

RegionDefValue

MATLAB structure or array of structures (if specifying multiple regions) containing information (name, color, and boundaries) for custom reference regions in a Ramachandran plot. Each structure must contain the following fields:

  • Name — Character vector or string specifying a name for the region.

  • Color — Character vector or string or three-element numeric vector of RGB values specifying a color for the region in the plot.

  • Patch — A 2-by-N matrix of values, the first row containing torsion angle phi (Φ) values, and the second row containing torsion angle psi (Ψ) values. When psi/phi angle pairs are plotted, the data points specify boundaries for the region. N is the number of data points needed to define the region.

Tip

If you specify custom reference regions in which a smaller region is contained or covered by a larger region, list the structure for the smaller region first in the array so that it is plotted last and visible in the plot.

Output Arguments

RamaStruct

MATLAB structure or array of structures (if protein contains multiple chains). Each structure contains the following fields:

  • Angles

  • ResidueNum

  • ResidueName

  • Chain

  • HPoints

For descriptions of the fields, see the following table.

Description

A Ramachandran plot is a plot of the torsion angle phi, Φ, (torsion angle between the C-N-CA-C atoms) versus the torsion angle psi, Ψ, (torsion angle between the N-CA-C-N atoms) for each residue of a protein sequence.

ramachandran(PDBid) generates the Ramachandran plot for the protein specified by the PDB database identifier PDBid.

ramachandran(File) generates the Ramachandran plot for the protein specified by File, a PDB-formatted file.

ramachandran(PDBStruct) generates the Ramachandran plot for the protein stored in PDBStruct, a MATLAB structure containing PDB-formatted data, such as returned by getpdb or pdbread.

RamaStruct = ramachandran(...) returns a MATLAB structure or array of structures (if protein contains multiple chains). Each structure contains the following fields.

FieldDescription
Angles

Three-column matrix containing the torsion angles phi (Φ), psi (Ψ), and omega (ω) for each residue in the sequence, ordered by residue sequence number. The number of rows in the matrix is equal to the number of rows in the ResidueNum column vector, which can be used to determine which residue corresponds to each row in the Angles matrix.

Note

The Angles matrix contains a row for each number in the range of residue sequence numbers, including residue sequence numbers missing from the PDB file. Rows corresponding to residue sequence numbers missing from the PDB file contain the value NaN.

ResidueNum

Column vector containing the residue sequence numbers from the PDB file.

Note

The ResidueNum vector starts with one of the following:

  • The lowest residue sequence number (if the lowest residue sequence number is negative or zero)

  • The number 1 (if the lowest residue sequence number is positive)

The ResidueNum vector ends with the highest residue sequence number and includes all numbers in the range, including residue sequence numbers missing from the PDB file.

The angles listed in the Angles matrix are in the same order as the residue sequence numbers in the ResidueNum vector. Therefore, you can use the ResidueNum vector to determine which residue corresponds to each row in the Angles matrix.

ResidueNameColumn vector containing the residue names for the protein.
ChainA character vector or string specifying the chains in the protein.
HPointsHandle to the data points in the plot.

ramachandran(..., 'PropertyName', PropertyValue, ...) calls ramachandran with optional properties that use property name/property value pairs. You can specify one or more properties in any order. Each PropertyName must be enclosed in single quotation marks and is case insensitive. These property name/property value pairs are as follows:

ramachandran(..., 'Chain', ChainValue, ...) specifies the chain(s) to compute the torsion angles for and plot. Choices are:

  • 'All' (default) — Torsion angles for all chains are computed and plotted.

  • A character vector or string specifying the chain ID, which is case sensitive.

  • A cell array of character vectors or string vector specifying chain IDs, which are case sensitive.

ramachandran(..., 'Plot', PlotValue, ...) specifies how to plot chains. Choices are:

  • 'None' — Plots nothing.

  • 'Separate' — Plots torsion angles for all specified chains in separate plots.

  • 'Combined' (default) — Plots torsion angles for all specified chains in one combined plot.

ramachandran(..., 'Model', ModelValue, ...) specifies the structure model to consider. Default is 1.

ramachandran(..., 'Glycine', GlycineValue, ...) controls the highlighting of glycine residues with a circle in the plot. Choices are true or false (default).

ramachandran(..., 'Regions', RegionsValue, ...) controls the drawing of Ramachandran reference regions in the plot. Choices are true or false (default).

The default regions are core right-handed alpha, core beta, core left-handed alpha, and allowed, with the core regions corresponding to data points of preferred values of psi/phi angle pairs, and the allowed regions corresponding to possible, but disfavored values of psi/phi angle pairs, based on simple energy considerations. The boundaries of these default regions are based on the calculations by Morris et al., 1992.

Note

If using the default colormap, then red = core right-handed alpha, core beta, and core left-handed alpha, while yellow = allowed.

ramachandran(..., 'RegionDef', RegionDefValue, ...) specifies information (name, color, and boundary) for custom reference regions in a Ramachandran plot. RegionDefValue is a MATLAB structure or array of structures containing the following fields:

  • Name — Character vector or string specifying a name for the region.

  • Color — Character vector or string or three-element numeric vector of RGB values specifying a color for the region in the plot.

  • Patch — A 2-by-N matrix of values, the first row containing torsion angle phi (Φ) values, and the second row containing torsion angle psi (Ψ) values. When psi/phi angle pairs are plotted, the data points specify a boundary for the region. N is the number of data points needed to define the region.

Tip

If you specify custom reference regions in which a smaller region is contained or covered by a larger region, list the structure for the smaller region first in the array so that it is plotted last and visible in the plot.

Examples

Example 41. Drawing a Ramachandran Plot

Draw the Ramachandran plot for the human serum albumin complexed with octadecanoic acid, which has a PDB database identifier of 1E7I.

ramachandran('1E7I')

Example 42. Drawing a Ramachandran Plot for a Specific Chain
  1. Use the getpdb function to retrieve protein structure data for the human growth hormone from the PDB database, and save the information to a file.

    getpdb('1a22','ToFile','1a22.pdb');
  2. Compute the torsion angles and draw the Ramachandran plot for chain A of the human growth hormone, represented in the pdb file, 1a22.pdb.

    ChainA1a22Struct = ramachandran('1a22.pdb','chain','A')
    
    ChainA1a22Struct =
    
             Angles: [191x3 double]
         ResidueNum: [191x1 double]
        ResidueName: {191x1 cell}
              Chain: 'A'
            HPoints: 370.0012

Example 43. Drawing Ramachandran Plots with Highlighted Glycine Residues and Ramachandran Regions
  1. Use the getpdb function to retrieve protein structure data for the human growth hormone from the PDB database, and store the information in a structure.

    Struct1a22 = getpdb('1a22');
  2. Draw a combined Ramachandran plot for all chains of the human growth hormone, represented in the pdb structure, 1a22Struct. Highlight the glycine residues (with a circle), and draw the reference Ramachandran regions in the plot.

    ramachandran(Struct1a22,'glycine',true,'regions',true);

    Tip

    Click a data point to display a data tip with information about the residue. Click a region to display a data tip defining the region. Press and hold the Alt key to display multiple data tips.

  3. Draw a separate Ramachandran plot for each chain of the human growth hormone, represented in the pdb structure, 1a22Struct. Highlight the glycine residues (with a circle) and draw the reference Ramachandran regions in the plot.

    ramachandran(Struct1a22,'plot','separate','chain','all',...
                 'glycine',true,'regions',true)

Example 44. Writing a Tab-Delimited Report File from a Ramachandran Structure
  1. Create an array of two structures containing torsion angles for chains A and D in the Calcium/Calmodulin-dependent protein kinase, which has a PDB database identifier of 1hkx.

    a = ramachandran('1hkx', 'chain', {'A', 'D'})
    
    a = 
    
    1x2 struct array with fields:
        Angles
        ResidueNum
        ResidueName
        Chain
        HPoints
  2. Write a tab-delimited report file containing torsion angles phi (Φ) and psi (Ψ) for chains A and D in the Calcium/Calmodulin-dependent protein kinase.

    fid = fopen('rama_1hkx_report.txt', 'wt');
    
    for c = 1:numel(a)
        for i = 1:length(a(c).Angles)
            if ~all(isnan(a(c).Angles(i,:)))
                fprintf(fid,'%s\t%d\t%s\t%f\t%f\n', a(c).Chain, ...
                    a(c).ResidueNum(i), a(c).ResidueName{i}, ...
                    a(c).Angles(i,1:2));
            end
        end
    end
    
    fclose(fid);
    
  3. View the file you created in the MATLAB Editor.

    edit rama_1hkx_report.txt

References

[1] Morris, A.L., MacArthur, M.W., Hutchinson, E.G., and Thornton, J.M. (1992). Stereochemical Quality of Protein Structure Coordinates. PROTEINS: Structure, Function, and Genetics 12, 345–364.

Version History

Introduced before R2006a