First, thanks for this very nice tool, it's been very useful for my work. I think I have found an "edge case" though with the "determine_ctype" function inside Biochemisty.py.
I have being running PyContact on my replicas separately before later combining them.
In the image below are two contacts identified from a merged trajectory (1500 frames each). The only difference between the contact type is that one is labelled "Other" and in the other as a "hydrogen bond". (I have made my own script to process the PyContact output for how I would like the labels to look, which is why the labelling format is non-standard).

Clearly these are the same contact but in one case PyContact labels it a Hbond, and in the other as "Other". When I visualise the trajectory the interactions are clearly very largely "Other" in both trajectories but in a very small number of frames of one trajectory the two residues come into hydrogen bonding distance.
From looking at the determine_ctype function and then the hbondFramesScan function it appears that you need a single frame to have a hydrogen bond to consider the contact type as a hydrogen bond. Can you confirm if this is the case?
To be clear, I'm not requesting you fix this because I appreciate this is kind of a rare edge case, I just want to make sure I understand correctly so I can correctly handle it properly in my analysis.
Thanks!
First, thanks for this very nice tool, it's been very useful for my work. I think I have found an "edge case" though with the "determine_ctype" function inside Biochemisty.py.
I have being running PyContact on my replicas separately before later combining them.
In the image below are two contacts identified from a merged trajectory (1500 frames each). The only difference between the contact type is that one is labelled "Other" and in the other as a "hydrogen bond". (I have made my own script to process the PyContact output for how I would like the labels to look, which is why the labelling format is non-standard).
Clearly these are the same contact but in one case PyContact labels it a Hbond, and in the other as "Other". When I visualise the trajectory the interactions are clearly very largely "Other" in both trajectories but in a very small number of frames of one trajectory the two residues come into hydrogen bonding distance.
From looking at the determine_ctype function and then the hbondFramesScan function it appears that you need a single frame to have a hydrogen bond to consider the contact type as a hydrogen bond. Can you confirm if this is the case?
To be clear, I'm not requesting you fix this because I appreciate this is kind of a rare edge case, I just want to make sure I understand correctly so I can correctly handle it properly in my analysis.
Thanks!