User 870ab5b546
14-07-2007 23:34:00
Hi,
I have created the attached reaction definition for E2 elimination reactions. In the Reaction Editor, the first example in the attached file (cyclohexylacetylide + isopropyl bromide -> cyclohexylacetylene + propene + Br-) works just fine. But when I draw the same substrates in a Marvin window, with or without a React arrow, and submit them to the following code:
the method calculates no products. (When I omit the convertToFrags() step, I get a ReactionException, with the message that Reactor requires two substrates, not one.) Can you give me any insight into what I am doing wrong?
I should mention that another reaction that I designed, for SN2 substitution, works just fine with nearly the same pair of substrates (just removing one C from the alkyl bromide). So it looks to me like the Java code is OK. But I can't figure out why there is a difference in behavior.
We are using JChem 3.2.6 and Marvin 4.1.8.
I'm sorry to bother you with amateurish questions like these, but I have spent hours on this problem and made no headway.
I have created the attached reaction definition for E2 elimination reactions. In the Reaction Editor, the first example in the attached file (cyclohexylacetylide + isopropyl bromide -> cyclohexylacetylene + propene + Br-) works just fine. But when I draw the same substrates in a Marvin window, with or without a React arrow, and submit them to the following code:
Code: |
public static Molecule[] doCalc(String reactants, String reactionDef) { try { Molecule substrate = MolImporter.importMol(reactants); return doCalc(substrate, reactionDef); } catch (MolFormatException e) { System.out.println("SynthSolver: caught MolFormatException on:\n" + reactants + "\n" + e.getMessage()); } return null; } // doCalc(AppConfig, String, String) private static Molecule[] doCalc(Molecule substrate, String reactionDef) { try { println("SynthSolver.doCalc: reactionDef:\n" + reactionDef); println("SynthSolver.doCalc: substrate:\n" + substrate.toFormat("mrv")); Molecule reactionmol = new MolHandler(reactionDef).getMolecule(); RxnMolecule reaction = RxnMolecule.getReaction(reactionmol); if (reaction == null) { System.out.println("SynthSolver.doCalc: reaction " + "definition molecule is null."); return null; } Reactor reactor = new Reactor(); reactor.setReaction(reaction); Molecule[] splitSubstrates = substrate.cloneMolecule().convertToFrags(); if (splitSubstrates.length <= 1) { reactor.setReactant(substrate); } else { reactor.setReactants(splitSubstrates); } Molecule[] products = reactor.react(); if (products != null) { println("SynthSolver.doCalc: " + (products.length == 1 ? "one product" : products.length + " products") + " calculated."); for (int i = 0; i < products.length; i++) println("Product " + (i + 1) + ":\n" + products[i].toFormat("mrv")); } else println("SynthSolver.doCalc: zero products calculated."); return products; } catch (MolFormatException e) { System.out.println("SynthSolver.doCalc: caught MolFormatException " + "on reaction definition:\n" + reactionDef + "\n" + e.getMessage()); } catch (ReactionException e) { System.out.println("SynthSolver.doCalc: caught ReactionException:\n" + e.getMessage()); } return null; } // doCalc(Molecule, String) |
the method calculates no products. (When I omit the convertToFrags() step, I get a ReactionException, with the message that Reactor requires two substrates, not one.) Can you give me any insight into what I am doing wrong?
I should mention that another reaction that I designed, for SN2 substitution, works just fine with nearly the same pair of substrates (just removing one C from the alkyl bromide). So it looks to me like the Java code is OK. But I can't figure out why there is a difference in behavior.
We are using JChem 3.2.6 and Marvin 4.1.8.
I'm sorry to bother you with amateurish questions like these, but I have spent hours on this problem and made no headway.