cheminfo / openchemlib-js

JavaScript port of OpenChemLib
https://cheminfo.github.io/openchemlib-js/index.html
BSD 3-Clause "New" or "Revised" License
71 stars 21 forks source link

Issue rendering an organometallic complex SMILES #130

Closed felipe-imanishi closed 1 year ago

felipe-imanishi commented 2 years ago

We have this canonical SMILES generated by RDKIT CNc1ccccc1-c1[c-]cccc1.COc1ccc(OC)c(P(C2CCCCC2)C2CCCCC2)c1-c1c(C(C)C)cc(C(C)C)cc1C(C)C.CS(=O)(=O)O.[Pd] that fails to render in openchemlib. If we remove the negatively charged carbon (the - in the [c-], it renders but it is then incorrect.

Is there a limitation here or is this known?

The original smiles (before being canonicalized by RDKIT) CC(C)C1=CC(=C(C(=C1)C(C)C)C2=C(C=CC(=C2P(C3CCCCC3)C4CCCCC4)OC)OC)C(C)C.CNC1=CC=CC=C1C2=CC=CC=[C-]2.CS(=O)(=O)O.[Pd] does render, but because we are using rdkit as our standardization tool, it is not possible for us to use this smiles.

Thank you!

Image below is from chemdraw. It shows both smiles mentioned plotted. The first one is for smiles CNc1ccccc1-c1[c-]cccc1.COc1ccc(OC)c(P(C2CCCCC2)C2CCCCC2)c1-c1c(C(C)C)cc(C(C)C)cc1C(C)C.CS(=O)(=O)O.[Pd] and the second one for smiles CC(C)C1=CC(=C(C(=C1)C(C)C)C2=C(C=CC(=C2P(C3CCCCC3)C4CCCCC4)OC)OC)C(C)C.CNC1=CC=CC=C1C2=CC=CC=[C-]2.CS(=O)(=O)O.[Pd].

Screen Shot 2022-05-25 at 9 22 03 AM

targos commented 2 years ago

/cc @thsa as this is probably not specific to the JS port of OpenChemLib

lpatiny commented 2 years ago

The error code is 'Assignment of aromatic double bonds failed'. Currently openchemlib do not accept c1[c-]cccc1

thsa commented 2 years ago

this was just fixed


Von: Luc Patiny @.> Gesendet: Mittwoch, 6. Juli 2022 07:02 An: cheminfo/openchemlib-js @.> Cc: Thomas Sander @.>; Mention @.> Betreff: Re: [cheminfo/openchemlib-js] Issue rendering an organometallic complex SMILES (Issue #130)

The error code is 'Assignment of aromatic double bonds failed'. Currently openchemlib do not accept c1[c-]cccc1

— Reply to this email directly, view it on GitHubhttps://che01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcheminfo%2Fopenchemlib-js%2Fissues%2F130%23issuecomment-1175784022&data=05%7C01%7Cthomas.sander%40idorsia.com%7Cab598fcf6ea847df84f008da5f0cc8dc%7Cbb9214bf0cb941fdbd55d0c1c3eda110%7C0%7C0%7C637926805764806746%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=u9Ti%2FXbuN8%2F41pvzquYVZHqipyar7DdfiQUn7r0VtCY%3D&reserved=0, or unsubscribehttps://che01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FACNFEBQZLUPZGZVFHZ77BSDVSUHPZANCNFSM5W6AA3IQ&data=05%7C01%7Cthomas.sander%40idorsia.com%7Cab598fcf6ea847df84f008da5f0cc8dc%7Cbb9214bf0cb941fdbd55d0c1c3eda110%7C0%7C0%7C637926805764806746%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=76JgYIzV8RN7NEGoAV6BGldhxlsEbJwO1xfTEHpc3uA%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>


The information of this email and in any file transmitted with it is strictly confidential and may be legally privileged. It is intended solely for the addressee. If you are not the intended recipient, any copying, distribution or any other use of this email is prohibited and may be unlawful. In such case, you should please notify the sender immediately and destroy this email. The content of this email is not legally binding unless confirmed by letter. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state them to be the views of the sender's company.

felipe-imanishi commented 1 year ago

@targos what is the release cadence for openchemlib-js? With the fix above, I was wondering when openchemlib-js would be able to make a release to include this release https://github.com/Actelion/openchemlib/releases/tag/openchemlib-2022.7.2 from openchemlib. Thank you!

targos commented 1 year ago

Unfortunately I tried to update openchemlib last year and there were issues preventing the compilation. I haven't found the time to resolve them yet, so for now this is blocked on either me finding the time or someone else doing it (I'd be happy to review a pull request)

targos commented 1 year ago

I'll do a release as soon as https://github.com/cheminfo/openchemlib-js/pull/135 is merged.