Hi all,
I have a SMILES list containing 251 SMILES strings (collected from a csv file)
which I needed to convert to mol files because Open Babel is not doing its job
in adding explicit Hs in batches before being converted to .sdf so I can
process the molecules in rdkit and PyRx. So I am trying to use RDKit as an
alternative to generate what I need.
I used the following:
from rdkit import Chem
from rdkit.Chem import rdmolfiles
suppl_smiles = []
temp =
Chem.SmilesMolSupplier('directory/filename.smi',delimiter='\t',titleline=False)
y = len(temp)
for x in range (y):
suppl_smiles.append(temp)
temp2 = suppl_smiles[x]
temp3 = Chem.MolFromSmiles(temp2)
The one in highlight always returns the following:
TypeError: No registered converter was able to produce a C++ rvalue of type
class std::basic_string<wchar_t,struct std::char_traits<wchar_t>,class
std::allocator<wchar_t> > from this Python object of type SmilesMolSupplier
I have been looking in GitHub, Source Forge, and other fora regarding batch
conversion of smiles to mol files (I only encountered sdf containing multiple
molecules to smiles which I already figured out) but I have not seen using
MolFromSmiles using calling the tuple index as an object. I'd appreciate your
help. Thank you.
Joanna
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss