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

Add reactions drawing examples #123

Open
MichelML opened this issue Jun 23, 2022 · 4 comments
Open

Add reactions drawing examples #123

MichelML opened this issue Jun 23, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@MichelML
Copy link
Collaborator

No description provided.

@MichelML MichelML added the enhancement New feature or request label Jun 23, 2022
@willfinnigan
Copy link

Is this already possible? I'd love to use this feature.

@jacksund
Copy link

This features looks like it is low priority for RDKit.js, so I'm currently using python to generate the image in the backend and then feeding that to the web UI as a media asset: https://www.rdkit.org/docs/GettingStartedInPython.html#drawing-chemical-reactions

Non-ideal and puts extra load on the backend, but I don't see any easier route yet (aside from splitting the reaction up and rendering each component individually)

@willfinnigan
Copy link

Splitting it up and manually joining the pieces together with svg2 is what I ended up doing. I could do with finding the time to make the arrow a bit nicer, but its functional for now.

Screenshot 2024-05-13 at 10 46 38

I did used to render on the server, but I wanted to make a totally client side version.

@molhanec
Copy link

RDKit JS can render reactions, it's just not documented. E.g. something like:

const rdkit = await window.initRDKitModule()
const rxn = rdkit.get_rxn(smiles)
const svg = rxn.get_svg(width, height) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants