What’s New in Biomolecules in Wolfram Language

Soutick Saha, Bioinformatics Developer
Wolfram Alpha

#WolframTechConf

Talk notebook QR Code:

https://www.wolframcloud.com/obj/souticks/Published/WTC2025_talk.nb

Proteins and other molecules of life

Biomolecules consists of proteins composed of amino acids, RNA and DNA which are composed of nucleic acids, carbohydrates, and lipids

Proteins are linear chains of amino acids that is in general folded into very specific shapes that is determined by their amino acid sequences.

Source : https://www.thoughtco.com/protein-structure-373563

Shapes determine their functions like structural support, biochemical catalysis, hormones, enzymes, and initiators of cellular death.

Amino acids, the building blocks of proteins

General structure of amino acids:

MoleculePlot[MoleculeModify[Molecule["[NH2][CH](*)C(=O)[OH]"],{"ReplaceAtom",3->Atom["R"]}],<|"α Carbon"->Style[2,],"Carboxyl group"->Style[MoleculePattern["[C](=[O])[O][H]"],],"Amino group"->Style[MoleculePattern["[N]([H])[H]"],],"R group"->3|>,IncludeHydrogens->All]

Most common amino acids:

aminoAcids=EntityList[EntityClass["Chemical", "AminoAcids"]]

bondPatterns=;GraphicsGrid[Partition[MoleculePlot[#,bondPatterns,PlotLabel->#["Name"]][[1]]&/@aminoAcids,UpTo[5]],Frame->All,ImageSize->800]

Visualize the differences in structures based on new property MoleculeFeatureDistance (New in 14.3):

plots=Tooltip[MoleculePlot[#,bondPatterns,ImageSize->60][[1]],#]&/@aminoAcids;
association=AssociationThread[plots,aminoAcids];ctNew=ClusteringTree[association,DistanceFunction->MoleculeFeatureDistance,ImageSize->550]

Common nucleic acids (bases)

GraphicsGrid[Partition[MoleculePlot[Molecule[#],PlotLabel->#]&/@{"Adenine","Thymine","Guanine","Cytosine","Uracil"},UpTo@3]]

Common carbohydrates

From a molecular perspective, a carbohydrate is an organic compound composed primarily of carbon, hydrogen, and oxygen atoms. For simple sugars typically in a 1:2:1 ratio (Cn(H2O)n), and act as the main energy source for most cells.

Let us visualize the structures of three simple sugars glucose, fructose and galactose with same chemical formula but different arrangements of atoms:

ChemicalFormula[Molecule[#]]&/@{"Glucose","Fructose","Galactose"}

bondPattern=<|"Carbonyl group"->Style[MoleculePattern["[C](=[O])"],],"Hydroxy group"->Style[MoleculePattern["[C][O][H]"],]|>;

GraphicsRow[MoleculePlot[Molecule[#],bondPattern,PlotLabel->#,PlotLegends->None][[1]]&/@{"Glucose","Fructose","Galactose"}]

Common lipid

{MoleculePlot[Molecule["Cholesterol"]],MoleculePlot3D[Molecule["Cholesterol"]]}

BioMolecule, its properties and BioMoleculePlot3D

Let us analyze the structure of Human Hyaluronidase-1, enzyme that breaks the carbohydrate Hyaluronan in our body, and is involved in tumor suppression.

Let us obtain the biomolecular structure using the PDB ID 2PE4:

hyaluronidase=BioMolecule[(ExternalIdentifierURL[ExternalIdentifier["PDBStructureID","2PE4"], "PDB structure", "2PE4", https://rdf.wwpdb.org/pdb/2PE4])]

Visualize the biomolecule using BioMoleculePlot3D:

BioMoleculePlot3D[hyaluronidase]

Use a different PlotTheme and color to see the ligands better:

BioMoleculePlot3D[hyaluronidase,PlotTheme->"GaussianSurface",ColorRules->{_->Lighter[Blue,0.6]}]

New BioMolecule properties

Let us visualize the Ramachandran plot and protein contact map using the RamachandranAngles and ResidueDistanceMatrix (new in Version 14.3) properties that BioMolecule now offers:

ListPlot[Echo@hyaluronidase["RamachandranAngles"],AspectRatio->1,PlotRange->{{-180,180},{-180,180}},Frame->True,FrameLabel->{"ϕ","ψ"}]

MatrixPlot[QuantityMagnitude[Echo@hyaluronidase["ResidueDistanceMatrix"]],FrameTicks->All,PlotLegends->Automatic]

All properties of the biomolecule

Column@hyaluronidase["Properties"]

Structurally align two biomolecules with BioMoleculeAlign (new in Version 14.3)

We know, similar sequences leads to similar structures. Let us compare the same protein, myoglobin from two different organisms. Here we compare whale myoglobin (PDB ID 101M) and horse heart myoglobin (PDB ID 1AZI):

whaleMyoglobin=BioMolecule[(ExternalIdentifierURL[ExternalIdentifier["PDBStructureID","101M"], "PDB structure", "101M", https://rdf.wwpdb.org/pdb/101M])];
horseMyoglobin=BioMolecule[(ExternalIdentifierURL[ExternalIdentifier["PDBStructureID","1AZI"], "PDB structure", "1AZI", https://rdf.wwpdb.org/pdb/1AZI])];MapThread[BioMoleculePlot3D[#,PlotLabel->#2]&,{{whaleMyoglobin,horseMyoglobin},{"Whale myoglobin","Horse heart myoglobin"}}]

Let us structurally align the two biomolecules:

horseAligned=BioMoleculeAlign[whaleMyoglobin,horseMyoglobin,Automatic,All];

Head@horseAligned

Column@Keys@horseAligned

plotColors={Lighter@Red,Lighter@Gray};
Show[
BioMoleculePlot3D[whaleMyoglobin,ColorRules->{_->plotColors[[1]]},PlotLegends->SwatchLegend[plotColors,{"Whale myoglobin","Horse heart myoglobin"},LegendMarkers->"Bubble"]],
BioMoleculePlot3D[horseAligned["BioMolecule"],ColorRules->{_->plotColors[[2]]}]
]

Let us see the differences in the sequences:

Diff[whaleMyoglobin["BioSequences"][[1]],horseMyoglobin["BioSequences"][[1]],"CharacterAlignment"]

Let us see all the information offered by BioMoleculeAlign:

horseAligned

horseAligned["SequenceCharacterAlignment"]

horseAligned[[{"TMScore","RMSError"}]]

Very high TMScore and low RMSError (<1 Å) shows excellent alignment.

Compare predicted structure (ESMFold) vs experimental ones:

predicted=BioMolecule[Echo@whaleMyoglobin["BioSequences"][[1]]]

aligned=BioMoleculeAlign[whaleMyoglobin,predicted]

Show[
BioMoleculePlot3D[whaleMyoglobin,ColorRules->{_->plotColors[[1]]},PlotLegends->SwatchLegend[plotColors,{"Experimental","Predicted"},LegendMarkers->"Bubble"]],
BioMoleculePlot3D[aligned,ColorRules->{_->plotColors[[2]]}]
]

You can now locally fold proteins using BioMoleculeFoldingMethod option in BioMolecule

Service connections: Accessing external databases

3 service connections give access to >1B protein structures!

Users now have access to:

All experimental structures in RCSB Protein Data Bank (Documentation), one of the best sources for experimental structures

772 million predicted structures in the ESM Metagenomic Atlas (Documentation), one of the best sources for predicted structures of the metagenome

And, new in 14.3

Over 240 million structures in the AlphaFold Protein Structure Database (Documentation), the best source for predicted structures of all organisms most relevant to biology

Create a new connection to the AlphaFold database:

alphafold=ServiceConnect["AlphaFoldDatabase"]

Get the structure of cellular tumor antigen p53 (from TP53 gene), which plays a key role in tumor suppression and mutations are linked to cancer:

tp53=ServiceExecute["AlphaFoldDatabase","BioMolecule",<|"UniProtID"->ExternalIdentifier["UniProtKBAccessionNumber","P04637"]|>]

Visualize the protein:

BioMoleculePlot3D@tp53

Get information about the protein:

ServiceExecute["AlphaFoldDatabase","PredictedStructureDetails",<|"UniProtID"->(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637"], "UniProtKB", "P04637", http://purl.uniprot.org/uniprot/P04637])|>]

Get the Predicted Aligned Error data of a structure:

pae=ServiceExecute["AlphaFoldDatabase","PredictedAlignedErrorData",<|"UniProtID"->(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637"], "UniProtKB", "P04637", http://purl.uniprot.org/uniprot/P04637])|>]

MatrixPlot[pae,PlotLegends->Automatic]

Get the Predicted Local Distance Difference Test (pLDDT) of a protein:

(pLDDT=ServiceExecute["AlphaFoldDatabase","PredictedLocalDistanceDifferenceTest",<|"UniProtID"->(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637"], "UniProtKB", "P04637", http://purl.uniprot.org/uniprot/P04637])|>])//Short

Visualize the pLDDT:

ListLinePlot[pLDDT,AxesLabel->{"Residue ID", "pLDDT"},ImageSize->Medium]

Get the predicted pathogenicity data by AlphaMissense

These are predicted pathogenicity scores (only for human proteins) due to point mutations (substitutions) in amino acids with three possible class (Likely pathogenic, Likely benign, Ambiguous):

pathogenicity=ServiceExecute["AlphaFoldDatabase","AlphaMissensePathogenicity",<|"UniProtID"->(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637"], "UniProtKB", "P04637", http://purl.uniprot.org/uniprot/P04637])|>]

We have the full Alpha Missense data in Wolfram Data Repository for all mutations in one place for large scale analysis of predicted pathogenicities in humans.

Protein isoform data

What is a protein Isoform?

A protein isoform, is a member of a set of highly similar proteins that originate from a single gene and are the result of genetic differences and alternative splicing. (Image and description from Wikipedia)

Cellular tumor antigen p53 has 8 isoforms!

tp53Identifiers={(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637"], "UniProtKB", "P04637", http://purl.uniprot.org/uniprot/P04637]),(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637-2"], "UniProtKB", "P04637-2", http://purl.uniprot.org/uniprot/P04637-2]),(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637-3"], "UniProtKB", "P04637-3", http://purl.uniprot.org/uniprot/P04637-3]),(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637-4"], "UniProtKB", "P04637-4", http://purl.uniprot.org/uniprot/P04637-4]),(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637-5"], "UniProtKB", "P04637-5", http://purl.uniprot.org/uniprot/P04637-5]),(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637-6"], "UniProtKB", "P04637-6", http://purl.uniprot.org/uniprot/P04637-6]),(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637-7"], "UniProtKB", "P04637-7", http://purl.uniprot.org/uniprot/P04637-7]),(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637-8"], "UniProtKB", "P04637-8", http://purl.uniprot.org/uniprot/P04637-8]),(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637-9"], "UniProtKB", "P04637-9", http://purl.uniprot.org/uniprot/P04637-9])};

biomols=ServiceExecute["AlphaFoldDatabase","BioMolecule",<|"UniProtID"->#|>]&/@tp53Identifiers;

plots=MapThread[BioMoleculePlot3D[#,PlotLabel->#2[[2]]]&,{biomols,tp53Identifiers}];

Each Isoform can have different structures

GraphicsGrid[Partition[plots,UpTo@3]]

And different sequence:

Diff[biomols[[1]]["BioSequences"][[1]],biomols[[2]]["BioSequences"][[1]],"CharacterAlignment"]

Protein Sequence Data (new in 14.3)

Users will have access to:

Around 200 million protein sequence data in UniProt (Documentation)

ServiceConnect["UniProt"]

ServiceExecute["UniProt","ProteinDetails",<|"UniProtID"->(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","P04637"], "UniProtKB", "P04637", http://purl.uniprot.org/uniprot/P04637])|>]

Get information about protein sequences related to a plain text query:

ServiceExecute["UniProt","ProteinSearch",<|"Query"->"Receptor Tyrosine Kinase",MaxItems->30|>]

Protein Domain Data (upcoming in 15.0)

A protein domain is a region of a protein’s polypeptide chain that is self-stabilizing and that folds independently from the rest. Each domain forms a compact folded three-dimensional structure and most likely has important biological functions. (Image and Text From Wikipedia)

Pyruvate Kinase

Two service connections will provide users access to:

All 151 million protein domains classified into 6,573 superfamilies from experimental protein structures in CATH Database

365 million structural domains in 214 million predicted structures in the AlphaFold Database through The Encyclopedia of Domains

CATHDatabase (Experimental structures)

Domain information

ServiceConnect["CATHDatabase"]

Get the BioMolecule corresponding to the Glutamine synthetase, N-terminal domain. Glutamine synthetase catalyzes the conversion of glutamate and ammonia to glutamine, playing a key role in nitrogen metabolism:

biomol=ServiceExecute["CATHDatabase","BioMolecule",{"DomainID"->ExternalIdentifier[
  "CATHDomainID", "4acfA01"]}]

BioMoleculePlot3D@biomol

Get details about the specific domain:

details=ServiceExecute["CATHDatabase","DomainSummary",{"DomainID"->(ExternalIdentifierURL[ExternalIdentifier["CATHDomainID","4acfA01"], "CATH domain", "4acfA01", https://www.cathdb.info/version/latest/domain/4acfA01])}]

Highlight the domain in the full protein structure:

details["COMBSSegments"]

pdbID=Normal@details["COMBSSegments"][[1,"PDBCode"]];
chains=Normal@details["COMBSSegments"][[1,"ChainCode"]];
start=Normal@details["COMBSSegments"][[1,"Start"]];
stop=Normal@details["COMBSSegments"][[1,"Stop"]];
colorRules=Join[{"A",#}->Lighter@Red&/@Range[start,stop],{_->Lighter@Gray}];
BioMoleculePlot3D[Echo@pdbID,ColorRules->colorRules]

Protein SuperFamilies

A protein superfamily is defined as a group of proteins that share similar structures and functions.

Get a list of all (~6600) protein superfamilies in the CATHDatabase:

superFamilies=ServiceExecute["CATHDatabase","SuperFamilies",{}]

Get a list of all protein domains belonging to a specific superfamily:

ServiceExecute["CATHDatabase","SuperFamilyDomains",{"CATHID"->(ExternalIdentifierURL[ExternalIdentifier["CATHSuperfamilyID","1.10.8.10"], "CATH superfamily", "1.10.8.10", https://www.cathdb.info/version/latest/superfamily/1.10.8.10])}]

CATHSOLID ID is further classification of a protein superfamily based on sequence similarity and each domain has an unique CATHSOLID ID.

Search for domains using sequence

Get information about the domains associated with a specific amino acid sequence. Here we search for a sequence found in a protein in the ESM Metagenomic Atlas which is similar to known protein structures in nature:

seq=ServiceExecute["ESMAtlas","Sequence",{"MGnifyID"->"MGYP003566250623"}]

searchResults=ServiceExecute["CATHDatabase","DomainSearch",{"BioSequence"->seq}]

Users can also get information about functional families

EncyclopediaOfDomains (Predicted structures)

All 365 million structural domains in 214 million predicted structures in the AlphaFold Database through The Encyclopedia of Domains

ServiceConnect["EncyclopediaOfDomains"]

Find domains in human phospholipase D1, implicated in numerous cellular pathways, including signal transduction, membrane trafficking, and the regulation of mitosis.

domains=ServiceExecute["EncyclopediaOfDomains","Domains",{"UniProtID"->(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","Q13393"], "UniProtKB", "Q13393", http://purl.uniprot.org/uniprot/Q13393])}]

Get the biomolecule from AlphaFold Database:

biomolecule=ServiceExecute["AlphaFoldDatabase","BioMolecule",<|"UniProtID"->(ExternalIdentifierURL[ExternalIdentifier["UniProtKBAccessionNumber","Q13393"], "UniProtKB", "Q13393", http://purl.uniprot.org/uniprot/Q13393])|>]

Visualize the domains in the structure

cathIDs=Normal@domains[[All,2]]

seqRanges=Normal@domains[[All,4]];

ranges=Flatten@MapApply[Range,#]&/@seqRanges;
colors=ColorData["Rainbow"][#]&/@Rescale@Range@Length@ranges;

colRules=Join[Flatten@Table[Table[{"A",j}->colors[[i]],{j,ranges[[i]]}],{i,Length@ranges}],{_->Lighter@Gray}];

Legended[BioMoleculePlot3D[biomolecule,ColorRules->colRules],SwatchLegend[colors,cathIDs,LegendMarkers->"Bubble"]]

Dedication

I would like to dedicate this talk to Michael Trott (1959-2025), who was an incredible mentor and was one of the kindest and smartest human beings I have met. It is rare to come across someone who has touched so many people’s live in such a positive and meaningful way, and I am fortunate to have known him during my short time at Wolfram. He continues to inspire me to be a better thinker, and a kinder human being.

Acknowledgements

I would like to thank Jason Biggs and the Wolfram Alpha Chemistry and Biology team for their help and support in making this talk.

Questions, ideas or suggestions

Feel free to email me with any questions/ideas/request for talk to learn more about our work at souticks@wolfram.com