Skip to content
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

Possible bug in DepictionGenerator aromatic display #1057

Closed
JonasSchaub opened this issue Mar 13, 2024 · 1 comment · Fixed by #1059
Closed

Possible bug in DepictionGenerator aromatic display #1057

JonasSchaub opened this issue Mar 13, 2024 · 1 comment · Fixed by #1059

Comments

@JonasSchaub
Copy link
Contributor

Dear all,
when I depict the structure encoded by the SMILES code "cc(c)C" using DepictionGenerator, I get this output:
aromatic-fragment
I know, the structure "makes no sense" and cannot be kekulized but it is a fragment we get from a substructure analysis and the information that these three carbon atoms are aromatic should be preserved. If I remove the one aliphatic carbon ("ccc"), I get this structure with aromatic display:
aromatic-fragment
This structure with the aliphatic carbon as a substituent on one of the aromatic carbons is what I would expect for the first structure as well.

What do you think about this?

Here is my full example code:

String smilesCode = "cc(c)C";
SmilesParser smiPar = new SmilesParser(DefaultChemObjectBuilder.getInstance());
smiPar.kekulise(false);
IAtomContainer container = smiPar.parseSmiles(smilesCode);
DepictionGenerator generator = new DepictionGenerator().withAromaticDisplay().withSize(512, 512).withFillToFit();
generator.depict(container).writeTo("aromatic-fragment.png");
@johnmay
Copy link
Member

johnmay commented Mar 13, 2024

Agree - will take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants