Looking into this further, I've decided to use the Python option again, as
this seems to have more functions.

I run the current example, where rxn is the original example, and qrxn is
the 'query' for categorisation:

In [2]: import rdkit

In [3]: from rdkit import Chem

In [4]: from rdkit.Chem import rdChemReactions

In [5]: rxn =
rdChemReactions.ReactionFromSmarts('Nc1nc(Cl)c2[nH]cnc2n1.OCC1CCC
   ...: CC1>>Nc1nc(OCC2CCCCC2)c2[nH]cnc2n1')

In [6]: qrxn =
rdChemReactions.ReactionFromSmarts('[cH1:1]1:[c:2](-[CH2:7]-[CH2
   ...:
:8]-[NH2:9]):[c:3]:[c:4]:[c:5]:[c:6]:1.[#6:11]-[CH1;R0:10]=[OD1]>>[c:1]
   ...:
12:[c:2](-[CH2:7]-[CH2:8]-[NH1:9]-[C:10]-2(-[#6:11])):[c:3]:[c:4]:[c:5]
   ...: :[c:6]:1')

****
Pre-condition Violation
getNumImplicitHs() called without preceding call to calcImplicitValence()
Violation occurred on line 165 in file
C:\Users\riccardo\Anaconda\conda-bld\work
\Code\GraphMol\Atom.cpp
Failed Expression: d_implicitValence > -1
****

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-8-98ff5fdf90be> in <module>()
----> 1 rdChemReactions.HasReactionSubstructMatch(rxn,qrxn)

RuntimeError: Pre-condition Violation
        getNumImplicitHs() called without preceding call to
calcImplicitValence(
)
        Violation occurred on line 165 in file Code\GraphMol\Atom.cpp
        Failed Expression: d_implicitValence > -1
        RDKIT: 2016.03.1
        BOOST: 1_59


Is the code working as designed (ultimately I want to feed lists of these
together, but I'm trying one at a time for now)?


On 27 October 2016 at 12:02, James Wallace <jeawall...@gmail.com> wrote:

> Hi,
> I'm trying to replicate the Schneider categorisations with a local set of
> reactions that I have stored in SMILES. I currently have the categorisation
> filters as Reaction SMARTS, and I was hoping to do a standard substructure
> comparison between the SMARTS and the SMILES, but can't seem to do that.
>
> I'm using the Java wrapped version, and I can see how to import a
> ChemicalReaction as SMILES or SMARTS, I can't see how to compose such a
> query. Can anyone offer me any help or pointers?
>
> Thanks in advance,
> James
>
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to