Main Content

pdbsuperpose

Superpose 3-D structures of two proteins

Syntax

pdbsuperpose(PDB1, PDB2)
Dist = pdbsuperpose(PDB1, PDB2)
[Dist, RMSD] = pdbsuperpose(PDB1, PDB2)
[Dist, RMSD, Transf] = pdbsuperpose(PDB1, PDB2)
[Dist, RMSD, Transf, PBD2TX] = pdbsuperpose(PDB1, PDB2)
... = pdbsuperpose(..., 'ModelNum', ModelNumValue, ...)
... = pdbsuperpose(..., 'Scale', ScaleValue, ...)
... = pdbsuperpose(..., 'Translate', TranslateValue, ...)
... = pdbsuperpose(..., 'Reflection', ReflectionValue, ...)
... = pdbsuperpose(..., 'SeqAlign', SeqAlignValue, ...)
... = pdbsuperpose(..., 'Segment', SegmentValue, ...)
... = pdbsuperpose(..., 'Apply', ApplyValue, ...)
... = pdbsuperpose(..., 'Display', DisplayValue, ...)

Input Arguments

PDB1, PDB2

Protein structures represented by any of the following:

  • Character vector or string specifying a unique identifier for a protein structure record in the Protein Data Bank (PDB) database.

  • Variable containing a PDB-formatted MATLAB® structure, such as returned by getpdb or pdbread.

  • Character vector or string specifying a file name or, a path and file name. The referenced file is a PDB-formatted file. If you specify only a file name, that file must be on the MATLAB search path or in the MATLAB Current Folder.

ModelNumValue

Two-element numeric array whose elements correspond to models in PDB1 and PDB2 respectively when PDB1 or PDB2 contains multiple models. It specifies the models to consider in the superposition. By default, the first model in each structure is considered.

ScaleValue

Specifies whether to include a scaling component in the linear transformation. Choices are true or false (default).

TranslateValue

Specifies whether to include a translation component in the linear transformation. Choices are true (default) or false.

ReflectionValue

Specifies whether to include a reflection component in the linear transformation. Choices are:

  • true — Include reflection component.

  • false — Exclude reflection component.

  • 'best' — Default. May or may not include the reflection component, depending on the best fit solution.

SeqAlignValue

Specifies whether to perform a local sequence alignment and then use only the portions of the structures corresponding to the segments that align to compute the linear transformation. Choices are true (default) or false.

Note

If you set the 'SeqAlign' property to true, you can also specify the following properties used by the swalign function:

  • 'ScoringMatrix'

  • 'GapOpen'

  • 'ExtendGap'

For more information on these properties, see swalign.

SegmentValue

Specifies the boundaries and the chain of two subsequences to consider for computing the linear transformation. SegmentValue is a cell array of character vectors with the following format:

{'start1-stop1:chain1', 'start2-stop2:chain2'}

You can omit the boundaries to indicate the entire chain, such as in {'chain1', 'start2-stop2:chain2'}. You can specify only one pair of segments at any given time, and the specified segments are assumed to contain the same number of alpha carbon atoms.

ApplyValue

Specifies the extent to which the linear transformation should be applied. Choices are:

  • 'all' — Default. Apply the linear transformation to the entire PDB2 structure.

  • 'chain' — Apply the linear transformation to the specified chain only.

  • 'segment' — Apply the linear transformation to the specified segment only.

DisplayValue

Warning

This name-value argument will be removed in a future release.

Specifies whether to display the original PDB1 structure and the resulting transformed PDB2TX structure in the Molecule Viewer window using the molviewer function. Each structure is represented as a separate model. Choices are true or false (default).

Output Arguments

Dist

Value representing a dissimilarity measure given by the sum of the squared errors between PDB1 and PDB2. For more information, see procrustes.

RMSD

Scalar representing the root mean square distance between the coordinates of the PDB1 structure and the transformed PDB2 structure, considering only the atoms used to compute the linear transformation.

Transf

Linear transformation computed to superpose the chain of PDB2 to the chain of PDB1. Transf is a MATLAB structure with the following fields:

  • T — Orthogonal rotation and reflection component.

  • b — Scale component.

  • c — Translation component.

Note

Only alpha carbon atom coordinates are used to compute the linear transformation.

Tip

You can use the Transf output as input to the pdbtransform function.

PDB2TX PDB-formatted MATLAB structure that represents the coordinates in the transformed PDB2 protein structure.

Description

pdbsuperpose(PDB1, PDB2) computes and applies a linear transformation to superpose the coordinates of the protein structure represented in PDB2 to the coordinates of the protein structure represented in PDB1. PDB1 and PDB2 are protein structures represented by any of the following:

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

  • Variable containing a PDB-formatted MATLAB structure, such as returned by getpdb or pdbread.

  • Character vector or string specifying a file name or a path and file name. The referenced file is a PDB-formatted file. If you specify only a file name, that file must be on the MATLAB search path or in the MATLAB Current Folder.

Alpha carbon atom coordinates of single chains for each structure are considered to compute the linear transformation (translation, reflection, orthogonal rotation, and scaling). By default, the first chain in each structure is considered to compute the transformation, and the transformation is applied to the entire molecule. By default, the original PDB1 structure and the resulting transformed PDB2 structure are displayed as separate models in the Molecule Viewer window using the molviewer function.

