reaction definition for syn/anti addition no longer works

User 870ab5b546

12-04-2016 00:46:36

Reactor used to apply the following reaction definition, and ones similar to it, to alkenes to give the product of anti addition of Br2. However, in the version of JChem we are using now, 16.2.29, Reactor is now calculating no product. If I delete the R groups from the reaction definition, Reactor calculates products, but I need the R groups to indicate the proper anti stereochemistry of addition. Has the format of these reaction definitions changed? If so, how do I rewrite the reaction definition? 


I looked through your documentation on Reactor and Chemical Terms, and other than one reference to allowing specification of syn/anti stereochemistry since JChem 5.5, I found nothing about syn/anti addition. The solution to the syn/anti problem, ChemAxon's suggestion, was described in this forum post


I should mention that this problem is critically time-sensitive for me right now, as we have just started the chapter on alkene additions, and I will not be able to assign synthesis questions to my students if this problem can't be fixed quickly.


<?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>

User 870ab5b546

12-04-2016 17:12:49

Here's the relevant code that we use, and some log output from applying your bromination_anti.mrv reaction definition to cyclohexene.


final String name = ChemUtils.getProperty(moleculeOfRxn, RXN_NAME);
caller.debugPrint("\nReaction: ", name);
isDielsAlder = name != null && name.indexOf("Diels-Alder") >= 0;
rxnMol = RxnMolecule.getReaction(moleculeOfRxn);
if (rxnMol == null) {
Utils.alwaysPrint(SELF + "reaction definition molecule is null.");
return false;
} // if rxnMol is null
reactor.setReaction(rxnMol);
...
Molecule[] reactorProds = null;
boolean gotProducts = false;
int perm = 0;
for (final Molecule[] starters : allPerms) {
perm++;
caller.debugPrint("Permutation ", perm, " of ", numPerms,
": ", starters);
reactor.setReactants(starters);
for (int reactCt = 0; reactCt < MAX_REACT; reactCt++) {
reactorProds = reactor.react();
if (Utils.isEmpty(reactorProds)) {
caller.debugPrint("Product set ", reactCt + 1,
" from Reactor for permutation ", perm,
" is empty; breaking.");
break;
} // if there are no products
} // while still getting products from reactor
if (gotProducts && !keepPermuting) {
// if keepPermuting, get B + A as well as A + B
break; // no need to try more permutations
}
} // for each permutation of the substrates
if (!gotProducts) caller.debugPrint("No products from this array.");

