Skip to content

Multiple calls to initRDKitModule #437

Answered by ptosco
fredludlow asked this question in Q&A
Discussion options

You must be logged in to vote

@fredludlow Hi Fred, as you already figured out, every time you call initRDKitModule() a new instance of the module will be created.
You may take a look at how the rdkit-structure-renderer package avoids multiple instantiations: Renderer.init() is safe to call multiple times, as it will only instantiate the RDKit module once.
You might as well find convenient to use rdkit-structure-renderer (it is a vanilla JS package with very few dependencies other than MinimalLib itself) rather than implementing the logic again in your app.
Note that rdkit-structure-renderer does not depend on rdkit-js - it bundles its own version of MinimalLib, which may include additional functionality compared to rd…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@fredludlow
Comment options

Answer selected by fredludlow
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants