Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.

Support Ticket System is replacing forum

This forum was converted into a searchable archive. You cannot add posts here any more. For support please use our new Ticket System.

Create your first ticket
Reactor throws exception for some reactivity rules
To watch this topic for replies  Register (enables digests) or give email address:
This topic is locked: you cannot edit posts or make replies.
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
Bob

Joined: 15 Jun 2004
Posts: 2629

View user's profile

Back to top
Link to postPosted: Fri Apr 15, 2016 5:51 pmPost subject: exception upon calculating products Reply with quote

While waiting for your response to the previous question, I went ahead and made your recommended changes and recompiled with JChem 16.2.29. A simple bromination definition worked well and gave the correct products. However, when I gave a definition that contained a reactivity rule, Reactor threw an exception, copied below. There's nothing remarkable about the reactivity rule I give here. If I delete the reactivity rule, Reactor does not throw an exception. What's going on?

(By the way, I need to include a separate reaction definition for trisubstituted alkenes because Reactor applies the wrong stereochemistry to these substrates; that is, it gives the product of syn addition to trisubstituted alkenes when the reaction defines anti addition, and vice versa. This is a longstanding bug, and I haven't asked for it to be fixed because I have a workaround in place, that is, having a separate reaction definition that applies to trisubstituted alkenes, but it would be nice if you fixed it.) 

Permutation 1 of 1: [[#6]-[#6]\[#6]=[#6](/[#6])-[#6]-[#6]]
SingleRxnSolver.calcProducts: caught ReactionException:
An error occured while evaluating reactivity rule.
Caused by:
could not convert to double: java.lang.Object@150ea69
Reaction molecule that caused exception:
<?xml version="1.0" encoding="UTF-8"?>
<cml xmlns="http://www.chemaxon.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com/marvin/schema/mrvSchema_16_02_15.xsd" version="ChemAxon file format v16.02.15, generated by v16.2.29.0">
<MDocument>
  <MChemicalStruct>
    <reaction>
      <arrow type="DEFAULT" x1="1.9145117558843503" y1="6.634543318508632" x2="6.349019568100871" y2="6.543534057100593"/>
      <propertyList>
        <property dictRef="NAME" title="NAME">
          <scalar><![CDATA[bromination of a trisubstituted alkene]]></scalar>
        </property>
        <property dictRef="REACTIVITY" title="REACTIVITY">
          <scalar><![CDATA[hCount(ratom(1)) + hCount(ratom(2)) == 1]]></scalar>
        </property>
      </propertyList>
      <reactantList>
        <molecule molID="m1">
          <atomArray>
            <atom id="a1" elementType="C" mrvMap="1" x2="-0.30241796163212165" y2="6.695844328841227"/>
            <atom id="a2" elementType="C" mrvMap="2" x2="-1.8424518427502026" y2="6.695844328841227"/>
            <atom id="a3" elementType="R" mrvMap="3" rgroupRef="1" x2="-2.612451842750202" y2="8.029523450669263" ligandOrder="a2"/>
            <atom id="a4" elementType="R" mrvMap="4" rgroupRef="2" x2="-2.612451842750202" y2="5.3621652070131915" ligandOrder="a2"/>
            <atom id="a5" elementType="R" mrvMap="5" rgroupRef="3" x2="0.4675820383678786" y2="5.3621652070131915" ligandOrder="a1"/>
            <atom id="a6" elementType="R" mrvMap="6" rgroupRef="4" x2="0.4675820383678786" y2="8.029523450669263" ligandOrder="a1"/>
          </atomArray>
          <bondArray>
            <bond id="b1" atomRefs2="a1 a2" order="2"/>
            <bond id="b2" atomRefs2="a2 a3" order="1"/>
            <bond id="b3" atomRefs2="a2 a4" order="1"/>
            <bond id="b4" atomRefs2="a1 a5" order="1"/>
            <bond id="b5" atomRefs2="a1 a6" order="1"/>
          </bondArray>
        </molecule>
      </reactantList>
      <productList>
        <molecule molID="m2">
          <atomArray>
            <atom id="a1" elementType="C" mrvMap="1" x2="11.378104480231892" y2="6.440502322157878"/>
            <atom id="a2" elementType="C" mrvMap="2" x2="9.838070599113811" y2="6.440502322157878"/>
            <atom id="a3" elementType="Br" mrvMap="8" x2="12.984649632246231" y2="6.5021996716380555"/>
            <atom id="a4" elementType="Br" mrvMap="7" x2="8.403951462668653" y2="6.441709489027713"/>
            <atom id="a5" elementType="R" mrvMap="3" rgroupRef="1" x2="9.068070599113812" y2="7.774181443985913" ligandOrder="a2"/>
            <atom id="a6" elementType="R" mrvMap="4" rgroupRef="2" x2="9.068070599113812" y2="5.106823200329842" ligandOrder="a2"/>
            <atom id="a7" elementType="R" mrvMap="5" rgroupRef="3" x2="12.148104480231892" y2="5.106823200329842" ligandOrder="a1"/>
            <atom id="a8" elementType="R" mrvMap="6" rgroupRef="4" x2="12.148104480231892" y2="7.774181443985913" ligandOrder="a1"/>
          </atomArray>
          <bondArray>
            <bond id="b1" atomRefs2="a1 a2" order="1"/>
            <bond id="b2" atomRefs2="a1 a3" order="1">
              <bondStereo>H</bondStereo>
            </bond>
            <bond id="b3" atomRefs2="a2 a4" order="1">
              <bondStereo>W</bondStereo>
            </bond>
            <bond id="b4" atomRefs2="a2 a5" order="1"/>
            <bond id="b5" atomRefs2="a2 a6" order="1"/>
            <bond id="b6" atomRefs2="a1 a7" order="1"/>
            <bond id="b7" atomRefs2="a1 a8" order="1"/>
          </bondArray>
        </molecule>
      </productList>
    </reaction>
  </MChemicalStruct>
</MDocument>
</cml>
chemaxon.reaction.ReactionException: An error occured while evaluating reactivity rule.
Caused by:
could not convert to double: java.lang.Object@150ea69
	at chemaxon.reaction.ReactionPerformer.reactHit(ReactionPerformer.java:1103)
	at chemaxon.reaction.ReactionPerformer.reactOne(ReactionPerformer.java:763)
	at chemaxon.reaction.ReactionPerformer.reactOneDuplicateFiltered(ReactionPerformer.java:726)
	at chemaxon.reaction.ReactionPerformer.reactBase(ReactionPerformer.java:711)
	at chemaxon.reaction.ReactionPerformer.react(ReactionPerformer.java:651)
	at chemaxon.reaction.Reactor.react(Reactor.java:1115)
	at com.epoch.synthesis.SingleRxnSolver.submitResizedArray(SingleRxnSolver.java:423)
	at com.epoch.synthesis.SingleRxnSolver.doOneRxnLoop(SingleRxnSolver.java:352)
	at com.epoch.synthesis.SingleRxnSolver.calcProducts(SingleRxnSolver.java:175)
	at com.epoch.synthesis.SynthSolver.getProducts(SynthSolver.java:391)
	at com.epoch.synthesis.SynthSolver.getProducts(SynthSolver.java:278)
	at com.epoch.synthesis.SynthSolver.getProducts(SynthSolver.java:128)
	at org.apache.jsp.public_.ACEStructure.pasteSynthTest_jsp._jspService(pasteSynthTest_jsp.java:124)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:889)
	at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:744)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:2282)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: chemaxon.nfunk.jep.ParseException: could not convert to double: java.lang.Object@150ea69
	at chemaxon.nfunk.jep.JEP.getValue(JEP.java:470)
	at chemaxon.jep.ChemJEP.evaluate_double(ChemJEP.java:170)
	at chemaxon.jep.ChemJEP.evaluate_boolean(ChemJEP.java:227)
	at chemaxon.reaction.ReactionPerformer.reactHit(ReactionPerformer.java:1094)
	... 33 more
