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

MolDraw2D should automatically set bond highlight color when atom colors are changed #5704

Closed
greglandrum opened this issue Oct 28, 2022 · 2 comments
Assignees
Labels
Milestone

Comments

@greglandrum
Copy link
Member

Describe the bug
I noticed this while putting a tutorial notebook together.

Here's some code:

d2d = Draw.MolDraw2DSVG(250,200)
c1 = (.3,.3,1)
d2d.DrawMolecule(m,highlightAtoms=[0,1,2],highlightAtomColors={0:c1,1:c1,2:c1})
d2d.FinishDrawing()
SVG(d2d.GetDrawingText())

And the result:
image

Expected behavior
The bonds there should be the same color as the atoms. If the two end atoms are different colors, then it's fine to pick one of them.

Configuration (please complete the following information):

  • RDKit version: master
  • OS: all
@greglandrum greglandrum self-assigned this Oct 28, 2022
@greglandrum greglandrum added this to the 2022_09_2 milestone Oct 28, 2022
@DavidACosgrove
Copy link
Collaborator

DavidACosgrove commented Oct 28, 2022 via email

@greglandrum
Copy link
Member Author

Thanks Greg. I’ll take a look over the weekend. Dave

I'll do this one Dave (that's why I assigned it to me)... I want some practice playing with the MolDraw2D code too.

greglandrum added a commit to greglandrum/rdkit that referenced this issue Oct 28, 2022
greglandrum added a commit that referenced this issue Nov 23, 2022
* Fixes #5704

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

No branches or pull requests

2 participants