GUI for Reactor

User 91ff5e7a58

25-04-2006 19:06:33

Does anyone know of a simple GUI or browser based product as an alternative to the command line for Reactor and/or Synthesizer?





Thanks,





Kelsey

ChemAxon d76e6e95eb

25-04-2006 19:29:13

You can try a web based JSP implementation available here:


http://www.chemaxon.com/jchem/examples/reactor/jsp/index.jsp





Though, it was rapidly made for evaluation/demonstration purposes and not for power usage (not bug free, and limited output size), but will probably help you till the easy-to-use desktop GUI arrives, which is currently under development with very high priority.

User 870ab5b546

24-09-2006 01:18:59

Hi Gyuri,





What is the current status of the Reactor GUI? Any idea about when it will be ready for release?





-- Bob

ChemAxon d76e6e95eb

24-09-2006 07:18:40

It is in release candidate state. Will be released with JChem 3.2 soon.

User 870ab5b546

25-09-2006 00:52:50

The Reactor example page, http://www.chemaxon.com/jchem/examples/reactor/jsp/reactants.jsp, is buggy. When you press the React button, an error message appears, "Bad syntax, = missing." It happens with my example or yours.

ChemAxon e08c317633

25-09-2006 10:03:04

Hi Bob,





Please describe the used reaction, the reactants, and the parameter settings you used.





Best regards,


Zsolt

User 870ab5b546

25-09-2006 10:17:01

For example, your Baeyer-Villiger oxidation reaction example. I changed nothing.

ChemAxon e08c317633

25-09-2006 10:55:33

Hi Bob,





I have tested it under Mac OS-X:


- with Safari browser I get the error message "Bad syntax, = missing."


- with Mozilla Firefox browser it works





I suggest you to use Firefox until we fix this Safari specific error.

User 870ab5b546

25-09-2006 14:07:32

OK, using Firefox 1.5, I tried a hydrogenation reaction. Here is the configuration file:





Code:
<?xml version="1.0" ?>


<MDocument>


  <MTextBox>


    <Field name="text">Pd/C</Field>


    <MPoint x="-5.266835689544678" y="-1.0117714330554008" />


    <MPoint x="-3.3514606132507296" y="-1.011771433055396" />


    <MPoint x="-3.3514606132507296" y="-2.5517714330553942" />


    <MPoint x="-5.26683568954612" y="-2.5517714330554" />


  </MTextBox>


  <MChemicalStruct>


    <reaction>


      <propertyList>


        <property dictRef="NAME" title="NAME">


          <scalar><![CDATA[C=(C,N) and C=-(C,N) hydrogenation]]></scalar>


        </property>


        <property dictRef="REAGENTS" title="REAGENTS">


          <scalar><![CDATA[hydrogen, Pd/C]]></scalar>


        </property>


        <property dictRef="EXAMPLE" title="EXAMPLE">


          <scalar><![CDATA[CC#CC>>CCCC


CC(C)=C>>CC(C)C


C1CCC=CC1>>C1CCCCC1 |c:3|


C=Cc1ccccc1>>CCc1ccccc1


CC(C)C#N>>CC(C)CN


CN(C)C1=NCC=NC1>>CN(C)C1=NCCNC1]]></scalar>


        </property>


        <property dictRef="REACTIVITY" title="REACTIVITY">


          <scalar><![CDATA[bondType(bond(ratom(1), ratom(2))) == 2 || bondType(bond(ratom(1), ratom(2))) == 3]]></scalar>


        </property>


        <property dictRef="EXPLAIN_REACTIVITY" title="EXPLAIN_REACTIVITY">


          <scalar><![CDATA[Must be double or triple bond, not aromatic]]></scalar>


        </property>


        <property dictRef="EXCLUDE" title="EXCLUDE">


          <scalar><![CDATA[match("[N][C1][N2]")]]></scalar>


        </property>


      </propertyList>


      <reactantList>


        <molecule molID="m1">


          <atomArray


              atomID="a1 a2"


              elementType="C C"


              mrvMap="1 2"


              mrvQueryProps="0 L,C,N:"


              x2="-11.806068327840173 -10.47237565375555"


              y2="3.12969197432289E-4 -0.7696635571285386"


              />


          <bondArray>


            <bond atomRefs2="a1 a2" order="1" queryType="Any" />


          </bondArray>


        </molecule>


      </reactantList>


      <agentList>


        <molecule molID="m2">


          <atomArray


              atomID="a1 a2"


              elementType="H H"


              x2="-5.616677224636078 -4.076677224636078"


              y2="1.5318208932876587 1.5318208932876587"


              />


          <bondArray>


            <bond atomRefs2="a1 a2" order="1" />


          </bondArray>


        </molecule>


      </agentList>


      <productList>


        <molecule molID="m3">


          <atomArray


              atomID="a1 a2"


              elementType="C C"


              mrvMap="1 2"


              mrvQueryProps="0 L,C,N:"


              x2="4.980893100832979 6.293581459830705"


              y2="-0.010743123374412189 -0.8160066033310409"


              />


          <bondArray>


            <bond atomRefs2="a1 a2" order="1" />


          </bondArray>


        </molecule>


      </productList>


    </reaction>


  </MChemicalStruct>