Dist = pdbsuperpose(PDB1, PDB2) returns a dissimilarity measure given by the sum of the squared errors between PDB1 and PDB2. For more information, see procrustes.

[Dist, RMSD] = pdbsuperpose(PDB1, PDB2) also returns RMSD, the root mean square distance between the coordinates of the PDB1 structure and the transformed PDB2 structure, considering only the atoms used to compute the linear transformation.

[Dist, RMSD, Transf] = pdbsuperpose(PDB1, PDB2) also returns Transf, the linear transformation computed to superpose the chain of PDB2 to the chain of PDB1. Transf is a MATLAB structure with the following fields:

  • T — Orthogonal rotation and reflection component.

  • b — Scale component.

  • c — Translation component.

Note

Only alpha carbon atom coordinates are used to compute the linear transformation.

[Dist, RMSD, Transf, PBD2TX] = pdbsuperpose(PDB1, PDB2) also returns PBD2TX, a PDB-formatted MATLAB structure that represents the coordinates in the transformed PDB2 protein structure.

... = pdbsuperpose(..., 'PropertyName', PropertyValue, ...) calls pdbsuperpose 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:

... = pdbsuperpose(..., 'ModelNum', ModelNumValue, ...) specifies the models to consider in the superposition when PDB1 or PDB2 contains multiple models. ModelNumValue is a two-element numeric array whose elements correspond to the models in PDB1 and PDB2 respectively. By default, the first model in each structure is considered.

... = pdbsuperpose(..., 'Scale', ScaleValue, ...) specifies whether to include a scaling component in the linear transformation. Choices are true or false (default).

... = pdbsuperpose(..., 'Translate', TranslateValue, ...) specifies whether to include a translation component in the linear transformation. Choices are true (default) or false.

... = pdbsuperpose(..., 'Reflection', ReflectionValue, ...) specifies whether to include a reflection component in the linear transformation. Choices are true (include reflection component), false (exclude reflection component), or 'best' (may or may not include the reflection component, depending on the best fit solution). Default is 'best'.

... = pdbsuperpose(..., 'SeqAlign', SeqAlignValue, ...) specifies whether to perform a local sequence alignment and then use only the portions of the structures corresponding to the segments that align to compute the linear transformation. Choices are true (default) or false.

Note

If you set the 'SeqAlign' property to true, you can also specify the following properties used by the swalign function:

  • 'ScoringMatrix'

  • 'GapOpen'

  • 'ExtendGap'

For more information on these properties, see swalign.

... = pdbsuperpose(..., 'Segment', SegmentValue, ...) specifies the boundaries and the chain of two subsequences to consider for computing the linear transformation. SegmentValue is a cell array of character vectors with the following format: {'start1-stop1:chain1', 'start2-stop2:chain2'}. You can omit the boundaries to indicate the entire chain, such as in {'chain1', 'start2-stop2:chain2'}. You can specify only one pair of segments at any given time, and the specified segments are assumed to contain the same number of alpha carbon atoms.

... = pdbsuperpose(..., 'Apply', ApplyValue, ...) specifies the extent to which the linear transformation should be applied. Choices are 'all' (apply the linear transformation to the entire PDB2 structure), 'chain' (apply the linear transformation to the specified chain only), or 'segment' (apply the linear transformation to the specified segment only). Default is 'all'.

... = pdbsuperpose(..., 'Display', DisplayValue, ...) specifies whether to display the original PDB1 structure and the resulting transformed PDB2TX structure in the Molecule Viewer window using the molviewer function. Each structure is represented as a separate model. Choices are true (default) or false.

Examples

Example 20. Superposing Two Hemoglobin Structures
  1. Use the getpdb function to retrieve protein structure data from the Protein Data Bank (PDB) database for two hemoglobin structures.

    str1 = getpdb('1dke');
    str2 = getpdb('4hhb');
    
  2. Superpose the first model of the two hemoglobin structures, applying the transformation to the entire molecule.

    d = pdbsuperpose(str1, str2, 'model', [1 1], 'apply', 'all');
    
  3. Superpose the two hemoglobin structures (each containing four chains), computing and applying the linear transformation chain by chain. Do not display the structures.

    strtx = str2;
    chainList1 = {str1.Sequence.ChainID};
    chainList2 = {str2.Sequence.ChainID};
    for i = 1:4
        [d(i), rmsd(i), tr(i), strtx] = pdbsuperpose(str1, strtx,  ...
                               'segment', {chainList1{i}; chainList2{i}}, ...
                               'apply', 'chain', 'display', false);
    end
Example 21. Superposing Two Chains of a Thioredoxin Structure

Superpose chain B on chain A of a thioredoxin structure (PDBID = 2trx), and then apply the transformation only to chain B.

[d, rmsd, tr] = pdbsuperpose('2trx', '2trx', 'segment', {'A', 'B'}, ...
                             'apply', 'chain')

d =

    0.0028

rmsd =

    0.6604

tr = 

    T: [3x3 double]
    b: 1
    c: [109x3 double]
Example 22. Superposing Two Calmodulin Structures

Superpose two calmodulin structures according to the linear transformation obtained using two 20 residue-long segments.

pdbsuperpose('1a29', '1cll', 'segment', {'10-30:A', '10-30:A'})

ans =

    0.1945

Version History

Introduced in R2008b

expand all