Path B - Module 32: Visualizing Interaction Matrices#
Identifying contacts in a table is useful, but seeing them in a Matrix Plot is transformative. For an industrial enzyme, you want to see if the plastic substrate is interacting with the entire active site cleft or just a few residues.
In this module, you will learn to use show_contacts() to generate a visual heatmap of the binding interface.
import molsysmt as msm
from molsysmt import systems
# Load our engineered complex (Enzyme + BHET substrate)
petase = msm.convert('pdb:6EQE', to_form='molsysmt.MolSys', selection='molecule_type=="protein"')
bhet = msm.convert('C1=CC(=CC=C1C(=O)OCCO)C(=O)OCCO', from_form='string:smiles', to_form='molsysmt.MolSys')
molsys = msm.merge([petase, bhet])
1. The Interaction Heatmap#
The function show_contacts() generates a plot where each pixel represents the distance between an atom of the protein and an atom of the substrate. Darker areas mean closer interaction.
# Generate the contact plot
msm.structure.show_contacts(molsys, selection='molecule_type=="small molecule"',
selection_2='molecule_type=="protein"', threshold='0.6 nm')
2. Identifying Interaction Clefts#
In the PETase, the active site is an open cleft. Look for the residues that appear as “bands” in the plot: those are the ones providing the stabilization for the plastic monomer.
3. Comparing Wild-type vs Mutant Contacts#
In a real engineering project, you would plot both systems side-by-side to see if your mutation created new contact points.
🏆 Path B Challenge: The Heatmap Analyst#
Change the
elementto'group'in theshow_contactsfunction to get a residue-residue matrix instead of atom-atom.Identify the top 5 residues with the strongest signal in the plot.
Use
msm.get_label()on those indices to verify their biological identity.
You now have a powerful tool for reporting! In Module 33, we will calculate global metrics like the Radius of Gyration to see if our enzyme became more compact.