A common nuisance for hydrogen bonds is selecting the donor atom for each hydrogen. Ideally there could be a convenience function in analysis.hbonds which does this. So the signature would be:
def select_donors(hydrogens, ?????):
?????
return donors
The easiest way to implement this is to use bonds, ie just grab the bonded atom for each hydrogen, but not all topologies will have bonds, so a quick workaround for this too will be needed.
A common nuisance for hydrogen bonds is selecting the donor atom for each hydrogen. Ideally there could be a convenience function in
analysis.hbondswhich does this. So the signature would be:The easiest way to implement this is to use bonds, ie just grab the bonded atom for each hydrogen, but not all topologies will have bonds, so a quick workaround for this too will be needed.