</MDocument>








When I try to do the reaction with the six substrates in the examples, I get this error:





Error while evaluating expression: (bondType(bond(ratom(1), ratom(2))) == 2 || bondType(bond(ratom(1), ratom(2))) == 3) && !(match("[N][C1][N2]")) no input molecule





chemaxon.reaction.ReactionException: Error while evaluating expression:


(bondType(bond(ratom(1), ratom(2))) == 2 || bondType(bond(ratom(1), ratom(2))) == 3) && !(match("[N][C1][N2]"))


no input molecule


at chemaxon.reaction.ReactionPerformer.reactHit(ReactionPerformer.java:969)


at chemaxon.reaction.ReactionPerformer.reactOne(ReactionPerformer.java:813)


at chemaxon.reaction.ReactionPerformer.reactBase(ReactionPerformer.java:783)


at chemaxon.reaction.ReactionPerformer.react(ReactionPerformer.java:740)


at chemaxon.reaction.Reactor.reactMain(Reactor.java:1447)


at chemaxon.reaction.Reactor.react(Reactor.java:1382)





I get the same error when I delete the exclusivity rule.





???





-- Bob

User 870ab5b546

25-09-2006 14:18:32

I looked at your Baeyer-Villiger example, which does work properly, and I realized I formulated the exclusion rule incorrectly. So I changed it to match(reactant(0), "[N][C1][N2]"), but I get the same error.

ChemAxon d76e6e95eb

25-09-2006 14:49:35

Your query seems to contain invalid SMARTS string. If you press the syntax help link in the JSP example you will get lots of examples:


http://www.chemaxon.com/jchem/doc/user/EvaluatorTables.html

User 870ab5b546

25-09-2006 16:18:54

I can't figure out what's wrong with it. When I look on the Chemical Terms Reference page at bondType, it shows, under Plugin Examples, Reaction Context Examples:
Quote:
bondType(bond(ratom(1), ratom(2)))





returns the bond type between reactant atoms matching maps 1 and 2 in the reaction equation
Which is exactly what I wrote:
Quote:
bondType(bond(ratom(1), ratom(2))) == 2 ||


bondType(bond(ratom(1), ratom(2))) == 3
And what does "1-based" mean in the following phrase?
Quote:
the (1-based) atom indexes of the two atoms in a string: "index1-index2" (e.g. '2-3')
Besides, if there is something wrong with my query, why does the error message tell me that there is no input molecule?





By "query", do you mean the reaction definition? I built it with Marvin, so I don't know why there would be anything wrong with it. Or do you mean the substrates that I am trying to process? Please be more clear.

ChemAxon d76e6e95eb

25-09-2006 19:59:31

I am not sure, that I understand all of the details of your planned reaction (especially the exclude rule). However:





