We are using PyRosetta 2.83 to identify hydrogen bonds between atoms. For example, take the following code:
pose = pose_from_pdb("/Users/kmolloy/Downloads/2ezk.pdb") hbond_set = pose.get_hbonds() hbond_set.show(pose, 5) hbond_set.show(pose,7)
This results of running this code are shown below:
#Dch Dn Dres Da Ach An Ares Aa length AHDang BAHang BAtor weight energy #A 82 LEU N A 80 PRO O 2.41 117.2 108.5 -140.3 1.000 -0.025 #Dch Dn Dres Da Ach An Ares Aa length AHDang BAHang BAtor weight energy #A 82 LEU N A 80 PRO O 2.41 117.2 108.5 -140.3 1.000 -0.025
However, the distance between the N (from res #82) atom and the O atom (from res #80) is NOT 2.41. However, the distance between the H atom in res #82 and the O atom in res #80 is 2.41. Iterating through the hond_set shows that this pattern continues.
Interestied if I am interpretting this correctly, since the distances and atoms seem to be mismatched.
The methods that calculate the distance is more clear:
A peculiarity is that the donor atom index does not seem to have a getter method as most calculations are off the base_atom of the acceptor. For the first point:
don_hatm is the hydrogen atom (not heavy atom) and one has to get it manually
The getter methods that require a pose ( 'get_AHDangle', 'get_BAHangle', 'get_BAtorsion', 'get_HAdist') have A for acceptor, H for hydrogen and B.
I had a gander in `HBondSet.cc` and found out it is for Base atom of the acceptor atom not Bonded atom of the donor's hydrogen (i.e. the donor atom). Hence why get_AHDangle and a get_BAHangle are different and give different values.