Is your feature request related to a problem? Please describe.
HydrogenBondAnalysis.guess_hydrogens only looks for a maximum mass and minimum charge for hydrogen-like atoms.
|
ag = self.u.select_atoms(selection) |
|
hydrogens_ag = ag[ |
|
np.logical_and( |
|
ag.masses < max_mass, |
|
ag.charges > min_charge |
|
) |
|
] |
However, we know that sometimes the mass guesser will give masses of 0.0 if it can't figure out what a particle is (#2348). This seems like it would lead to a fair few false positives.
Describe the solution you'd like
Have a min_mass keyword, or just don't choose atoms with a mass of 0.0
Describe alternatives you've considered
Making users validate the output of HydrogenBondAnalysis.guess_hydrogens themselves.
Additional context
Add any other context or screenshots about the feature request here.
Is your feature request related to a problem? Please describe.
HydrogenBondAnalysis.guess_hydrogensonly looks for a maximum mass and minimum charge for hydrogen-like atoms.mdanalysis/package/MDAnalysis/analysis/hydrogenbonds/hbond_analysis.py
Lines 268 to 274 in b5cb49f
However, we know that sometimes the mass guesser will give masses of 0.0 if it can't figure out what a particle is (#2348). This seems like it would lead to a fair few false positives.
Describe the solution you'd like
Have a
min_masskeyword, or just don't choose atoms with a mass of 0.0Describe alternatives you've considered
Making users validate the output of
HydrogenBondAnalysis.guess_hydrogensthemselves.Additional context
Add any other context or screenshots about the feature request here.