1. You should define the double or triple bond in the reaction scheme using a SMARTS bond "=,#". It is more effective than having an ANY bond in the scheme and refining it in the reactivity rule.





2. Your exclude rule is invalid


- The match function call is invalid. Missing parameters.


- The query in the match(...) function is not a valid SMARTS string.





It should look something like this (depending on your intent):


In exclude rule (exclude molecules from the reaction having imide functionality anywhere):


Code:
match(reactant(0), "NC=N")



In reactivity rule (do not saturate imide groups):


Code:
!match(ratom(1), "N[C:1]=N", 1)






Please see our query guide for the supported SMARTS features at:


http://www.chemaxon.com/jchem/doc/user/Query.html#smarts.


Please see the existing reactions as a guidance.

User 870ab5b546

25-09-2006 20:56:12

Thanks, that helped a lot. The documentation is not very clear as to the format of those match statements and the meaning of each of their parameters.





As for the SMARTS, you had previously suggested:
Quote:
1. Use SMARTS. Paste this into the MarvinSketch source editor (Edit/Source) and import it into the Sketcher:


C=,#C


(Direct pasting into the Marvin window will work soon when we corrected a bug)


2. Make two reactions, one with double bond and an other with triple bond.


3. Use R-groups (only if the double or triple bond does not take part in the reaction)


4. Simply draw an ANY bond and refine the reaction scheme in the Reactivity rule with match functions.


So I was trying to use option 4, but I guess you changed your mind since then.





OK, using the SMARTS statement:





[C:1]=,#[C,N:2]>[H][H]>[C:1]-[C,N:2]





and the exclusion rule:





match(ratom(1), "N[C:1]=[N]", 1)





I can get the page to work. However, with the configuration file below, I still get a "no input molecule" error. Either my reaction rule (using the ANY bond) or my reactivity rule (querying the bond type) is wrong. What am I doing wrong?





Code:
<?xml version="1.0" ?>


<MDocument>


  <MTextBox>


    <Field name="text">Pd/C</Field>


    <MPoint x="-5.266835689544678" y="-1.0117714330554008" />


    <MPoint x="-3.3514606132507296" y="-1.011771433055396" />


    <MPoint x="-3.3514606132507296" y="-2.5517714330553942" />


    <MPoint x="-5.26683568954612" y="-2.5517714330554" />


  </MTextBox>


  <MChemicalStruct>


    <reaction>


      <propertyList>


        <property dictRef="NAME" title="NAME">


          <scalar><![CDATA[C=,#(C,N) hydrogenation]]></scalar>


        </property>


        <property dictRef="REAGENTS" title="REAGENTS">


          <scalar><![CDATA[hydrogen, Pd/C]]></scalar>


        </property>


        <property dictRef="EXAMPLE" title="EXAMPLE">


          <scalar><![CDATA[CC#CC>>CCCC


C1CCC=CC1>>C1CCCCC1 |c:3|


C=Cc1ccccc1>>CCc1ccccc1


CC(C)C#N>>CC(C)CN


CN(C)C1=NCC=NC1>>CN(C)C1=NCCNC1 |c:6,t:3,12|]]></scalar>


        </property>


        <property dictRef="REACTIVITY" title="REACTIVITY">


          <scalar><![CDATA[bondType(bond(ratom(1), ratom(2))) == 2 || bondType(bond(ratom(1), ratom(2))) == 3]]></scalar>


        </property>


        <property dictRef="EXPLAIN_REACTIVITY" title="EXPLAIN_REACTIVITY">


          <scalar><![CDATA[Must be double or triple bond, not aromatic]]></scalar>


        </property>


        <property dictRef="EXCLUDE" title="EXCLUDE">


          <scalar><![CDATA[match(ratom(1), "N[C:1]=[N]", 1)]]></scalar>


        </property>


      </propertyList>


      <reactantList>


        <molecule molID="m1">


          <atomArray


              atomID="a1 a2"


              elementType="C C"


              mrvMap="1 2"


              mrvQueryProps="0 L,C,N:"


              x2="-11.806068327840173 -10.47237565375555"


              y2="3.12969197432289E-4 -0.7696635571285386"


              />


          <bondArray>


            <bond atomRefs2="a1 a2" order="1" queryType="Any" />


          </bondArray>


        </molecule>


      </reactantList>


      <agentList>


        <molecule molID="m2">


          <atomArray


              atomID="a1 a2"


              elementType="H H"


              x2="-5.616677224636078 -4.076677224636078"


              y2="1.5318208932876587 1.5318208932876587"


              />


          <bondArray>


            <bond atomRefs2="a1 a2" order="1" />


          </bondArray>


        </molecule>


      </agentList>


      <productList>


        <molecule molID="m3">


          <atomArray


              atomID="a1 a2"


              elementType="C C"


              mrvMap="1 2"


              mrvQueryProps="0 L,C,N:"


              x2="4.980893100832979 6.293581459830705"


              y2="-0.010743123374412189 -0.8160066033310409"


              />


          <bondArray>


            <bond atomRefs2="a1 a2" order="1" />


          </bondArray>


        </molecule>


      </productList>


    </reaction>


  </MChemicalStruct>


</MDocument>


User 870ab5b546

26-09-2006 01:00:02

Don't know why your last post hasn't appeared here after I received it, but...





Making progress. Moving the rule match(ratom(1), "N[C:1]=N", 1) from exclusion to reactivity helped greatly. (But why did it work fine as an exclusion rule when I used the SMARTS string for the reaction rule? Curious....) Again, you need to make clear in the documentation what you just told me: that rules that contain ratom(n) are reactivity rules, whereas rules that contain reactant(n) are exclusion rules.





So, now, when I run the configuration file below, I throw a new error:
Quote:
Error:





could not convert to double: java.lang.Object@1805b5


The stack trace:
Quote:
chemaxon.reaction.ReactionException: could not convert to double: java.lang.Object@1805b5


at chemaxon.reaction.ReactionPerformer.reactHit(ReactionPerformer.java:957)


at chemaxon.reaction.ReactionPerformer.reactOne(ReactionPerformer.java:804)


at chemaxon.reaction.ReactionPerformer.reactBase(ReactionPerformer.java:774)


at chemaxon.reaction.ReactionPerformer.react(ReactionPerformer.java:731)


at chemaxon.reaction.Reactor.reactMain(Reactor.java:1482)


at chemaxon.reaction.Reactor.react(Reactor.java:1422)


at org.apache.jsp.public_.reactor.jsp.result_jsp._jspService(result_jsp.java:136)
Any ideas what is going wrong now? The input molecules are the ones found in the configuration file. (These error messages of yours are very cryptic, and I encourage you to revisit them. For example, when the problem was that I used the wrong syntax for an exclusion rule, I was told that there was no input molecule. That just makes no sense, and it's not very useful for correcting my input.)





-- Bob





P.S. Yes, I understand that the SMARTS input is more efficient. But i don't want to know how to do it more efficiently; I want to know what is wrong with what I am doing!





Code:
<?xml version="1.0" ?>


<MDocument>


  <MTextBox id="o1" fontScale="10.0">


    <Field name="text">Pd/C</Field>


    <MPoint x="-5.266835689544678" y="-1.0117714330554008" />


    <MPoint x="-3.3514606132507296" y="-1.011771433055396" />


    <MPoint x="-3.3514606132507296" y="-2.5517714330553942" />


    <MPoint x="-5.26683568954612" y="-2.5517714330554" />


  </MTextBox>


  <MChemicalStruct>


    <reaction>


      <propertyList>


        <property dictRef="NAME" title="NAME">


          <scalar><![CDATA[C=,#(C,N) hydrogenation]]></scalar>


        </property>


        <property dictRef="REAGENTS" title="REAGENTS">


          <scalar><![CDATA[hydrogen, Pd/C]]></scalar>


        </property>


        <property dictRef="EXAMPLE" title="EXAMPLE">


          <scalar><![CDATA[CC#CC>>CCCC


C1CCC=CC1>>C1CCCCC1 |c:3|


C=Cc1ccccc1>>CCc1ccccc1


CC(C)C#N>>CC(C)CN


CN(C)C1=NCC=NC1>>CN(C)C1=NCCNC1]]></scalar>


        </property>


        <property dictRef="REACTIVITY" title="REACTIVITY">


          <scalar><![CDATA[(bondType(bond(ratom(1), ratom(2))) == 2 || bondType(bond(ratom(1), ratom(2))) == 3) && !match(ratom(1), "N[C:1]=N", 1)]]></scalar>


        </property>


        <property dictRef="EXPLAIN_REACTIVITY" title="EXPLAIN_REACTIVITY">


          <scalar><![CDATA[Must be double or triple bond, not aromatic]]></scalar>


        </property>


      </propertyList>


      <reactantList>


        <molecule molID="m1">


          <atomArray


              atomID="a1 a2"


              elementType="C C"


              mrvMap="1 2"


              mrvQueryProps="0 L,C,N:"


              x2="-11.806068327840173 -10.47237565375555"


              y2="3.12969197432289E-4 -0.7696635571285386"


              />


          <bondArray>


            <bond atomRefs2="a1 a2" order="1" queryType="Any" />


          </bondArray>


        </molecule>


      </reactantList>


      <agentList>


        <molecule molID="m2">


          <atomArray


              atomID="a1 a2"


              elementType="H H"


              x2="-5.616677224636078 -4.076677224636078"


              y2="1.5318208932876587 1.5318208932876587"


              />


          <bondArray>


            <bond atomRefs2="a1 a2" order="1" />


          </bondArray>


        </molecule>


      </agentList>


      <productList>


        <molecule molID="m3">


          <atomArray


              atomID="a1 a2"


              elementType="C C"


              mrvMap="1 2"


              mrvQueryProps="0 L,C,N:"


              x2="4.980893100832979 6.293581459830705"


              y2="-0.010743123374412189 -0.8160066033310409"


              />


          <bondArray>


            <bond atomRefs2="a1 a2" order="1" />


          </bondArray>


        </molecule>


      </productList>


    </reaction>


  </MChemicalStruct>


</MDocument>


User 870ab5b546

27-09-2006 12:36:58

A previous post of yours never appeared on this forum, although I received an email message saying it did, so I thought there might be something wrong with the forum. Besides, usually when you're working on an answer, you say, "We're working on it, we'll get back to you," and that didn't happen this time. So I thought maybe your post didn't "take". OK, now that I know you're working on it, I'll be patient.

ChemAxon d76e6e95eb

28-09-2006 16:02:40

We will answer your question soon.

ChemAxon d76e6e95eb

03-10-2006 12:05:11

Dear Bob, thank you for pointing out this problem, I could reproduce it, we try to correct it ASAP. Thank you for your patience as well.

ChemAxon e08c317633

16-10-2007 12:43:24

Hi Bob,
bobgr wrote:
I can't figure out what's wrong with it. When I look on the Chemical Terms Reference page at bondType, it shows, under Plugin Examples, Reaction Context Examples:
Quote:
bondType(bond(ratom(1), ratom(2)))





returns the bond type between reactant atoms matching maps 1 and 2 in the reaction equation
Which is exactly what I wrote:
Quote:
bondType(bond(ratom(1), ratom(2))) == 2 || bondType(bond(ratom(1), ratom(2))) == 3
This expression will work:


Code:
bondType(reactant(0), bond(ratom(1), ratom(2))) == 2 || bondType(reactant(0), bond(ratom(1), ratom(2))) == 3



In reaction context bondType() function also requires a molecule parameter if atoms are referred by atom indexes. In this case the


Code:
bond(ratom(1), ratom(2))



sub-expression is converted to


Code:
<atomIndex1>-<atomIndex2>



string, so the molecule parameter ("reactant(0)") is required.





We have corrected the documentation.


Sorry for the late answer.





Zsolt