Path C - Module 32: Visualizing Interaction Matrices#
To communicate your drug design results, you need clear visuals. In this module, you will learn to generate an interaction matrix plot between the viral protease and the inhibitor.
import molsysmt as msm
import matplotlib.pyplot as plt
molsys = msm.convert('pdb:6LU7', to_form='molsysmt.MolSys')
# Contact matrix between the inhibitor and the protease
contact_map = msm.structure.get_contacts(molsys, selection='molecule_type=="small molecule"',
selection_2='molecule_type=="protein"', threshold='0.5 nm')
figure, axis = plt.subplots()
axis.imshow(contact_map[0].astype(int), origin='lower', interpolation='nearest', aspect='auto')
axis.set_xlabel('Protease atom index')
axis.set_ylabel('Inhibitor atom index')
plt.show()