Hi all,
I ran into a case that I found confusing. If convert this SMILES to an
RDKit molecule, I get a valid molecule.
In [2]: mol = Chem.MolFromSmiles("O=C(CC1SCCC1)c1coooo1N")
In [3]: mol
Out[3]: <rdkit.Chem.rdchem.Mol at 0x10caefbc0>
However, if I convert the molecule to SMILES then covert it back to a
molecule, it is no longer valid.
In [4]: smi = Chem.MolToSmiles(mol)
In [5]: new_mol = Chem.MolFromSmiles(smi)
[20:35:06] Explicit valence for atom # 1 O, 3, is greater than permitted
RDKit ERROR: [20:35:06] Explicit valence for atom # 1 O, 3, is greater than
permitted
In [6]: new_mol
In [7]: new_mol is None
Out[7]: True
I'd like to be able to catch invalid molecules like this in one step rather
than two. What am I
doing wrong?
Thanks,
Pat
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss