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 the getFragments method, it returns the expected fragments with the right saturation. So this occurs only when extracting fragments as containers.
Code to replicate
IFragmenter fragmenter = new ExhaustiveFragmenter();
SmilesParser tmpSmiPar = new SmilesParser(SilentChemObjectBuilder.getInstance());
SmilesGenerator tmpSmiGen = new SmilesGenerator((SmiFlavor.UseAromaticSymbols));
IAtomContainer tmpOriginalMolecule = tmpSmiPar.parseSmiles(
// DL-Phenylalanin CID 994
"C1=CC=C(C=C1)CC(C(=O)O)N");
fragmenter.generateFragments(tmpOriginalMolecule);
String[] smilesFragments = fragmenter.getFragments();
IAtomContainer[] atomContainerFragments = fragmenter.getFragmentsAsContainers();
System.out.println("Fragments as SMILES:");
for (String fragment : smilesFragments) {
System.out.println(fragment);
}
System.out.println("Fragments as containers:");
for (IAtomContainer container : atomContainerFragments) {
System.out.println(tmpSmiGen.create(container));
}
the above, results in the following output:
Fragments as SMILES:
O=C(O)C(N)C
c1ccccc1
NCCc1ccccc1
c1ccc(cc1)C
Fragments as containers:
C[CH2]([CH](=O)O)N
c1ccccc1
C([CH3][cH]1ccccc1)N
C[cH]1ccccc1
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 thegetFragmentsmethod, 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: