User 870ab5b546
15-04-2016 16:51:47
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