[Rdkit-discuss] ETKDG improvement for small and large rings

2020-05-11 Thread Sereina Riniker
Dear RDKit Users, For your information (and to make a bit of advertisement): We have recently developed and published an extension of the ETKDG conformer generator to improve sampling of small and large rings, which is available in the 2020.03 release of the RDKit. Shuzhe Wang, Jagna Witek,

Re: [Rdkit-discuss] Sanitize molecule with explicit Hydrogens to catch an error

2020-05-11 Thread Paolo Tosco
Dear Pablo, You might do something along these lines: from rdkit import Chem smi = "[H]C([H])O" params = Chem.SmilesParserParams() params.sanitize = True params.removeHs = False mol = Chem.MolFromSmiles(smi, params) for a in mol.GetAtoms(): if a.GetNumImplicitHs():

Re: [Rdkit-discuss] Sanitize molecule with explicit Hydrogens to catch an error

2020-05-11 Thread Ivan Tubert-Brohman
Hi Pablo, SMILES by definition has implicit hydrogens (enough to satisfy the typicial valence) for atoms that are not within brackets. It doesn't matter if you write C, C[H], [H]C[H], or [H]C([H])([H])[H]; they are all methane. The number of hydrogens that are returned by GetNumImplicitHs() and

[Rdkit-discuss] Sanitize molecule with explicit Hydrogens to catch an error

2020-05-11 Thread Pablo Ramos
Dear all, I am trying to catch an error every time that a smiles associated to a mol object does not exist. To do this, I want to use sanitize function: if the smiles is incorrect I will get my error. My smiles with explicit hydrogens is the next one: [H]C([H])O I want it to provide an error

Re: [Rdkit-discuss] GetSubstructMatches and unique match

2020-05-11 Thread Greenpharma S.A.S.
Dear Paolo, Thank you very much. I'll test this and revert to you. Have a nice day. Best regards, Quoc-Tuan > Le 10 mai 2020 à 13:09, Paolo Tosco mailto:paolo.tosco.m...@gmail.com > a écrit : > > > Dear Quoc-Tuan, > > I think I have come with a reasonably fast algorithm that seems to