dwhswenson / contact_map

Contact map analysis for biomolecules; based on MDTraj
GNU Lesser General Public License v2.1
42 stars 18 forks source link

How are "contacts" defined? #105

Closed victorprincipe closed 3 years ago

victorprincipe commented 3 years ago

Hi Dr. Swenson, I am currently undertaking a Chemistry Master’s project in Dr. Toni Mey’s (@ppxasjsm) group at the University of Edinburgh. I have been using your contact map explorer programme to analyse protein-ligand binding interactions. It’s been a great help in determining which contacts are most common and was also very easy to use. I have a question regarding what constitutes a “contact”. I have read on the documentation that a variety of both inter- and intramolecular contacts are found, but I wasn’t able to figure out how contacts are calculated and assigned. Could you please let me know what is classified as a contact and how they are calculated, or point me in the direction of the documentation? Furthermore, is there any functionality within contact map explorer to show which types of contacts are present? Thanks in advance for your response! Victor

dwhswenson commented 3 years ago

Hi Victor! Contacts in Contact Map Explorer are defined based on a distance cutoff. Two atoms are in contact if they're within some cutoff distance of each other, and two residues are in contact if any pair of atoms (one from each residue) are in contact. We don't include contacts within the same residue or (by default) the 2 nearest neighbors on either side.

Exactly which atoms you consider and what that cutoff distance is are things you can customize. The default behavior is to calculate the contacts between all non-water residues and all heavy (i.e., non-hydrogen) atoms, and to use a cutoff distance of 0.45 nm. If you included hydrogens, you would want a smaller cutoff; if you only used C-alphas, you would want a larger cutoff. You can also change the number of ignored neighbor residues.

Documentation on customizing which atoms you use and adjusting the cutoff or number of ignored neighbors can be found here: ~https://contact-map.readthedocs.io/en/v0.6.0/examples/nb/contact_map.html#Changing-the-defaults~

Update: We changed docs a little. The link above will always work, but is pinned to an old version of the code. Current (11 March 2021) location for this information: https://contact-map.readthedocs.io/en/latest/examples/nb/changing_defaults.html

victorprincipe commented 3 years ago

Hi David, Thank you very much for the quick and detailed response. I was mainly curious about the default behaviour but it's great to see that I can customise these things as well. I'll have a look at the documentation you sent through in case I want to change any parameters. Thanks again for the help!

dwhswenson commented 3 years ago

Furthermore, is there any functionality within contact map explorer to show which types of contacts are present?

(missed this question on the first read) There isn't yet anything to classify contacts as, e.g., hydrogen bonds vs. hydrophobic vs. salt bridge etc. I think that would be an interesting addition, but not something I've had time to implement. There can be some ambiguity for residue-residue contacts because there could be more than one contact per pair of residues (what do you return if there's both a salt bridge and a hydrogen bond?). However, this sort of question was part of the reason for the most_common_atoms_for_contact method.

victorprincipe commented 3 years ago

I've had a look at the most_common_atoms_for_contact method and realised I could use it to personally analyse each contact and see how they could be defined, I was just wondering if this was automated by any chance (but it makes sense that it isn't with the ambiguity, and maybe these things are better left to humans). Thanks again!