Binding Pocket Isolation#
Extracting binding sites and computing contact geometries around ligands using spatial selections.
Characterizing the micro-environment surrounding a bound ligand is a core task in structure-based drug discovery and enzymatic mechanism studies. Instead of writing custom loops over pairwise atomic distances, MolSysMT allows you to extract active site residues with concise spatial query expressions.
In this recipe, we extract the binding cavity surrounding the Benzene ligand in T4 Lysozyme L99A, inspect its residue composition, and compute contact distances.
Added in version 1.0.0.
Loading Complex#
We load the T4 Lysozyme L99A complex containing the buried Benzene ligand (BNZ):
import molsysmt as msm
# Load complex
molsys = msm.convert(msm.systems['T4 lysozyme L99A']['181l.h5msm'], to_form='molsysmt.MolSys')
msm.info(molsys)
| form | n_atoms | n_groups | n_components | n_chains | n_molecules | n_entities | n_waters | n_ions | n_small_molecules | n_proteins | n_structures |
|---|---|---|---|---|---|---|---|---|---|---|---|
| molsysmt.MolSys | 1441 | 302 | 141 | 6 | 141 | 5 | 136 | 2 | 2 | 1 | 1 |
Spatial Selection#
We select all protein residues that have at least one atom within 0.5 nm of the Benzene molecule:
# Spatial selection query
pocket_query = 'molecule_type=="protein" within 0.5 nm of group_name=="BNZ"'
# Extract pocket subsystem
pocket = msm.extract(molsys, selection=pocket_query)
# Inspect pocket residues
residue_names = msm.get(pocket, element='group', name=True)
residue_ids = msm.get(pocket, element='group', id=True)
print(f"Binding pocket contains {len(residue_names)} residues:")
for r_name, r_id in zip(residue_names, residue_ids):
print(f" - {r_name} {r_id}")
Binding pocket contains 12 residues:
- ILE 78
- LEU 84
- VAL 87
- TYR 88
- LEU 91
- ALA 99
- MET 102
- VAL 103
- VAL 111
- LEU 118
- LEU 121
- PHE 153
Ligand Center#
We compute the spatial center of the ligand and inspect its coordinates:
# Compute spatial center of the Benzene ligand
ligand_center = msm.structure.get_center(molsys, selection='group_name=="BNZ"')
print(f"Benzene geometric center (nm): {ligand_center[0][0]}")
Benzene geometric center (nm): [2.6911333401997886 0.6126166681448618 0.4178999960422516] nanometer
Extracting Pocket#
The isolated pocket subsystem retains its native topology, 3D coordinates, and element metadata, making it directly exportable:
# Export isolated pocket and ligand
pocket_and_ligand = msm.extract(molsys, selection=f'({pocket_query}) or group_name=="BNZ"')
msm.info(pocket_and_ligand)
| form | n_atoms | n_groups | n_components | n_chains | n_molecules | n_entities | n_small_molecules | n_proteins | n_structures |
|---|---|---|---|---|---|---|---|---|---|
| molsysmt.MolSys | 43 | 13 | 2 | 2 | 2 | 2 | 1 | 1 | 1 |
Viewing Isolated Pocket#
We visualize the isolated active site surrounding the ligand in 3D:
msm.view(pocket_and_ligand)
See also
Selection syntaxes: MolSysMT selection syntax and spatial operators.
molsysmt.basic.extract(): Subsetting molecular systems by selection.molsysmt.structure.get_center(): Calculating geometric centers of groups and molecules.