Path A - Module 32: Visualizing Interaction Matrices#

A picture is worth a thousand indices. While lists of neighbors are useful for calculation, Interaction Matrices are the best way to understand the binding pattern of your therapeutic peptide.

In this module, you will learn to generate instant contact plots using MolSysMT.

import molsysmt as msm
from molsysmt import systems

# Load our complex (no need for water this time to make the plot cleaner)
fibril = msm.convert('pdb:2BEG', to_form='molsysmt.MolSys')
peptide = msm.build.build_peptide('KLVFF')
molsys = msm.merge([fibril, peptide])

1. Generating an Instant Contact Map#

The function show_contacts() creates a plot of the distances between two selections. It is built on top of Matplotlib but you don’t need to write any plotting code.

# Plot contacts between the peptide and the first chain of the fibril
msm.structure.show_contacts(molsys, selection='molecule_type=="peptide"', 
                            selection_2='chain_index==0', threshold='0.6 nm')

2. Identifying Hotspots#

In the plot above, the dark areas represent close contacts. Look for the diagonal patterns or clusters: those are your Interaction Hotspots. These are the residues you should target to improve the peptide’s affinity.

3. All-vs-All Contacts#

You can also use this tool to see the internal organization of the fibril by plotting the contacts of the protein against itself.

# Internal structure of the A-beta fibril (showing the beta-sheet arrangement)
msm.structure.show_contacts(molsys, selection='molecule_type=="protein"', 
                            threshold='0.5 nm')

🏆 Path A Challenge: The Map Reader#

  1. Generate a contact map between the peptide and Chain 2 of the fibril.

  2. Increase the threshold to 1.0 nm and observe how the map changes.

  3. Try to use element='group' in the show_contacts function to see if it provides a cleaner, residue-level view.

Visualizing interactions is key for reporting results. In Module 33, we will look at Ensemble Descriptors: global metrics like the Radius of Gyration and RMSF to study the flexibility of your system.