Main Content

molviewer

(To be removed) Display and manipulate 3-D molecule structure

    molviewer will be removed in a future release.

    Description

    molviewer(File) reads the data in a molecule model file, File, and opens Molecule Viewer displaying the 3-D molecular structure for viewing and manipulation.

    example

    molviewer(pdbID) retrieves the structural data of a protein, pdbID, from the PDB database and opens Molecule Viewer displaying the 3-D molecular structure for viewing and manipulation.

    example

    molviewer(pdbStruct) reads the data from pdbStruct, a structure containing a field for each PDB record, and opens Molecule Viewer displaying a 3-D molecular structure for viewing and manipulation.

    example

    figureHandle = molviewer(___) returns the figure handle of Molecule Viewer.

    example

    Examples

    collapse all

    View the H5N1 influenza virus hemagglutinin molecule, whose structural information is located at www.rcsb.org/pdb/files/2FK0.pdb.gz.

    Open the H5N1 influenza virus hemagglutinin molecule in Molecule Viewer.

    molviewer('https://www.rcsb.org/pdb/files/2FK0.pdb.gz');

    View the molecule with a PDB identifier of 2DHB.

    molviewer('2DHB');

    View the molecule with a PDB identifier of 4hhb, and create a figure handle for Molecule Viewer.

    FH = molviewer('4hhb')
    FH = 
    
      Figure (BioinfoMolviewer) with properties:
    
          Number: 5
            Name: 'Molecule Viewer: Blank'
           Color: [0.9400 0.9400 0.9400]
        Position: [1000 818 560 420]
           Units: 'pixels'
    
      Show all properties

    Use the getpdb function to retrieve protein structure data from the PDB database and create a MATLAB® structure. Then view the protein molecule.

    pdbstruct = getpdb('1vqx')
    molviewer(pdbstruct)
    pdbstruct = 
    
      struct with fields:
    
                   Header: [1×1 struct]
                    Title: [2×60 char]
                 Compound: [5×28 char]
                   Source: [4×58 char]
                 Keywords: 'HELIX-LOOP, SIGNALING PROTEIN'
           ExperimentData: 'SOLUTION NMR'
                  Authors: 'O.G.KISSELEV,M.A.DOWNS,J.H.MCDOWELL,P.A.HARGRAVE'
             RevisionDate: [1×4 struct]
               Superseded: [1×1 struct]
                  Journal: [1×1 struct]
                  Remark2: [1×1 struct]
                  Remark3: [1×1 struct]
                  Remark4: [2×59 char]
                Remark100: [3×59 char]
                Remark210: [30×59 char]
                Remark215: [6×59 char]
                Remark300: [6×59 char]
                Remark350: [13×59 char]
                Remark470: [13×59 char]
                Remark500: [33×59 char]
                Remark900: [5×59 char]
             DBReferences: [1×1 struct]
        SequenceConflicts: [1×7 struct]
                 Sequence: [1×1 struct]
         ModifiedResidues: [1×7 struct]
                Heterogen: [1×7 struct]
            HeterogenName: [1×2 struct]
         HeterogenSynonym: [1×2 struct]
                  Formula: [1×2 struct]
                    Helix: [1×1 struct]
                     Link: [1×11 struct]
                   Cryst1: [1×1 struct]
                  OriginX: [1×3 struct]
                    Scale: [1×3 struct]
                    Model: [1×15 struct]
             Connectivity: [1×58 struct]
                   Master: [1×1 struct]
                SearchURL: 'https://files.rcsb.org/download/1vqx.pdb'

    Input Arguments

    collapse all

    Character vector or string specifying one of the following:

    • File name of a file on the MATLAB search path or in the MATLAB Current Folder

    • Path and file name

    • URL pointing to a file (URL must begin with a protocol such as http://, ftp://, or file://)

    The referenced file is a molecule model file, such as a Protein Data Bank (PDB)-formatted file (ASCII text file). Valid file types include:

    • PDB

    • MOL (MDL)

    • SDF

    • XYZ

    • SMOL

    • JVXL

    • CIF/mmCIF

    Example: 'https://www.rcsb.org/pdb/files/2FK0.pdb.gz'

    Unique identifier for a protein structure record in the PDB database specified as a character vector or string.

    Note

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

    Example: '2DHB'

    A structure containing a field for each PDB record, such as returned by the getpdb or pdbread function.

    Output Arguments

    collapse all

    Figure handle of Molecule Viewer.

    Tips

    • You can pass the figureHandle to the evalrasmolscript function, which sends RasMol script commands to Molecule Viewer.

    • If you receive any errors related to memory or Java® heap space, try increasing your Java heap space as described at https://www.mathworks.com/matlabcentral/answers/92813-how-do-i-increase-the-heap-space-for-the-java-vm-in-matlab.

    • After displaying the 3-D molecule structure, you can:

      • Hover the mouse over a subcomponent of the molecule to display an identification label for it.

      • Spin and rotate the molecule at different angles by click-dragging it.

      • Spin the molecule in the x-z plane by clicking .

      • Spin the molecule in the x-y plane by pressing and holding the Shift key, then click-dragging left and right.

      • Zoom in by pressing and holding the Shift key, then click-dragging up and down.

      • You can also zoom in by clicking the figure, then turning the mouse scroll wheel, or by clicking the following buttons:

        or

      • Move the molecule by pressing and holding Ctrl + Alt, then click-dragging.

      • Change the background color between black and white by clicking .

      • Reset the molecule position by clicking .

      • Show or hide the Control Panel by clicking .

      • Manipulate and annotate the 3-D structure by selecting options in the Control Panel or, for a complete list of options, by right-clicking the Molecule Viewer window to select commands:

      • Display the Jmol Script Console by clicking .

        Note

        There is a known bug with the Open button of the script editor that prevents loading a Rasmol script interactively. Instead use the evalrasmolscript function which sends RasMol script commands to Molecule Viewer. Also, you can copy and paste the script commands into the script console.

    Version History

    Introduced in R2007a

    expand all