we use RDKit.js to render molecules in the frontend. However, there are some molecules where RDKIT fails at the kekulization.
In Python-RDKit, this can be avoided by setting the sanitize flag: Chem.MolFromSmiles(smiles, sanitize=False). The molecule will not get kekulized but can still be rendered. In RDKit.js, there is a get_mol function (see https://docs.rdkitjs.com/interfaces/RDKitModule.html#get_mol.get_mol-1) that accepts a details_json string. I have not found out where get_mol is implemented (such a function does not exist on the Python side). I also don't know what happens with details_json.
Todo
- find a way to reliably render all molecules that RDKit can render
we use RDKit.js to render molecules in the frontend. However, there are some molecules where RDKIT fails at the kekulization.
In Python-RDKit, this can be avoided by setting the
sanitizeflag:Chem.MolFromSmiles(smiles, sanitize=False). The molecule will not get kekulized but can still be rendered. In RDKit.js, there is aget_molfunction (see https://docs.rdkitjs.com/interfaces/RDKitModule.html#get_mol.get_mol-1) that accepts adetails_jsonstring. I have not found out whereget_molis implemented (such a function does not exist on the Python side). I also don't know what happens withdetails_json.Todo