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

Don't convert to smiles for smarts svg drawing #90

Merged
merged 3 commits into from
Mar 18, 2024

Conversation

atfera
Copy link
Contributor

@atfera atfera commented Mar 14, 2024

The example in storybook doesn't work.

For smarts [#6][CH1](=O), it's doing a conversion to smiles C[CH]=O. get_svg is throwing an Uncaught error for this smarts and also the smiles when using qmol.

But, when doing a conversion rdkit.get_qmol('[#6][CH1](=O)').get_smarts(), it gives me this smarts [#6][C&H1]=O, and
get_qmol('[#6][C&H1]=O').get_svg() works.

Another simpler example is [n&H1] and [nH1]. It should be the same smarts (see the doc here https://www.daylight.com/dayhtml/doc/theory/theory.smarts.html), but idk why, the second one doesn't work with rdkit-js for get_svg.

@atfera atfera requested a review from RamziWeslati March 14, 2024 09:32
@atfera
Copy link
Contributor Author

atfera commented Mar 14, 2024

I opened an issue in rdkit-js repo rdkit/rdkit-js#451

src/utils/draw.ts Outdated Show resolved Hide resolved
@RamziWeslati RamziWeslati force-pushed the fix/dont-convert-smiles-for-smarts-drawing branch from db35fd5 to 220cc36 Compare March 18, 2024 13:44
@RamziWeslati RamziWeslati merged commit b938001 into master Mar 18, 2024
3 checks passed
@RamziWeslati RamziWeslati deleted the fix/dont-convert-smiles-for-smarts-drawing branch March 18, 2024 13:46
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 this pull request may close these issues.

2 participants