Re: [Rdkit-discuss] Sometimes one sanitization is not enough?

2018-10-31 Thread Ivan Tubert-Brohman
Hi Greg, Thanks for the detailed explanation. You are right that this is not a real molecule; it came from applying a user-supplied reaction SMARTS. (The reaction SMARTS was not the best-written perhaps, but that's tangential...). I normally sanitize the products and skip those that fail the

Re: [Rdkit-discuss] Sometimes one sanitization is not enough?

2018-10-31 Thread Greg Landrum
Hi Ivan, Short answer: I would not normally expect a second sanitization to fail if the first succeeds, but your input SMILES is very odd and triggers a bug. This is an interesting edge case for the sanitization code because it includes a weird mix of aromatic and aliphatic atoms and bonds, I do

[Rdkit-discuss] Sometimes one sanitization is not enough?

2018-10-30 Thread Ivan Tubert-Brohman
Hi, I was surprised to see that a (dubious) structure that goes through SanitizeMol OK can fail a subsequent sanitization call: print("Start") mol = Chem.MolFromSmiles('C1=n(C)-c=Cn1', sanitize=False) print("Before first sanitization") Chem.SanitizeMol(mol) print("Before second sanitization")