reaction exception due to standardizer

User 870ab5b546

31-07-2007 02:28:48

Hi,





I have these lines in my reaction definition:





Code:
<StandardizerConfiguration Version ="1.0">


<Actions>


<Aromatize ID="aromatize" Type="general" Groups="reactant1"/>


<Transformation ID="P(+)-C(-) -> P=C" Structure="[#6-][P+]>>C=P" Type="string" Groups="reactant1"/>


<Aromatize ID="aromatize" Type="general" Groups="reactant2"/>


<Transformation ID="P(+)-C(-) -> P=C" Structure="[#6-][P+]>>C=P" Type="string" Groups="reactant2"/>


</Actions>


</StandardizerConfiguration>






When I load the reaction, I get this message:





Code:
chemaxon.reaction.ReactionException: chemaxon.reaction.ReactionException: Could not read reaction: [#6-][P ]>>C=P


Caused by:


Could not read reaction: [#6-][P ]>>C=P


        at chemaxon.reaction.Reactor.setReactionDefinedStandardizer(Reactor.java:702)


        at chemaxon.reaction.Reactor.setReaction(Reactor.java:1008)


        at com.prenhall.epoch.synthesis.SynthSolver.getProducts(SynthSolver.java:142)


        at com.prenhall.epoch.synthesis.SynthSolver.getProducts(SynthSolver.java:53)


        at org.apache.jsp.public_.pasteSynthTest_jsp._jspService(pasteSynthTest_jsp.java:72)








However, I have similar lines in a different reaction that works just fine:





Code:
<StandardizerConfiguration Version ="0.1">


   <Actions>


<Transformation ID="O-enolate to C-enolate" Structure="[#8-]C=C>>[#6-]C=O" Type="string" Groups="reactant1"/>   </Actions>


</StandardizerConfiguration>






Is the + charge messing things up???





-- Bob

ChemAxon e08c317633

01-08-2007 09:36:17

Hi,
bobgr wrote:
Hi,





I have these lines in my reaction definition:





Code:
<StandardizerConfiguration Version ="1.0">


<Actions>


<Aromatize ID="aromatize" Type="general" Groups="reactant1"/>


<Transformation ID="P(+)-C(-) -> P=C" Structure="[#6-][P+]>>C=P" Type="string" Groups="reactant1"/>


<Aromatize ID="aromatize" Type="general" Groups="reactant2"/>


<Transformation ID="P(+)-C(-) -> P=C" Structure="[#6-][P+]>>C=P" Type="string" Groups="reactant2"/>


</Actions>


</StandardizerConfiguration>






When I load the reaction, I get this message:





Code:
chemaxon.reaction.ReactionException: chemaxon.reaction.ReactionException: Could not read reaction: [#6-][P ]>>C=P


Caused by:


Could not read reaction: [#6-][P ]>>C=P


        at chemaxon.reaction.Reactor.setReactionDefinedStandardizer(Reactor.java:702)


        at chemaxon.reaction.Reactor.setReaction(Reactor.java:1008)


        at com.prenhall.epoch.synthesis.SynthSolver.getProducts(SynthSolver.java:142)


        at com.prenhall.epoch.synthesis.SynthSolver.getProducts(SynthSolver.java:53)


        at org.apache.jsp.public_.pasteSynthTest_jsp._jspService(pasteSynthTest_jsp.java:72)








I tried to reproduce the error. I used a separate standardizer configuration XML file:





Code:
react -r reaction.mrv -S standardizer.xml reactant1.smiles reactant2.smiles






The standardizer.xml contained exactly the configuration you posted and it worked fine. If I change the "[#6-][P+]>>C=P" reaction SMARTS string to "[#6-][P ]>>C=P", then I get the same exception:





Code:
chemaxon.reaction.ReactionException: Could not read reaction: [#6-][P ]>>C=P






I think the "[#6-][P+]>>C=P" string was modified somehow, and this caused the error. Could you check it if this happened?





Zsolt

User 870ab5b546

01-08-2007 14:06:11

Yes, you are right. I used Javascript's escape() function to encode the reaction definition before sending it serverside, and I now learn that it does not encode the + character properly. I need to use encodeURIComponent() instead.





Sorry to bother you.