Visualizing Protein-Ligand Maps new

Problem

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

Figure 1. Example of depicting the various protein-ligand 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

Download

Download code

activesitemaps2img.py

See also Usage subsection.

Solution

The depict_activesite_maps function illustrates how simple it is to generate these images.

  1. First the OEInteractionHintContainer object is constructed that stores information about possible interactions between the ligand and the protein.
  2. The interactions are perceived by calling the OEPerceiveInteractionHints function.
  3. The active site is then prepared for 2D depiction by invoking the OEPrepareActiveSiteDepiction function.
  4. When the OE2DActiveSiteDisplay object is constructed, residues are positioned around the ligand close to those atoms which they are interacting with.
  5. The OERenderActiveSiteMaps function generates a multi-tab interactive image.
def depict_activesite_maps(image, protein, ligand):
    """
    :type image: oedepict.OEImageBase
    :type protein: oechem.OEMolBase
    :type ligand: oechem.OEMolBase
    """

    # 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)

Usage

Usage

activesitemaps2img.py

The following commands will generate the image shown in Figure 1.

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

Command Line Parameters

Simple parameter list
    -height : Height of output image
    -width : Width of output image

    SplitMolComplex options :
      -covalentligand : Split covalent ligands
      -ligandname : Ligand name

    input/output options :
      -complex : Input filename of the protein-ligand complex
      -protein : Input filename of the protein
      -ligand : Input filename of the ligand
      -out : Output filename of the generated image

Discussion

OERenderActiveSiteMaps 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