As of Version 14.1, BioMoleculePlot3D is a built-in symbol.

Function Repository Resource:

BioMoleculePlot3D

Source Notebook

Visualize the 3D structure of biomolecules

Contributed by: Soutick Saha, Jan Mangaldan and Jason Biggs

ResourceFunction["BioMoleculePlot3D"][biomol]

creates a three-dimensional visualization of the biomolecule represented by biomol.

Details and Options

ResourceFunction["BioMoleculePlot3D"] is also known as ribbon diagram, cartoon diagram or Richardson diagram.
biomol can be a four-character PDB ID represented as a string, a "Protein" Entity, a File pointing to a "PDB" or "MMCIF" file, or a URL.
ResourceFunction["BioMoleculePlot3D"] can visualize the location of individual residues along the backbone of the biomolecule, as well as α-helices and β-sheets in proteins.
If biomol corresponds to a nucleic acid (DNA or RNA) or a nucleic acid-protein complex, ResourceFunction["BioMoleculePlot3D"] shows a 3D structure indicating the purine and pyrimidine units in the nucleic acid components.
ResourceFunction["BioMoleculePlot3D"] has the same options as Graphics3D, with the following additions and changes:
"ChainStyle"Automaticdirectives to specify the style for each chain
"ColorScheme""Chain"color scheme used for biomolecule units
GeneratedAssetLocationAutomaticlocation where downloaded files are stored
"LigandStyle"Automaticstyle used for depicting the ligands
PlotLegendsNonelegends for biomolecule units
"ShowLigands"Falsewhether to show ligands
SourceLinkAutomaticPDB mirror used for getting PDB files
Downloaded files are stored in the directory returned by FileNameJoin[{$WolframDocumentsDirectory,"BioMolecule"}] by default. Use the option GeneratedAssetLocation to change the directory location.
Possible settings for "ColorScheme" include:
"Chain"color each chain, using "ChainStyle"
"Charge"color each residue by its charge or polarity
"Residue"color each residue
"SecondaryStructurePropensity"color each residue by its tendency to form helices or sheets
Possible settings for "LigandStyle" include "BallAndStick", "Spacefilling", "Tubes" and "Wireframe", with the default being Automatic.
Possible settings for SourceLink include "UnitedStates", "Europe" and "Japan", with the default being Automatic.
Some renderings might take a while, especially for first-time evaluations.

Examples

Basic Examples (1) 

Visualize the structure of the plant protein crambin using its PDB ID:

In[1]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["1CRN"]
Out[1]=

Scope (5) 

Visualize the structure of porcine insulin using its PDB ID:

In[2]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["9INS"]
Out[2]=

An equivalent specification:

In[3]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][ExternalIdentifier["PDBStructureID", "9ins"]]
Out[3]=

Visualize a "Protein" Entity:

In[4]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Entity["Protein", "SP1"]]
Out[4]=

Visualize a nucleic acid strand from a file:

In[5]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][File[FindFile["ExampleData/100d.pdb"]]]
Out[5]=

Visualize an RNA protein complex from the Nucleic Acid Database:

In[6]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][
 URL["http://ndbserver.rutgers.edu/files/ftp/NDB/coordinates/na-mmcif/1i6u.cif.gz"]]
Out[6]=

Customize the appearance by setting various options:

In[7]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["6MQF", "ChainStyle" -> {RGBColor[0.70135, 0.093019, 0.00140383], RGBColor[
   0.289647, 0.222614, 0.484169]}, "LigandStyle" -> "BallAndStick", PlotLegends -> Automatic, "ShowLigands" -> True]
Out[7]=

Options (13) 

ChainStyle (1) 

Use non-default colors for the chains of melittin, a protein found in bee venom:

In[8]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["2MLT", "ChainStyle" -> {RGBColor[0.117603, 0.564699, 1.], RGBColor[
   1., 0.411802, 0.705893]}]
Out[8]=

ColorScheme (3) 

Color the structure of lysozyme by its residues:

In[9]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["1LYZ", "ColorScheme" -> "Residue"]
Out[9]=

Color the residues according to their charges or polarities:

In[10]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["1LYZ", "ColorScheme" -> "Charge"]
Out[10]=

Color the residues according to their abilities to form α-helices or β-sheets:

In[11]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["1LYZ", "ColorScheme" -> "SecondaryStructurePropensity"]
Out[11]=

GeneratedAssetLocation (2) 

Use a different directory for saving downloaded files:

In[12]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][
 URL["http://exampledata.wolfram.com/1PPT.pdb"], GeneratedAssetLocation -> $UserDocumentsDirectory]
Out[12]=

Confirm that the file was downloaded to the specified directory:

In[13]:=
FileExistsQ[FileNameJoin[{$UserDocumentsDirectory, "1PPT.pdb"}]]
Out[13]=

LigandStyle (1) 

Use a ball-and-stick depiction of the ligands:

In[14]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["1U70", "LigandStyle" -> "BallAndStick", "ShowLigands" -> True]
Out[14]=

PlotLabel (2) 

Show the PDB ID in the plot label:

In[15]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["3NIR", PlotLabel -> Automatic]
Out[15]=

Show the entity name in the plot label:

In[16]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][Entity["Protein", "PLK1"], PlotLabel -> Automatic]
Out[16]=

PlotLegends (2) 

Create a legend based on the different chains in the three-finger toxin irditoxin:

In[17]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["2H7Z", PlotLegends -> Automatic]
Out[17]=

Create a legend based on the residues:

In[18]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["2H7Z", PlotLegends -> Automatic, "ColorScheme" -> "Residue"]
Out[18]=
In[19]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["2H7Z", PlotLegends -> Automatic, "ColorScheme" -> "Charge"]
Out[19]=

ShowLigands (1) 

Show the heme ligand in myoglobin:

In[20]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["1MBN", "ShowLigands" -> True]
Out[20]=

SourceLink (1) 

Use the Japanese PDB mirror as the source:

In[21]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["1BNA", SourceLink -> "Japan"]
Out[21]=

Neat Examples (5) 

Visualize the structure of triose phosphate isomerase from Gallus gallus, one of the first proteins visualized by Jane Richardson as a ribbon diagram:

In[22]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["1TIM"]
Out[22]=

Visualize the structure of green fluorescent protein from the jellyfish Aequorea victoria, which has a β-barrel motif:

In[23]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["1GFL"]
Out[23]=

Visualize the structure of an antifreeze protein from the beetle Tenebrio molitor:

In[24]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["1ezg"]
Out[24]=

Visualize the structure of the anticancer agent L-asparaginase from Escherichia coli, which has multiple chains:

In[25]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["3ECA"]
Out[25]=

Visualize the interaction of ribosomal protein L5 from Thermus thermophilus with 5S rRNA from Escherichia coli:

In[26]:=
ResourceFunction[
 "BioMoleculePlot3D", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"]["1MJI", "ChainStyle" -> ColorData[61, "ColorList"], PlotLegends -> Automatic,
  "ShowLigands" -> True]
Out[26]=

Publisher

Soutick Saha

Version History

  • 1.1.0 – 26 August 2022
  • 1.0.0 – 15 August 2022

Source Metadata

Related Resources

License Information