I'm new to this rdkit, below is the code that I'm using to get the chemical image from the formula,
from rdkit import Chem
m = Chem.MolFromSmiles('OCC1OC(C(C(C1O)O)O)[C]1(C)(CO)CC(=O)C=C(C1CCC(=O)C)C')
m
if the code is correct, it displays the structre. The above code displays the error saying
"[15:23:55] Explicit valence for atom # 11 C, 5, is greater than permitted"
I tried adding try catch but, it does not help.
I need to catch this exception/Message and display it to the user.
How can we do this?Issue Image Here
try:
from rdkit import Chem
m = Chem.MolFromSmiles('OCC1OC(C(C(C1O)O)O)[C]1(C)(CO)CC(=O)C=C(C1CCC(=O)C)C')
m
except Exception as e:
print(e)