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

Reaction rendering always shows molecules in aromatic form #2976

Closed
greglandrum opened this issue Feb 28, 2020 · 1 comment · Fixed by #3930
Closed

Reaction rendering always shows molecules in aromatic form #2976

greglandrum opened this issue Feb 28, 2020 · 1 comment · Fixed by #3930
Labels
Milestone

Comments

@greglandrum
Copy link
Member

get2DCoordsForReaction() calls get2DCoordsMol(), which always sanitizes the reactants, agents, and products. There needs to be some control over this so that it's possible to draw reactions in kekule form (if desired).

@greglandrum greglandrum added this to the 2020_03_1 milestone Feb 28, 2020
@greglandrum greglandrum modified the milestones: 2020_03_1, 2020_09_1 Mar 29, 2020
@ChongLu121
Copy link

Hello,

I'd like to draw reactions in kekule form. Do you have any solution to convert the dashed line to kekulized ring?

rxn = AllChem.ReactionFromSmarts('CN.OC(=O)CCC1C2=C(C=CC=C2)C2=C1C=CC=C2>>CNC(=O)CCC1C2=C(C=CC=C2)C2=C1C=CC=C2',
useSmiles=True)
d = Draw.MolDraw2DSVG(600,200)
d.SetFontSize(0.6)
d.DrawReaction(rxn)
d.FinishDrawing()
svg = SVG(d.GetDrawingText())
display(svg)

Thanks.

@greglandrum greglandrum modified the milestones: 2020_09_1, 2021_03_1 Oct 20, 2020
greglandrum added a commit to greglandrum/rdkit that referenced this issue Mar 15, 2021
Stops re-generating reaction coordinates when that's not required
greglandrum added a commit that referenced this issue Mar 17, 2021
* Fixes #2976
Stops re-generating reaction coordinates when that's not required

* add better test

* try to deal with bad font sizes from mol files

* one more expected result update

* try to be smarter about font changes

* suppress a compiler warning

* remove debug output

* update some expected test results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants