Visualizing Protein-Ligand Maps new

Problem

You would like to generate one image that contains all of the maps that represent protein-ligand information. See example in Figure 1.

Figure 1. Example of depicting the various maps of 2A1B complex

../_images/activesitemaps2img-pdb1a1b.svg

Ingredients

  • OEChem TK - cheminformatics toolkit (including OEBio TK)
  • OEDepict TK - molecule depiction toolkit
  • Grapheme TK - molecule and property visualization toolkit

Difficulty level

../_images/chilly6.png

Solution

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
def depict_activesite_maps(image, protein, ligand):

    # perceive interactions

    asite = oechem.OEInteractionHintContainer(protein, ligand)
    if not asite.IsValid():
        oechem.OEThrow.Fatal("Cannot initialize active site!")
    asite.SetTitle(ligand.GetTitle())

    oechem.OEPerceiveInteractionHints(asite)

    # depiction

    oegrapheme.OEPrepareActiveSiteDepiction(asite)
    oegrapheme.OERenderActiveSiteMaps(image, asite)

Download code

activesitemaps2img.py

Usage:

prompt > wget https://files.rcsb.org/download/1ywr.pdb
prompt > python3 activesitemaps2img.py -complex 1ywr.pdb -out 1ywr.svg

Note

The generated interactive svg images should be included into and HTML page with the SVG MIME type.

<object data="<imagename>.svg" type="image/svg+xml"></object>

Discussion

OEGrapheme TK currently visualizes protein-ligand information in four different maps.

See also in OEChem TK manual

Theory

API

See also in OEDepict TK manual

Theory

API

See also in GraphemeTM TK manual

API