Hi Greg,

It has been a long time since I have done things like this with a Smarts
based transformation.  You are right, I forgot the specification for the
double bond on the other side.  If you add it, there isn't any change in
the output on my side.

I am using the most recent release of RDKit (as I compiled this a couple of
weeks ago).  For some reason I have had issues compiling the Python
wrappers, but I am on CentOS 7, so I am just glad that I got the Java
wrappers to work.  I was following the examples that I saw in the Code
folder pretty tightly, but I am glad to see that the Python wrapped libs
seem to work as I would expect.  I'll track down the std err log, but
apriori I was unaware that one was being produced by RDKit.  :)  That might
take some time to find.  :)

This all stems from my inability to keep stereochemistry from
RWMol.MolFromSmiles(smiString), which is another issue I am having at the
moment.  I have the double bonds set appropriately and then (after
transforming them through RDKit) I lose the stereochemistry.  I am pretty
certain that I am losing this through the perception of the molecule, but I
also need the ability to transform double bonds so I have to find a path
through this as well.

Thanks, as always, for responding so quickly!  I'll share the logs once I
locate them!
Matthew




On Tue, Nov 11, 2014 at 8:46 PM, Greg Landrum <greg.land...@gmail.com>
wrote:

> 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