Search code examples
pythonchemistryrdkit

Problems encountered when using RDKIT to convert SMILES to mol


I want to get the molecules from the SMILES using rdkit in python. The SMILES I used was downloaded from the drugbank.

However, when I using the function Chem.MolFromSmiles, some SMILES would report but some wouldn't: Explicit valence for atom # 0 N, 4, is greater than permitted.

I found some explanation about this problem: it is because the SMILES generated a invalid molecule that doesn't exist in real world. But I am not a chemistry student.... So anyone know how to fix this?


Solution

  • Your SMILES string would appear to have a neutral 4-co-ordinate nitrogen atom in it, which doesn't exist in real molecules. 4-co-ordinate nitrogen atoms have a positive charge, eg [N+] in a SMILES string.