Thanks! That works perfectly.

Best,

Liz Wylie


On Tue, Feb 18, 2014 at 11:51 AM, Matthew Swain <m.sw...@me.com> wrote:

> Hi,
>
> I don't really know what's going on here, but you could try [#5!B] for you
> SMARTS.
>
> #5 to match any boron, and !B to disallow non-aromatic.
>
> Matt
>
> On 18 Feb 2014, at 16:05, Elizabeth Wylie <ewyli...@gmail.com> wrote:
>
> > Hello All,
> >
> > I have a series of 'aromatic' compounds in SMILES provided from a large
> database. These may or may not be nonsensical compounds, but I'm running
> into issues finding SMARTS expressions that can match an aromatic boron
> atom.
> >
> > example:
> > In [1]: from rdkit import Chem
> >
> > In [2]: s = "Cb1c2sccc2cnn#1"
> >
> > In [3]: m = Chem.MolFromSmiles(s)
> >
> > In [4]: t = Chem.MolFromSmarts('B')
> >
> > In [5]: m.HasSubstructMatch(t)
> > Out[5]: False
> >
> > In [6]: t = Chem.MolFromSmarts('[b]')
> > [09:54:18] SMARTS Parse Error: syntax error for input: [b]
> >
> > In [7]: m.Debug()
> > Atoms:
> >         0 6 C chg: 0  deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
> >         1 5 B chg: 0  deg: 3 exp: 3 imp: 0 hyb: 3 arom?: 1 chi: 0
> >         2 6 C chg: 0  deg: 3 exp: 4 imp: 0 hyb: 3 arom?: 1 chi: 0
> >         3 16 S chg: 0  deg: 2 exp: 2 imp: 0 hyb: 3 arom?: 1 chi: 0
> >         4 6 C chg: 0  deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 1 chi: 0
> >         5 6 C chg: 0  deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 1 chi: 0
> >         6 6 C chg: 0  deg: 3 exp: 4 imp: 0 hyb: 3 arom?: 1 chi: 0
> >         7 6 C chg: 0  deg: 2 exp: 3 imp: 1 hyb: 3 arom?: 1 chi: 0
> >         8 7 N chg: 0  deg: 2 exp: 3 imp: 0 hyb: 3 arom?: 1 chi: 0
> >         9 7 N chg: 0  deg: 2 exp: 3 imp: 0 hyb: 3 arom?: 1 chi: 0
> > Bonds:
> >         0 0->1 order: 1 conj?: 0 aromatic?: 0
> >         1 1->2 order: 12 conj?: 1 aromatic?: 1
> >         2 2->3 order: 12 conj?: 1 aromatic?: 1
> >         3 3->4 order: 12 conj?: 1 aromatic?: 1
> >         4 4->5 order: 12 conj?: 1 aromatic?: 1
> >         5 5->6 order: 12 conj?: 1 aromatic?: 1
> >         6 6->7 order: 12 conj?: 1 aromatic?: 1
> >         7 7->8 order: 12 conj?: 1 aromatic?: 1
> >         8 8->9 order: 12 conj?: 1 aromatic?: 1
> >         9 9->1 order: 3 conj?: 1 aromatic?: 1
> >         10 6->2 order: 12 conj?: 1 aromatic?: 1
> >
> >
> > I understand that the lowercase aromatic notation for boron is not
> accepted in Daylight, but the SMILES parser in RDKit does not seem to have
> any issues with it within the molecule. Is there a different SMARTS
> expression that I'm missing that would match these boron atoms?
> >
> > This seems like inconsistent behavior given the example below where an
> aromatic form matches a non-aromatic SMARTS:
> >
> > In [12]: s =
> 'c1c[se]c(C2CN(c3ccccc3)N=C2c2ccc(C3=NN(c4ccccc4)CC3c3ccc[se]3)s2)c1'
> >
> > In [13]: m = Chem.MolFromSmiles(s)
> > In [14]: m
> > Out[14]: <rdkit.Chem.rdchem.Mol at 0x28f90c0>
> >
> > In [15]: t = Chem.MolFromSmarts('[Se]')
> >
> > In [16]: m.HasSubstructMatch(t)
> > Out[16]: True
> >
> >
> > Thanks
> >
> > Liz Wylie
> >
> ------------------------------------------------------------------------------
> > Managing the Performance of Cloud-Based Applications
> > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> > Read the Whitepaper.
> >
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk_______________________________________________
> > Rdkit-discuss mailing list
> > Rdkit-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to