Protein Visualization in the Wolfram Language

Soutick Saha, Bioinformatics Developer 
Wolfram Alpha

(RowDefault[, (Spacer1), , (Spacer1), ])  #WolframTechConf

Outline

1. Brief Introduction to the Wolfram ProteinVisualization Paclet

2. What are proteins?

3. Protein structure and ribbon diagram

4. Other ways to visualize proteins

5. A Better Understanding of Dihedral Angles in Proteins

6. Protein Structure Analysis for Researchers in Wolfram Language

7. Future Directions

The Wolfram ProteinVisualization Paclet

can be used to visualize and analyze different aspects of protein structures.

Install and load the paclet

To download this paclet in your Wolfram Language environment, evaluate this code:

PacletInstall["WolframChemistry/ProteinVisualization",UpdatePacletSites->True]

To load the paclet after installation, evaluate this code:

Needs["WolframChemistry`ProteinVisualization`"]

What are proteins?

Proteins are covalently linked chain(s) of amino acids that folds into specific structures and are responsible for specific biological functions.

Amino Acids

Created by Jason Biggs

Most common amino acids in proteins

GraphicsGrid[Partition[MoleculePlot[#,PlotLabel->#["Name"]]&/@EntityList@EntityClass["Chemical","AminoAcids"],UpTo[5]],Frame->All,ImageSize->800]

Peptide bonds

Proteins are covalently linked chains of amino acids which are connected by peptide bonds. BioSequenceMoleculePlot and BioSequenceMoleculePlot3D function created by Jan Mangaldan allows us to visualize peptide bonds in 2D and 3D respectively.

{ResourceFunction["BioSequenceMoleculePlot"][BioSequence["Peptide","WA"]],
ResourceFunction["BioSequenceMoleculePlot3D"][BioSequence["Peptide","WA"]]}

Protein structure and ribbon diagram

Organization of protein structures

Ribbon diagram of protein structures

BiomoleculePlot3D shows the ribbon diagrams of protein structures

Visualize the ribbon diagram of the structure of myoglobin in complex with Heme B, the first reported x - ray structure of a protein:

BiomoleculePlot3D["1MBN"]

Protein structure and ribbon diagram

Some useful Options

"BackboneColorRules" defines how the ribbon is colored. The individual residues can be colored based on "Residues", "Chains", "SecondaryStructure" or the whole "Backbone".

The first element of the option describes how will the ribbon be colored and the second element gives an option to specify the colors of specific "Residues",  "Chains" or "SecondaryStructure" elements.

Here are the applications of the option while visualizing the structure of  the COVID-19 main protease, which plays a key role in viral replication and transcription and is an attractive drug target for SARS-CoV-2:

filename="/Users/souticks/Downloads/6lu7-assembly1.cif.gz";
BiomoleculePlot3D[filename,"BackboneColorRules"->{"Chains",Automatic}]

BiomoleculePlot3D[filename,"BackboneColorRules"->{"Residues",Automatic}]

BiomoleculePlot3D[filename,"BackboneColorRules"->{"SecondaryStructure",Automatic}]

Here is the structure of the same protein, but now specifying colors for chains, amino acids or secondary structure elements:

BiomoleculePlot3D[filename,"BackboneColorRules"->{"Chains",{"A"->,"A-2"->}}]

BiomoleculePlot3D[filename,"BackboneColorRules"->{"Residues",{"Asn"->,"Ser"->}}]

BiomoleculePlot3D[filename,"BackboneColorRules"->{"SecondaryStructure",{"Helix"->,"Sheet"->,"Backbone"->}}]

"BackboneAtoms" shows the molecular structure of the protein along with the ribbon diagram.

Visualize the backbone atoms and bonds along with the ribbon diagram of human Insulin-like growth factor, that plays a key role in growth of all cell types.

"BackboneAtoms" when True can take all options of ProteinBackboneAtomPlot:

BiomoleculePlot3D["1GZR","BackboneAtoms"->True,"ShowSideChains"->True]

Other ways to visualize proteins

AlphaCarbonPathPlot3D - visualizing the α-carbon trace

AlphaCarbonPathPlot3D plots the α-carbon trace of a protein. It takes most of the Options of BiomoleculePlot3D. Here is the α-carbon trace of the human G-protein-coupled receptor which plays a key role in cell signaling:

AlphaCarbonPathPlot3D["8JMT"]

Folding an arbitrary amino acid sequence

Now you can fold an arbitrary amino acid sequence of length 400 residues or less using the ESMFold API! Individual residue, chain and prediction confidence information can be seen upon mouse hover.

AlphaCarbonPathPlot3D[BioSequence["Peptide","SLIPIVVEQTGRGERAYDIYSRLLRERIVCVMGPIDDSVASLVIAQLLFLQSESNKKPIHMYINSPGGVVTAGLAIYDTMQYILNPICTWCVGQAASMGSLLLAAGTPGMRHSLPNSRIMIHQPSGGARGQATDIAIQAEEIMKLKKQLYNIYAKHTKQSLQVIESAMERDRYMSPMEAQEFGILDKVLVHPPQDGEDEPTLVQKEPVEAAPAAEPVPAST"]]

Other ways to visualize proteins

ProteinBackboneAtomPlot - visualizing molecular structure of proteins

ProteinBackboneAtomPlot plots the 3D molecular structure of a protein. Here is the plot of the human short coiled coil protein, a common class of protein structure:

ProteinBackboneAtomPlot["4BWD","ShowSideChains"->True]

And this is how it looks overlaid with the ribbon diagram! Notice that the side chains protrude out of the helix.

BiomoleculePlot3D["4BWD","BackboneAtoms"->True,"ShowSideChains"->True]

Other ways to visualize proteins

AmidePlanePlot - visualizing amide planes in proteins

Resonance in peptide bonds image source: https://masteringcollegebiochemistry.wordpress.com/2019/01/15/protein-structure-peptide-bonds/

Amide planes image source: https://ocw.mit.edu/courses/5-07sc-biological-chemistry-i-fall-2013/ab748ac191e468a1134614b9f8e620e8_MIT5_07SCF13_Lec2_3.pdf

Amide planes shows the planar nature of peptide bonds which can be visualized in proteins using the AmidePlanePlot function. This function takes all options of ProteinBackboneAtomPlot and it is also possible to visualize only the amide planes.

Here is the plot of amide planes of human Programmed cell death protein 1, which is a immune checkpoint and a common therapeutic target:

AmidePlanePlot["3RRQ"]

A Better Understanding of Dihedral Angles in Proteins

DihedralAngle with Wolfram

Visualize a dihedral angle with Graphics3D:

Graphics3D[{Style[HalfPlane[{{0,0,0},{0,1,0}},{1,0,1}],],Style[HalfPlane[{{0,0,0},{0,1,0}},{1,0,0}],]},Boxed->False]

Calculate the angle using the DihedralAngle function:

DihedralAngle[{{0,0,0},{0,1,0}},{{1,0,1},{1,0,0}}]

Dihedral angles in proteins

Dihedral angles in proteins are formed between planes between the backbone atoms as shown in gray below:

A Better Understanding of Dihedral Angles in Proteins

Do more with dihedral angle ({ϕ, ψ}) data in proteins

As an example, let us analyze the dihedral angles from the crystal structure of the human KRAS protein, one of the most frequently mutated protein in cancer:

Calculate dihedral angles in radians:

pdbid="6OIM";
RamachandranAngles[pdbid]//Short

Calculate dihedral angles in degrees:

QuantityMagnitude@UnitConvert[Quantity[#,"Radians"],"Degrees"]&/@RamachandranAngles[pdbid]//Short

Use RamachandranPlot function to see dihedral angle distribution

Here is the Ramachandran plot for the structure of  the human KRAS protein:

RamachandranPlot[pdbid,"ResidueColors"->True,PlotStyle->PointSize[0.01],ImageSize->600]

A Better Understanding of Dihedral Angles in Proteins

Corresponding DihedralAnglePlot

DihedralAnglePlot[pdbid,"LigandStyle"->"Tubes"]

Visualize and analyze the effect of side chains on dihedral angles:

DihedralAnglePlot[pdbid,"ShowSideChains"->True,"LigandStyle"->"Tubes"]

Protein Structure Analysis for Researchers in Wolfram Language

Protein Contact Maps

ProteinContactMap is the map of pairwise distance between residues.

Analyze the residue-residue interactions in the structure of the human histone-DNA complex. Histone is critical to efficient packing of our DNA:

BiomoleculePlot3D["3AV2"]

ProteinContactMap plots the pairwise residue distance of a protein:

ProteinContactMap["3AV2",ImageSize->600]

The "CutOff" option for the ProteinContactMap allows users to define cutoff distance between pairs of residues.

ProteinContactMap["3AV2","CutOff"->Quantity[15,"Angstroms"],"Colors"->{,},ImageSize->600]

In its basic usage, the plot is just a geometric signature of the shape of the backbone, but it is possible to create a unique fingerprint of a protein by showing the sequence information along with the contact map.

ProteinContactMap["3AV2","ShowResidues"->True,ImageSize->600]

You can visualize intra- and interchain contact maps with the "Chains" option.

Contact map of the same chain:

ProteinContactMap["3AV2","ShowResidues"->True,"Chains"->{"A","A"},ImageSize->600]

Contact map of different chains, protein-DNA interaction:

ProteinContactMap["3AV2","ShowResidues"->True,"Chains"->{"A","I"},ImageSize->600]

Do more with the residue-residue distance data

Generate a distance matrix with ResidueDistanceMatrix:

ResidueDistanceMatrix["3AV2"]//Short

Protein Structure Analysis for Researchers in Wolfram Language

Using Graphs to Visualize Residue-Residue Interactions in Proteins

Graphs are useful in understanding interchain interactions and important residues in a protein.

Make a corresponding distance graph of the of the structure of the human histone-DNA complex:

ProteinContactGraphPlot["3AV2","CutOff"->Quantity[8,"Angstroms"]]

The ProteinContactGraphPlot function includes options that allow users to define the cutoff distance between pairs of residues, set the size of a vertex based on its connectivity and more. There is also an option to scale the vertex size based on its connectivity.

Make the distance graph with scaled vertex size based on its connectivity:

ProteinContactGraphPlot["3AV2","CutOff"->Quantity[8,"Angstroms"],"ScaledVertexSize"->True,VertexSize->15]

Do more with the residue-residue distance graph data

Make a graph of residue contacts with ResidueDistanceGraph:

ResidueDistanceGraph["3AV2","CutOff"->Quantity[8,"Angstroms"]]//EdgeList//Short

Future Directions

1. Connecting with databases for computed structures like ESMFold database and AlphaFold EMBL database.

2. Incorporate relevant genome information from databases like UniProt.

3. Surface plot for protein visualization (Image Source : Wikipedia).

4. Incorporating clinical significance of mutations into protein structures.

Acknowledgements

I would like to thank Jason Biggs for guiding me in developing and improving this paclet and members of the Wolfram Alpha Chemistry Team for their useful feedback and suggestions.