-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WaterBridgeAnalysis can't seem to do (Acceptor <-> WAT <-> WAT <-> Acceptor) water bridges? #4040
Comments
While looking through the MDAnalysis.log file it appears that selection2_type is ignored when selection1_type is set. ie. It appears that selection 2 and selection 1 are inverse of each other. For most cases this makes sense. However, for second order water bridges an Acceptor <-> WAT <-> WAT <-> Acceptor is perfectly reasonable. Perhaps there is a method to overrule this behaviour and I didn't do it properly. |
@xiki-tempula as you're the orginal author of the wbridge code, can you have a look at this question/issue please? Thanks! |
@Pwnus Thanks for the issue. I will have a look in the weekends. I wonder why do you do |
Hi @xiki-tempula, for me distance_type = 'heavy' is just a convention. Our usual analysis software of choice ,cpptraj from Ambertools2021, defaults to heavy atom distances and I've grown accustomed to it as a measure. |
I can reproduce the problem. Let me have a look. |
Ok, I found out why this failed.
So the code only checks for three cases, So when it sees |
Ok, there is another thing. Sorry if the doc is not very clear but However, the
Gives |
This is also fixed in #4066
|
Thank you xiki-tempula I've made notes to myself for that little "gotcha" to look out for when running this type of analysis and the correct options to ask for. Thank you for the solution :) It'll be highly valuable to me and my lab-mates. |
@pwnusmaximus Please don't close the issue yet as we still need to merge the fix for the distance_type = 'heavy' |
My mistake, I've re-opened the issue, |
…4066) * fix #4040 and #4136 * ensure that for distance_type == 'heavy' all possible hydrogens are taken into account when analyzing H-bonds; previously, only one connected H was considered and that could lead to incorrect results and IndexErrors * ensure that WaterBridgeAnalysis ONLY accepts distance_type 'heavy' or 'hydrogen' (anything else now raises ValueError) * add tests * update CHANGELOG * Long explanation (see also PR #4066) In water bridge analysis, in the distance_type = 'hydrogen' mode, I get the pair index (hydrogen bond hydrogen atom and acceptor) and the pair distance from the distance search. Then for each hydrogen atom bonded to the donor heavy atom, I check the angle between the hydrogen bond donor heavy atom, the hydrogen atom and the acceptor and map the index to the pair distance. This works because the distance is computed based on the hydrogen atom and we map the hydrogen atom index back to the distance. In the distance_type = 'heavy' mode, In the original code, I get the pair index (hydrogen bond donor heavy atom and acceptor) and the pair distance from the distance search. Then for each hydrogen atom bonded to the donor heavy atom, I check the angle between the hydrogen bond donor heavy atom, the hydrogen atom and the acceptor. In this case, I cannot map back to the pair distance, as the distance search is done on the heavy atom and we are mapping the index of the hydrogen atom back to the distance. This PR fixes the issue. Co-authored-by: Irfan Alibay <[email protected]> Co-authored-by: Oliver Beckstein <[email protected]>
Expected behavior
I want to quantify a second order water bridge (two waters between a protein residue (resid 43 and name OD2) and a DNA nucleotide (resid 230 and name P). I would like a time series of the presence of these bonds.
resid 43 = resname ASP
resid 230 = resname DA
Troubleshooting thus far
Notably, selection two is a phosphorus atom. (not a usual hydrogen bond acceptor atom) I know this 'P' isn't in any standard library so I added it with the "acceptors" keyword in addition to forcing selection2_type to be an acceptor. I tried troubleshooting by enlarging the acceptable ranges for angle and distance, and even manually specifying every donor and acceptor used in the interaction in-case any were not in the default atom mask libraries. I also played with using resid, resname or simply atom masks to see if the selection was the issue. I tried on a full trajectory and truncated trajectories where I've manually extracted the frames with water bridges present.
I've verified visually in pymol that the water bridge is indeed present and within spec for the identities, angles and distances I used.
Actual behavior
you can see on the last line no hydrogen bonds are identified.
I've opened up the 'w' dataframe and confirmed that the universe was created successfully and that the correct acceptors and donors are listed.
Code to reproduce the behavior
Current version of MDAnalysis
Attached files:
2w35-DL-HID-rep2-500ns-10frames.zip
2w35-DL-HID.zip
MDAnalysis.log
The text was updated successfully, but these errors were encountered: