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
Related to #11, I have been able to write rdkit.Chem.Mol objects to a table using the mol_from_smiles function provided by the chemicalite extension, however when I write an arbitrary Mol object to the table using the mol_from_binary_mol function, only None is stored.
See the following minimal example returns:
import sqlite3
from rdkit import Chem
connection = sqlite3.connect('test.db')
connection.enable_load_extension(True)
connection.load_extension('chemicalite')
connection.enable_load_extension(False)
connection.execute("CREATE TABLE compounds(id INTEGER PRIMARY KEY, name TEXT, smiles TEXT, molecule MOL)")
# this works fine
connection.cursor().execute("INSERT INTO compounds(name, smiles, molecule) "
"VALUES(?1, ?2, mol_from_smiles(?2))", ("acetone","CC(=O)C"))
# here the molecule field contains None
connection.cursor().execute("INSERT INTO compounds(name, smiles, molecule) "
"VALUES(?1, ?2, mol_from_binary_mol(?3))", ("acetone","CC(=O)C",Chem.MolFromSmiles("CC(=O)C").ToBinary()))
# see the contents of the table
connection.cursor().execute("SELECT * FROM compounds").fetchall()
Hi @mwinokan thank you for reporting the problem, I hope I'll be able to look into this during the next few days. In the meantime, could you please share some details about your software configuration? Thanks!
Related to #11, I have been able to write
rdkit.Chem.Mol
objects to a table using the mol_from_smiles function provided by the chemicalite extension, however when I write an arbitraryMol
object to the table using themol_from_binary_mol
function, onlyNone
is stored.See the following minimal example returns:
The last line returns:
I would like to be able to store the rdkit molecule including conformer, hence the desire not to generate the table entry using
mol_from_smiles
Thank you!
The text was updated successfully, but these errors were encountered: