| Bioinformatics Toolbox™ | ![]() |
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,
...)
| PDBid | String specifying a unique identifier for a protein structure record in the PDB database. |
| File | 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 | String or cell array of strings that specifies the chain(s) to compute the torsion angles for and plot. Choices are:
|
| PlotValue | String specifying how to plot chains. Choices are:
|
| ModelValue | Integer that specifies the structure model to consider. Default is 1. |
| GlycineValue | Controls 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. |
| 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:
|
| RamaStruct | MATLAB structure or array of structures (if protein contains multiple chains). Each structure contains the following fields:
For descriptions of the fields, see the following table. |
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.
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 string specifying the chain ID, which is case sensitive.
A cell array of strings 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 — String specifying a name for the region.
Color — 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. |
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')

Drawing a Ramachandran Plot for a Specific Chain
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');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

Drawing Ramachandran Plots with Highlighted Glycine Residues and Ramachandran Regions
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');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);

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)


Writing a Tab-Delimited Report File from a Ramachandran Structure
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
HPointsWrite 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);
View the file you created in the MATLAB Editor.
edit rama_1hkx_report.txt

[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.
Bioinformatics Toolbox functions: getpdb, molviewer, pdbdistplot, pdbread, proteinpropplot
![]() | quantilenorm | randfeatures | ![]() |
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |