On Fri, Jan 25, 2013 at 12:47 PM, JP <jeanpaul.ebe...@inhibox.com> wrote: > > Out of pedantry, why do some labels *not* have a numeric label (using > 2012_12_1)? All atoms have a numeric id; so the label should all be > attached to a numeric label e.g. > > mols = [ Chem.MolFromSmiles('CC(=O)CN(C)C'), > Chem.MolFromSmiles('c1ccccc1C(=O)CN(c1ccccc1)C'), > Chem.MolFromSmiles('COC(=O)CN')] > if MCS.FindMCS(mols).smarts: > core = Chem.MolFromSmarts(MCS.FindMCS(mols).smarts) > for m in mols: > chains = Chem.ReplaceCore(m,core,labelByIndex=True) > print "chains", Chem.MolToSmiles(chains, True) > > Gives: > > chains [*]C.[2*]C.[2*]C > chains [*]c1ccccc1.[2*]C.[2*]c1ccccc1 > chains [*]OC > > Now, where is the number label on each first entry? Not a big deal of > course, but wrecks havoc with my regex.
It's the usual numbering starting at zero thing.... I will try and figure out if there's an easy workaround and get back to you later (this weekend most likely) > Also should these lists be uniquified or not? Take a look at the first > example (e.g. [2*]C.[2*]C)? > I guess that atom has two substituents. -greg ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss