Hi JP,
On Thu, Jun 19, 2014 at 7:58 PM, JP <[email protected]> wrote:
>
> yo RDKitters,
>
> writing this email while waiting eagerly for the Uruguay-England match in
> an hour or so (blame the beer for any lack of consistency beneath).
>
I guess more beer probably followed afterwards to lessen the pain... ouch.
> Can someone explain which changes in the new RDKit result in the following
> behaviour change. Somehow "all" (as in all five of them) my tests are
> failing now - which is fine, I'll change my code to use MolFromSmarts
> instead (this works).
>
> Using RDKit_2013_09_2:
>
> >>> import rdkit
> >>> from rdkit import Chem
> >>> mol = Chem.MolFromSmiles('CCN=[N+]=[N-]')
> >>> npos = Chem.MolFromSmiles("[N+]")
> >>> mol.HasSubstructMatch(npos)
> True
>
> Using RDKit_2014_03_1
>
> >>> import rdkit
> >>> from rdkit import Chem
> >>> mol = Chem.MolFromSmiles('CCN=[N+]=[N-]')
> >>> npos = Chem.MolFromSmiles("[N+]")
> >>> mol.HasSubstructMatch(npos)
> False
>
> mol.Debug() and npos.Debug() seem to be giving me the same output in both
> versions. I understand the workaround (which is go with MolFromSmarts,
> which creates QueryAtoms), but I'd like to understand what is going on
> behind the scenes which triggered the behaviour change.
>
It was this bug:
https://github.com/rdkit/rdkit/issues/165
Essentially: "[N+]" has radical electrons, so it doesn't match the N+ in
'CCN=[N+]=[N-]'
-greg
------------------------------------------------------------------------------
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss