Hi Greg,

On 25 January 2013 04:36, Greg Landrum <greg.land...@gmail.com> wrote:

>
> That's pretty much what I would do. Fortunately, you don't have to
> code it, because it's already there:[1]
>

[1] Incidentally, I love being given that answer :)



>
> In [6]: [Chem.MolToSmiles(x,True) for x in pieces]
> Out[6]: ['[1*]O', '[2*]C', '[6*]CC']
>
>
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.

Also should these lists be uniquified or not?  Take a look at the first
example (e.g. [2*]C.[2*]C)?

Thank-you,
JP
------------------------------------------------------------------------------
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

Reply via email to