-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enumerate input molecule with tautomers #1780
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the same issue as in enumerate_protomers
(#1779) pops up here (see suggestions), though I haven't actually found a molecule that doesn't return itself. Also need to remove the +1 from max states in OpenEye and update a docstring here or there.
Does tautomer have a different meaning in cheminformatics than in ochem? I couldn't come up with any keto-enol tautomerisation with this, which I thought was, like, THE tautomerisation.
Notebook I messed around in for posterity: tautomers.zip
@@ -945,16 +949,13 @@ def enumerate_tautomers( | |||
tautomer_options.SetCarbonHybridization(False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- tautomer_options.SetMaxTautomersGenerated(max_states + 1)
+ tautomer_options.SetMaxTautomersGenerated(max_states)
No longer need to generate an extra state so we can drop the input.
self, | ||
molecule: "Molecule", | ||
max_states: int = 20, | ||
) -> list["Molecule"]: | ||
""" | ||
Enumerate the possible tautomers of the current molecule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enumerate the possible tautomers of the current molecule | |
Enumerate some possible tautomers of the current molecule |
molecules: List[openff.toolkit.topology.Molecule] | ||
A list of openff.toolkit.topology.Molecule instances excluding the input molecule. | ||
molecules: list[openff.toolkit.Molecule] | ||
A list of openff.toolkit.Molecule instances excluding the input molecule. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A list of openff.toolkit.Molecule instances excluding the input molecule. | |
A list of openff.toolkit.Molecule instances, including the input molecule unless it is pruned by the ``max_states`` argument. |
) -> List["Molecule"]: | ||
self, | ||
molecule: "Molecule", | ||
max_states: int = 20, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could go bigger than 20 if we wanted!
molecules: List[openff.toolkit.topology.Molecule] | ||
A list of openff.toolkit.topology.Molecule instances not including the input molecule. | ||
molecules: list[openff.toolkit.Molecule] | ||
A list of openff.toolkit.Molecule instances including the input molecule. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A list of openff.toolkit.Molecule instances including the input molecule. | |
A list of openff.toolkit.Molecule instances including the input molecule unless it has been pruned by the ``max_states`` argument. |
self, | ||
molecule: "Molecule", | ||
max_states: int = 20, | ||
) -> list["Molecule"]: | ||
""" | ||
Enumerate the possible tautomers of the current molecule. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enumerate the possible tautomers of the current molecule. | |
Enumerate some possible tautomers of the current molecule. |
@@ -12,6 +12,8 @@ Releases follow the `major.minor.micro` scheme recommended by [PEP440](https://w | |||
|
|||
### Behavior changes | |||
|
|||
- [PR #17XX](https://github.com/openforcefield/openff-toolkit/pull/17XX): `Molecule.enumerate_tautomers` now includes the input molecule in the returned list. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [PR #17XX](https://github.com/openforcefield/openff-toolkit/pull/17XX): `Molecule.enumerate_tautomers` now includes the input molecule in the returned list. | |
- [PR #1780](https://github.com/openforcefield/openff-toolkit/pull/1780): `Molecule.enumerate_tautomers` now includes the input molecule in the returned list. |
Suggestion #2 in #1464 (comment)