Skip to content

Have a min_mass for HydrogenBondAnalysis.guess_hydrogens #2472

@lilyminium

Description

@lilyminium

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions