Skip to content

rdkit kekulization problem during tautomerization by cxcalc #49

Description

@GuzelMinibaeva

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions