Hi Matthew,

On Wed, Nov 12, 2014 at 12:24 AM, Matthew Lardy <mla...@gmail.com> wrote:

>
> What I hope is a quick question.  I have a smiles string of a compound
> with an exo-double bond that does not specify E or Z.  I want to take these
> geometry unspecified smiles strings and force one conformation and return a
> smiles string.  So I have the following SMARTS transformation:
>
> [C:1]=[C:2][C:3](=[O:4])>>[C:1]=[C:2]\[C:3](=[O:4])
>
> Which from all I can tell is valid and recognized by RDKit.  I get an
> error when I try to run the reaction:
>
> Exception in thread "main" org.RDKit.ChemicalReactionException
>     at org.RDKit.RDKFuncsJNI.ChemicalReaction_runReactants(Native Method)
>     at org.RDKit.ChemicalReaction.runReactants(ChemicalReaction.java:129)
>
> Has anyone else seen this?  Or, have I just entered a semi-valid SMARTS
> transformation?
>

I can't reproduce it in Python:

In [4]: rxn =
AllChem.ReactionFromSmarts(r'[C:1]=[C:2][C:3](=[O:4])>>[C:1]=[C:2]\[C:3](=[O:4])')

In [5]: ps = rxn.RunReactants((Chem.MolFromSmiles('C=CC=O'),))

In [7]: Chem.MolToSmiles(ps[0][0],True)
Out[7]: 'C=CC=O'

Which version of the RDKit are you using and what are you providing as an
input? If you can find the log file from that java process, the error
message that shows up there would also be useful to see. We discovered
recently that it's not always trivial to find the log file that contains
the stderr stream, but it would certainly be helpful.

Note that the reaction as specified doesn't do what I think you want it to.
For that you need to specify the directionality of single bonds on both
sides of the double bond in the products:

In [8]: rxn =
AllChem.ReactionFromSmarts(r'[C:5][C:1]=[C:2][C:3](=[O:4])>>[C:5]/[C:1]=[C:2]\[C:3](=[O:4])')

In [9]: ps = rxn.RunReactants((Chem.MolFromSmiles('CC=CC=O'),))

In [10]: Chem.MolToSmiles(ps[0][0],True)
Out[10]: 'C/C=C\\C=O'

Best,
-greg
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&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