[Rdkit-discuss] Behaviour change between RDKit versions (HasSubstructMatch)
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: JP <jea...@in...> - 2014-06-19 18:26:33
|
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).
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.
Thank-you!
-
Jean-Paul Ebejer
Early Stage Researcher
|