Function Repository Resource:

ProteinImageString

Source Notebook

Visualize text with letters represented by protein structures

Contributed by: Soutick Saha

ResourceFunction["ProteinImageString"][string]

takes a string and returns a visualization where letters are represented by protein structures.

Details and Options

Representation exists only for capital letters in the English alphabet and spaces. Lowercase letters are capitalized and all unsupported characters are converted to spaces.
The images for the alphabets are generated using BiomoleculePlot3D of the Wolfram ProteinVisualization paclet and the PDB IDs of the proteins are taken from M. Howarth, Say it with proteins: an alphabet of crystal structures, Nat Struct Mol Biol 22, 349 (2015).

Examples

Basic Examples (1) 

Visualize "WOLFRAM" with protein structures:

In[1]:=
ResourceFunction["ProteinImageString"]["WOLFRAM"]
Out[1]=

Scope (2) 

Space can be inserted between words:

In[2]:=
ResourceFunction["ProteinImageString"]["Proteins are fascinating", ImageSize -> 700]
Out[2]=

Longer strings can be split into multiple lines using "\n". Here is an example:

In[3]:=
ResourceFunction[
 "ProteinImageString"]["The quick brown fox\njumps over the lazy dog",
  ImageSize -> {Automatic, 70}]
Out[3]=

Neat Examples

In[4]:=
is = 500;
GraphicsColumn[{ResourceFunction["ProteinImageString"]["Proteins", ImageSize -> {Automatic, is}], ResourceFunction["ProteinImageString"]["The language of life", ImageSize -> {Automatic, is/2}]}, ImageSize -> 600]
Out[5]=

Publisher

WolframChemistry

Version History

  • 1.0.0 – 10 June 2024

Source Metadata

Related Resources

License Information