Closed ellensmalley closed 1 year ago
The documentation is incorrect. As you noticed, mol_from_input
will only accept SMILES, CTAB or rdkitjson
as input formats.
InChI is a unique chemical substance identifier rather than a molecule input format - one should generate InChIs from molecules, rather than the opposite (though possible).
Thank you! Closing this issue then
Reopening as there is actually a documentation bug :)
Describe the bug Hello! I've been working to integrate
rdkit-js
in a new React project and found that passing an InChI string toget_mol
will not return an RDKit Molecule.To Reproduce Steps to reproduce the behavior:
Provider and hook code snippets here if helpful:
export const RDKitProvider: React.FC<{ children: React.ReactNode }> = ({ children, }) => { const [rdkit, setRDKit] = useState<RDKitModule | undefined>(undefined);
const handleLoad = async () => { const rdkit = await window.initRDKitModule(); setRDKit(rdkit); };
const value: Context = !rdkit ? { isLoading: true, rdkit: undefined } : { isLoading: false, rdkit };
return ( <> <Script src="https://unpkg.com/@rdkit/rdkit/dist/RDKit_minimal.js" onLoad={handleLoad} />