After growing step by CReM we need to tautomerize generated molecules. For tautomerization we use mol objects of this molecules and convert them to smiles by following code
smiles = [f'{Chem.MolToSmiles(mol, isomericSmiles=True)}\t{parent_mol.GetProp("_Name")}\n'
for parent_mol, mols in mol_dict.items() for mol in mols].
Then these smiles are used for tautomerization and in results we get an output tmp file with mol blocks in format sdf file. While reading the sdf file by Chem.SDMolSupplier() we have a problem Can't kekulize mol. Unkekulized atoms: 4 5 7 for some generated molecules.
For decision this problem we removing hydrogens during convertion mols to smiles by following code
smiles = [f'{Chem.MolToSmiles(Chem.RemoveHs(mol), isomericSmiles=True)}\t{parent_mol.GetProp("_Name")}\n'
for parent_mol, mols in mol_dict.items() for mol in mols]
To reproduce the error, an archive with files to run the program is attached.
test_crem_grow.zip
After growing step by CReM we need to tautomerize generated molecules. For tautomerization we use mol objects of this molecules and convert them to smiles by following code
Then these smiles are used for tautomerization and in results we get an output tmp file with mol blocks in format sdf file. While reading the sdf file by Chem.SDMolSupplier() we have a problem
Can't kekulize mol. Unkekulized atoms: 4 5 7for some generated molecules.For decision this problem we removing hydrogens during convertion mols to smiles by following code
To reproduce the error, an archive with files to run the program is attached.
test_crem_grow.zip