rdkit-js icon indicating copy to clipboard operation
rdkit-js copied to clipboard

Molfile with SuperAtoms render shows a disconnected superAtom group at the corner

Open gandha9394 opened this issue 1 year ago • 0 comments

Describe the bug I use Ketcher molecule editor and extract the molfile and use the molfile to display. On Ketcher I can add super atoms or abbreviations like tBu or OAc or COOH. When I try to render the molfile with RDKITJs (svg/canvas mode), I see a detached abbreviation at the corner. It looks weird and confusing.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Ketcher demo'
  2. Add a molecule with a superAtom (type OAc -> Enter -> and place it)
  3. Export molfile
  4. Use molfile to render on RDKit. And you will see OAc at the left corner (mostly)

Expected behavior RDKit should understand super atoms and should either ignore it or render appropriately. Would be great if it can be tied to condense_abbreviations() function.

Screenshots Screenshot 2024-10-17 at 1 52 00 AM

Desktop (please complete the following information):

  • OS: All OS. But I tried this on Mac and Windows.
  • Browser: Chrome mostly. But I think its independent of the browser. Its part of the SVG
  • Version: 2024.3.5-1.0.0

Smartphone (please complete the following information):

  • NA

gandha9394 avatar Oct 16 '24 20:10 gandha9394