Zsolt
ChemAxon personnel
Joined: 11 Jan 2006
Posts: 1163

View user's profile

Back to top
Link to postPosted: Mon Apr 18, 2016 2:27 pmPost subject: Reply with quote

bobgr wrote:

OK, I understand. What about the exception thrown when a reactivity rule is present?

We are examining the issue.

Zsolt
ChemAxon personnel
Joined: 11 Jan 2006
Posts: 1163

View user's profile

Back to top
Link to postPosted: Wed Apr 20, 2016 10:50 amPost subject: Reply with quote

The error has been fixed. The fixed version will be released next week.

Bob

Joined: 15 Jun 2004
Posts: 2629

View user's profile

Back to top
Link to postPosted: Wed Apr 20, 2016 3:16 pmPost subject: Reply with quote

Thank you. 

I don't suppose you feel any motivation to fix the longstanding bug regarding trisubstituted alkenes that I mentioned above? With this definition:

<?xml version="1.0" ?>
<cml>
<MDocument>
  <MChemicalStruct>
    <reaction>
      <arrow type="DEFAULT" x1="1.9145117558843503" y1="6.634543318508632" x2="6.349019568100871" y2="6.543534057100593" />
      <propertyList>
        <property dictRef="NAME" title="NAME">
          <scalar><![CDATA[bromination of an alkene]]></scalar>
        </property>
      </propertyList>
      <reactantList>
        <molecule molID="m1">
          <atomArray>
            <atom id="a1" elementType="C" mrvMap="1"
                  x2="-0.30241796163212165" y2="6.695844328841227" />
            <atom id="a2" elementType="C" mrvMap="2"
                  x2="-1.8424518427502026" y2="6.695844328841227" />
            <atom id="a3" elementType="R" mrvMap="3" rgroupRef="1"
                  x2="-2.612451842750202" y2="8.029523450669263"
                  ligandOrder="a2" />
            <atom id="a4" elementType="R" mrvMap="4" rgroupRef="2"
                  x2="-2.612451842750202" y2="5.3621652070131915"
                  ligandOrder="a2" />
            <atom id="a5" elementType="R" mrvMap="5" rgroupRef="3"
                  x2="0.4675820383678786" y2="5.3621652070131915"
                  ligandOrder="a1" />
            <atom id="a6" elementType="R" mrvMap="6" rgroupRef="4"
                  x2="0.4675820383678786" y2="8.029523450669263"
                  ligandOrder="a1" />
          </atomArray>
          <bondArray>
            <bond atomRefs2="a1 a2" order="2" />
            <bond atomRefs2="a2 a3" order="1" />
            <bond atomRefs2="a2 a4" order="1" />
            <bond atomRefs2="a1 a5" order="1" />
            <bond atomRefs2="a1 a6" order="1" />
          </bondArray>
        </molecule>
      </reactantList>
      <productList>
        <molecule molID="m2">
          <atomArray>
            <atom id="a1" elementType="C" mrvMap="1"
                  x2="11.378104480231892" y2="6.440502322157878" />
            <atom id="a2" elementType="C" mrvMap="2"
                  x2="9.838070599113811" y2="6.440502322157878" />
            <atom id="a3" elementType="Br" mrvMap="8"
                  x2="12.984649632246231" y2="6.5021996716380555" />
            <atom id="a4" elementType="Br" mrvMap="7"
                  x2="8.403951462668653" y2="6.441709489027713" />
            <atom id="a5" elementType="R" mrvMap="3" rgroupRef="1"
                  x2="9.068070599113812" y2="7.774181443985913"
                  ligandOrder="a2" />
            <atom id="a6" elementType="R" mrvMap="4" rgroupRef="2"
                  x2="9.068070599113812" y2="5.106823200329842"
                  ligandOrder="a2" />
            <atom id="a7" elementType="R" mrvMap="5" rgroupRef="3"
                  x2="12.148104480231892" y2="5.106823200329842"
                  ligandOrder="a1" />
            <atom id="a8" elementType="R" mrvMap="6" rgroupRef="4"
                  x2="12.148104480231892" y2="7.774181443985913"
                  ligandOrder="a1" />
          </atomArray>
          <bondArray>
            <bond atomRefs2="a1 a2" order="1" />
            <bond atomRefs2="a1 a3" order="1">
              <bondStereo>H</bondStereo>
            </bond>
            <bond atomRefs2="a2 a4" order="1">
              <bondStereo>W</bondStereo>
            </bond>
            <bond atomRefs2="a2 a5" order="1" />
            <bond atomRefs2="a2 a6" order="1" />
            <bond atomRefs2="a1 a7" order="1" />
            <bond atomRefs2="a1 a8" order="1" />
          </bondArray>
        </molecule>
      </productList>
    </reaction>
  </MChemicalStruct>
</MDocument>
</cml>

C1CCC=CC1 correctly gives Br[C@H]1CCCC[C@@H]1Br.Br[C@@H]1CCCC[C@H]1Br

But CC1=CCCCC1 incorrectly gives C[C@@]1(Br)CCCC[C@@H]1Br.C[C@]1(Br)CCCC[C@H]1Br

So we need separate reaction definitions for trisubstituted alkenes versus other alkenes.

Zsolt
ChemAxon personnel
Joined: 11 Jan 2006
Posts: 1163

View user's profile

Back to top
Link to postPosted: Fri Apr 22, 2016 10:13 amPost subject: Reply with quote

It's not about motivation, it's about priorities. Most of our users don't need this feature currently.

Bob

Joined: 15 Jun 2004
Posts: 2629

View user's profile

Back to top
Link to postPosted: Fri Apr 22, 2016 1:41 pmPost subject: Reply with quote

I understand. Still, let me just throw one more appeal to your pride as an expert programmer. Surely you don't want this ugly bug to linger in your beautiful product.  

Bob

Joined: 15 Jun 2004
Posts: 2629

View user's profile

Back to top
Link to postPosted: Tue Apr 26, 2016 2:48 pmPost subject: Reply with quote

zmohacsi wrote:

The error has been fixed. The fixed version will be released next week.

I can confirm that Reactor seems to be working properly in JChem 16.4.25. I am getting the correct stereochemical results.

I suggest that you add documentation on how to implement selective syn/anti additions to alkenes. You mention the capability on the Reactor home page:

Prochiral reaction schemes are also supported since version 5.5, allowing the user to manage syn/anti additions.

but nowhere in the documentation, at least as far as I can find, tells the user how to do it. The developer would have to search the forum to learn how to do it.

Zsolt
ChemAxon personnel
Joined: 11 Jan 2006
Posts: 1163

View user's profile

Back to top
Link to postPosted: Mon May 02, 2016 10:47 amPost subject: Reply with quote

Thanks for the feedback. We will update the documentation.

This topic is locked: you cannot edit posts or make replies.
Page 1 of 1


To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum