You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the request @ben-ikt, I would tend to say this isn't possible at the moment, but to be honest there are a few things I'm not sure of:
Where does rdkit-js fit in your current use case? If you use ThreeJS and PDBLoader, it doesn't seem you need rdkit-js.
Assuming you really want to retrieve 3D coordinates, that logic would currently be based on molfile (and not pdb, unless I'm wrong, rdkit-js doesn't support loading molecules from pdb) in rdkit-js. And the only way I can think of having 3D info at the moment, is you would have had initially loaded a molecule with get_mol using a molfile containing 3D coordinates, and then you would be able to retrieve it back calling get_molblock on the molecule object, but that would essentially give you back the original molfile, which contained the 3D coordinates in the first place.
We can continue the convo here if you have further questions after reading this, otherwise let me know and we'll close this.
Then in the frontend I render the 3D molecule based on the SDF coordinates.
I'm trying to move this logic into the frontend so I can render the molecule without having to wait for the slow API, but this doesn't seem possible due to lacking 3D coordinates.
IN JS this looks like:
const rdkMol = window.RDKit.get_mol(smiles)
rdkMol.add_hs() // Add explicit hydrogen atoms
// No way to embed 3D coordinates
const sdf = rdkMol.get_molblock() // Generate SDF
So, to be concrete, is a JS equivalent for Chem.rdDistGeom.EmbedMolecule not a priority or not possible?
Is your feature request related to a problem? Please describe.
I want to display a molecule in 3D via ThreeJS and the PDBLoader.
Describe the solution you'd like
Be able to get 3D coordinates.
The text was updated successfully, but these errors were encountered: