Visualizing Protein-Ligand Maps
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
Ingredients
|
Difficulty level
Download
Solution
The depict_activesite_maps function illustrates how simple it is to generate these images.
First the OEInteractionHintContainer object is constructed that stores information about possible interactions between the ligand and the protein.
The interactions are perceived by calling the OEPerceiveInteractionHints function.
The active site is then prepared for 2D depiction by invoking the OEPrepareActiveSiteDepiction function.
When the OE2DActiveSiteDisplay object is constructed, residues are positioned around the ligand close to those atoms which they are interacting with.
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
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:
interaction map (using OERenderActiveSite)
unpaired interaction map (using OERenderUnpairedInteractionMap)
B-factor map (using OERenderBFactorMap)
contact map (using OERenderContactMap)
See also in OEChem TK manual
Theory
Biopolymers chapter
Protein Preparation chapter
API
OEPerceiveInteractionHints function
See also in OEDepict TK manual
Theory
Molecule Depiction chapter
API
OEImage class
See also in GraphemeTM TK manual
API
OE2DActiveSiteDisplay class
OEPrepareActiveSiteDepiction function
OERenderActiveSiteMaps function