Re: [Rdkit-discuss] generate 2D figure

2014-02-19 Thread Yingfeng Wang
Here are more details. If I use m = Chem.MolFromSmiles('ccc[nH]c', sanitize=False) AllChem.Compute2DCoords(m) It works. But I get trouble with >>> m = Chem.MolFromSmiles('C(=O)OCCO', sanitize=False) >>> AllChem.Compute2DCoords(m) I got Pre-condition Violation getNumImplic

Re: [Rdkit-discuss] generate 2D figure

2014-02-19 Thread Yingfeng Wang
Adrian, I meet a weird case. >>> import matplotlib.offsetbox >>> from rdkit import Chem >>> from rdkit.Chem import AllChem >>> from rdkit.Chem import Draw >>> m = Chem.MolFromSmiles('ccc[nH]c') I got non-ring atom 0 marked aromatic >>> AllChem.Compute2DCoords(m) Traceback (most recent call last)

Re: [Rdkit-discuss] SMARTS Substructure matching

2014-02-19 Thread Christos Kannas
Hi Toby and Greg, Thanks a lot for your answers. I'll use Toby's solution as it fits my situation better, as I'll have to do this only for the compounds that will be used, and not on the reactants. Best, Christos On 19 February 2014 10:40, Toby Wright wrote: > Hi Christos, > > If you add hydr

Re: [Rdkit-discuss] SMARTS Substructure matching

2014-02-19 Thread Greg Landrum
Hi Christos, The Hs are, by default, left in the query graph when you construct the molecule from SMARTS. They will only match when the molecule you are matching against also has an H in the graph. Chem.MolToSmarts() takes an optional "mergeHs" argument that will get you the behavior you want: In

[Rdkit-discuss] Fwd: SMARTS Substructure matching

2014-02-19 Thread Toby Wright
Hi Christos, If you add hydrogens to m3 after creating it in RDKit then both m1 and m2 are recognised as substructures of m3. See below for how I achieved this: >>> from rdkit import Chem >>> m1 = Chem.MolFromSmarts("[C:3][C:4](=[O:5])[O:6]([H:100])") >>> m2 = Chem.MolFromSmarts("[C:3][C:4](=[O:5

[Rdkit-discuss] SMARTS Substructure matching

2014-02-19 Thread Christos Kannas
Hi all, At my current project I'm working on reaction based multiobjective de novo design. And I have a set of reactions that I have converted into SMIRKS and reaction SMARTS.. The problem I have is that when I have a reactant pattern in SSMARTS, as required by SMIRKS, that has explicit mapped Hy