I am currently working on a Django project that necessitates the functionality of taking an InChI string and converting it into a molecule, but the package that I'm using seems to have an issue with its function MolFromInchi
. Whenever I try to use this function, python tends to generate this traceback:
Ex.
>>> from rdkit.Chem.inchi import MolFromInchi
>>> mol = MolFromInchi('InChI=1S/O2Si/c1-3-2')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\tcherry\repos\dataslate_django\venv\my-rdkit-env\lib\site-packages\rdkit\Chem\inchi.py", line 71, in MolFromInchi
mol, retcode, message, log = rdinchi.InchiToMol(inchi, sanitize, removeHs)
TypeError: No to_python (by-value) converter found for C++ type: class boost::shared_ptr<class RDKit::ROMol>
This error seems to be derived from the source code of the rdkit
package, but I was wondering if there's anything that I can do to circumvent or mitigate this issue while still being able to incorporate the functionality of MolFromInchi
into my project.
NOTE: I was able to reproduce this error after following the instructions on how to install RDKit with Conda posted on the RDKit Documentation, and this question pertains to the most current version of RDKit (2020.03.1).