-
Notifications
You must be signed in to change notification settings - Fork 100
Description
Is your feature request related to a problem? Please describe.
Currently, there's no reliable way to determine whether a user has set partial charges for a Molecule object. We can check if the charges are all zero, but that doesn't necessarily mean the user hasn't set them all to zero. If we had a simple API for determining whether user-specified charges are present, we could simplify choices about whether or not to use charges from user-provided molecules.
Describe the solution you'd like
We will have to carefully think through the implications, but one simple approach could be
Moleculecharge fields areNoneif not defined (e.g. because the molecule was programmatically constructed or read from an SDF file that lacks charges)Molecule.partial_charges is not Nonewould be a simple idiom for determining whether charges are present
Describe alternatives you've considered
Currently, the only way to tell if user-specified charges may be present is to check if all charges are zero---something that is not guaranteed to produce the desired result and for which we do not even have a convenience function.
Additional context
I'm trying to determine how we should indicate that user-provided charges should be used in openmm-forcefields: openmm/openmmforcefields#88