Reaction: bromination
Permutation 1 of 1: [[#6]-1-[#6]-[#6]-[#6]=[#6]-[#6]-1 |c:3|]
Product set 1 from Reactor for permutation 1 is empty; breaking.
No products from this array.

 

User 870ab5b546

12-04-2016 18:26:05

I recompiled our code with JChem versions going back to JChem 14.12.15. In JChem 14.12.15, the stereochemistry function works properly!


Reaction: bromination
Major or minor = null, explanation = null
SingleRxnSolver.calcProducts: Reaction: bromination; submitting substrates for the 1st time.
This time, reaction products are: []
After substituting reaction product 0, substArray is [[#6]-1-[#6]-[#6]-[#6]=[#6]-[#6]-1 |c:3|];
Submitting substrate array 1 to Reactor: [[#6]-1-[#6]-[#6]-[#6]=[#6]-[#6]-1 |c:3|]
Generated 1 permutations.
Permutation 1 of 1: [[#6]-1-[#6]-[#6]-[#6]=[#6]-[#6]-1 |c:3|]
Product set 1 obtained from Reactor for permutation 1.
Initial substrates reacted to give 1 product(s): [Br[#6@@H]-1-[#6]-[#6]-[#6]-[#6]-[#6@H]-1Br |r|]

But as of JChem 15.2.16, it does not:


Reaction: bromination
Major or minor = null, explanation = null
SingleRxnSolver.calcProducts: Reaction: bromination; submitting substrates for the 1st time.
This time, reaction products are: []
After substituting reaction product 0, substArray is [[#6]-1-[#6]-[#6]-[#6]=[#6]-[#6]-1 |c:3|];
Submitting substrate array 1 to Reactor: [[#6]-1-[#6]-[#6]-[#6]=[#6]-[#6]-1 |c:3|]
Generated 1 permutations.
Permutation 1 of 1: [[#6]-1-[#6]-[#6]-[#6]=[#6]-[#6]-1 |c:3|]
Product set 1 from Reactor for permutation 1 is empty; breaking.
No products from this array.

So I am not crazy. Something broke in early 2015. It needs to be fixed! ASAP, pretty please!


Meanwhile, I can back off to JChem 14.12.15, but I am concerned that I may break something else; I am also concerned that our JChem database tables, which have been regenerated with JChem 16.2.29, may not be compatible with JChem 14.12.15. Can you give me any guidance?


Your Reactor home page says, "Prochiral reaction schemes are also supported since version 5.5, allowing the user to manage syn/anti additions." So, I've been looking for information in your documentation about how to manage syn/anti additions, but to no avail, except for the forum discussions that I already referenced above. I downloaded your reaction definitions library and looked at Halogen addition to alkenes.mrv and Oxidation of alkenes with peracids.mrv, but neither specifies the stereochemistry of addition across the alkene. So again, I must draw the conclusion that you have removed, either inadvertently or purposefully, the feature that allows a reaction definition to specify syn/anti addition across an alkene, and I must beg you to please restore this feature ASAP, as it is extraordinarily important to my ability to teach.

ChemAxon e08c317633

15-04-2016 13:41:23

Hi Bob,


In JChem 15.2.16 the R-group handling in Reactor has been modified, and the modification broke this feature.


To switch back to old behavior set the search options for Reactor as shown in the code example below.


import java.io.IOException;

import chemaxon.formats.MolExporter;
import chemaxon.formats.MolImporter;
import chemaxon.reaction.ReactionException;
import chemaxon.reaction.Reactor;
import chemaxon.sss.SearchConstants;
import chemaxon.sss.search.MolSearchOptions;
import chemaxon.struc.Molecule;
import chemaxon.struc.StereoConstants;

public class ReactorSynAntiAdditionExample {

public static void main(String[] args) throws IOException, ReactionException {
MolImporter importer = new MolImporter("bromination.mrv");
Molecule reaction = importer.read();
Molecule reactant = MolImporter.importMol("[#6]-1-[#6]-[#6]-[#6]=[#6]-[#6]-1 |c:3|");

Reactor reactor = new Reactor();
// Set search options
reactor.setSearchOptions(getSearchOptions().toString());
reactor.setReaction(reaction);
reactor.setReactants(new Molecule[]{ reactant });
Molecule products[] = null;
while ((products = reactor.react()) != null) {
for (Molecule product : products) {
System.out.println(MolExporter.exportToFormat(product, "smiles"));
}
}
}

private static MolSearchOptions getSearchOptions() {
MolSearchOptions mso = new MolSearchOptions(MolSearchOptions.SUBSTRUCTURE);
mso.setOrderSensitiveSearch(true);
mso.setDoubleBondStereoMatchingMode(StereoConstants.DBS_ALL);
mso.setMarkushEnabled(false);
// important
mso.setUndefinedRAtom(SearchConstants.UNDEF_R_MATCHING_ALL);
return mso;
}

}


The output:


Br[C@@H]1CCCC[C@H]1Br
Br[C@H]1CCCC[C@@H]1Br

Input files are attached.


Sorry for the inconvenience.


Zsolt

User 870ab5b546

15-04-2016 16:16:28

Thank you. In getSearchOptions(), you set five MolSearchOptions parameters. What is the default value of each of these parameters, and what is the effect of changing them? I understand the purpose of the last two, MarkushEnabled and UndefinedRAtom, but I don't understand the purpose of the first three.

ChemAxon e08c317633

18-04-2016 09:46:25










bobgr wrote:

Thank you. In getSearchOptions(), you set five MolSearchOptions parameters. What is the default value of each of these parameters, and what is the effect of changing them? I understand the purpose of the last two, MarkushEnabled and UndefinedRAtom, but I don't understand the purpose of the first three.



These are the search options we explicitly set for Reactor. I cannot go into details here.