Main Content

Molecule Viewer

Display and manipulate 3-D molecule structure


The Molecule Viewer app lets you display and manipulate 3-D molecular structures.

You can:

  • Import structural information directly from the Protein Data Bank (PDB) database or other supported files.

  • Measure distances and dihedral angles.

  • Display molecular surfaces, such as van der Waals or solvent-accessible surfaces.

  • Select different visualization and color schemes to display a molecule, such as the ribbon or backbone representation.

  • Run RasMol script commands from within the app.

Molecule Viewer app

Open the Molecule Viewer App

  • MATLAB® Toolstrip: On the Apps tab, under Computational Biology, click the app icon.

  • MATLAB command prompt: Enter molviewer.


expand all

Display the 3-D structure of an acetylsalicylic acid (aspirin) molecule.

f = molviewer('aspirin.mol');

Figure Molecule Viewer: ASPIRIN contains objects of type uimenu, uitoolbar, hgjavacomponent.

f.HandleVisibility = 'off';

Programmatic Use

expand all

molviewer opens the Molecule Viewer app.

molviewer(file) reads the structural information from file and shows the 3-D molecular structure in the Molecule Viewer app.

molviewer(pdbID) retrieves the structural data for a protein from the PDB database using its pdbID and shows the 3-D molecular structure in the Molecule Viewer app.

Compatibility Considerations

expand all

Not recommended starting in R2020b

See Also


Introduced in R2007a