-
Notifications
You must be signed in to change notification settings - Fork 169
Exhaustive fragmenter returns oversaturated fragment containers #1119
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
Comments
Thanks will take a look, probably just the container one is reusing atoms. You can probably fix it by calling atom typing/add hydrogens but should clean it up as we go. I actually think it makes more sense to leave the atoms undervalent (radicals) but some might not expect that |
Yes it is as I expected, basically internally it does this before generating each fragment: AtomContainerManipulator.clearAtomConfigurations(frag);
for (IAtom atom : frag.atoms())
atom.setImplicitHydrogenCount(null);
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(frag);
CDKHydrogenAdder.getInstance(frag.getBuilder()).addImplicitHydrogens(frag);
Aromaticity.cdkLegacy().apply(frag); I'll look a bit more if there is an easy fix, like I said you might not like what I think the correct answer is:
or with attachment points:
|
Thank you for your quick response
I also prefer this variant because it lets the user of the CDK decide whether to saturate or not. |
Sure, I think actually you just remove the code I pasted above... perhaps add an option for it though. |
Dear CDK-Developers,
i encountered oversaturated fragments in the exhaustive fragmenter, when extracting the fragments as atom containers via
getFragmentsAsContainers
. In contrast, when extracting the fragments via thegetFragments
method, it returns the expected fragments with the right saturation. So this occurs only when extracting fragments as containers.Code to replicate
the above, results in the following output:
The text was updated successfully, but these errors were encountered: