problems when altering stereochemistry

User 870ab5b546

07-08-2007 16:45:55

I'm sure the solution to this problem is obvious, but I'm just not getting it....





I'm using the following code to set the stereochemistry of a bond:





Code:
                        if (stereoProds[prodIdx * 2] == null


                                || stereoProds[prodIdx * 2].getAtomCount() == 0) {


                            stereoProds[prodIdx * 2] = prod.cloneMolecule();


                            stereoProds[prodIdx * 2 + 1] = prod.cloneMolecule();


                        }


                        // recover stereo information


                        int newStereo = stereoBondsInfo.get(infoStart + 2);


                        // change stereo of 1st new prod


                        prodAtm0 = stereoProds[prodIdx * 2].getAtom(atm0Idx);


                        prodAtm1 = stereoProds[prodIdx * 2].getAtom(atm1Idx);


                        prodBond = (MolBond) prodAtm0.getEdgeTo(prodAtm1);


                        prodBond.setFlags(newStereo, MolBond.STEREO1_MASK);


                        boolean success = stereoProds[prodIdx * 2].setParity(atm0Idx,


                                stereoProds[prodIdx * 2].getLocalParity(atm0Idx));


                        println("Was "  + (success ? "" : "not ") + "successful in "


                                + "setting parity of atom " + prodAtm0.getSymbol()


                                + (atm0Idx + 1) + " in 1st corrected product to "


                                + stereoProds[prodIdx * 2].getLocalParity(atm0Idx));


                        // change stereo of 2nd new prod to opposite of 1st


                        newStereo = (newStereo == MolBond.UP ? MolBond.DOWN


                                : newStereo == MolBond.DOWN ? MolBond.UP


                                : newStereo);


                        prodAtm0 = stereoProds[prodIdx * 2 + 1].getAtom(atm0Idx);


                        prodAtm1 = stereoProds[prodIdx * 2 + 1].getAtom(atm1Idx);


                        prodBond = (MolBond) prodAtm0.getEdgeTo(prodAtm1);


                        prodBond.setFlags(newStereo, MolBond.STEREO1_MASK);


                        success = stereoProds[prodIdx * 2 + 1].setParity(atm0Idx,


                                stereoProds[prodIdx * 2 + 1].getLocalParity(atm0Idx));


                        println("Was " + (success ? "" : "not ") + "successful in "


                                + "setting parity of atom " + prodAtm0.getSymbol()


                                + (atm0Idx + 1) + " in 2nd corrected product to "


                                + stereoProds[prodIdx * 2 + 1].getLocalParity(atm0Idx));


                        println("Reset: \n" + prod.toFormat("mrv") + "to:\n"


                                + stereoProds[prodIdx * 2].toFormat("mrv") + "and:\n"


                                + stereoProds[prodIdx * 2 + 1].toFormat("mrv"));








The log output is:





Code:
Was successful in setting parity of atom C3 in 1st corrected product to 48


Was successful in setting parity of atom C3 in 2nd corrected product to 48


Reset:


<?xml version="1.0" ?>


<MDocument>


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4 a5 a6 a7 a8"


          elementType="C C C C C C Br Br"


          mrvMap="0 1 2 0 0 0 3 4"


          />


      <bondArray>


        <bond atomRefs2="a1 a2" order="1" />


        <bond atomRefs2="a1 a6" order="1" />


        <bond atomRefs2="a2 a3" order="1" />


        <bond atomRefs2="a2 a8" order="1" />


        <bond atomRefs2="a3 a4" order="1" />


        <bond atomRefs2="a3 a7" order="1" />


        <bond atomRefs2="a4 a5" order="1" />


        <bond atomRefs2="a5 a6" order="1" />


      </bondArray>


    </molecule>


  </MChemicalStruct>


</MDocument>


to:


<?xml version="1.0" ?>


<MDocument>


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4 a5 a6 a7 a8"


          elementType="C C C C C C Br Br"


          mrvMap="0 1 2 0 0 0 3 4"


          />


      <bondArray>


        <bond atomRefs2="a1 a2" order="1" />


        <bond atomRefs2="a1 a6" order="1" />


        <bond atomRefs2="a2 a3" order="1" />


        <bond atomRefs2="a2 a8" order="1">


          <bondStereo>H</bondStereo>


        </bond>


        <bond atomRefs2="a3 a4" order="1" />


        <bond atomRefs2="a3 a7" order="1">


          <bondStereo>W</bondStereo>


        </bond>


        <bond atomRefs2="a4 a5" order="1" />


        <bond atomRefs2="a5 a6" order="1" />


      </bondArray>


    </molecule>


  </MChemicalStruct>


</MDocument>


and:


<?xml version="1.0" ?>


<MDocument>


  <MChemicalStruct>


    <molecule molID="m1">


      <atomArray


          atomID="a1 a2 a3 a4 a5 a6 a7 a8"


          elementType="C C C C C C Br Br"


          mrvMap="0 1 2 0 0 0 3 4"


          />


      <bondArray>


        <bond atomRefs2="a1 a2" order="1" />


        <bond atomRefs2="a1 a6" order="1" />


        <bond atomRefs2="a2 a3" order="1" />


        <bond atomRefs2="a2 a8" order="1">


          <bondStereo>W</bondStereo>


        </bond>


        <bond atomRefs2="a3 a4" order="1" />


        <bond atomRefs2="a3 a7" order="1">


          <bondStereo>H</bondStereo>


        </bond>


        <bond atomRefs2="a4 a5" order="1" />


        <bond atomRefs2="a5 a6" order="1" />


      </bondArray>


    </molecule>


  </MChemicalStruct>


</MDocument>






Note that the calculated local parity after the C-Br bond is set to a stereobond is EITHER. Why?





When I paste either of the product structures into Marvin 4.1.8 or 4.1.11, no stereochemistry is not shown. Why not?





Furthermore, when I convert either product structure into SMILES, I get a structure with no stereochemistry indicated:





Code:
[Br:3][CH:2]1CCCC[CH:1]1[Br:4]






Why?





P.S. I get the same result even when I omit the parity-setting.

User f359e526a1

08-08-2007 07:04:20

All right, will have a look, thanks.

ChemAxon 25dcd765a3

09-08-2007 10:59:40

Hi Bob,





The wedge setting


Code:
prodBond.setFlags(newStereo, MolBond.STEREO1_MASK);



has meaning only if the molecule is in 2D.


Your original molecule has no coordinates which means that it is in 0D.


So in case of 0D the parity setting is the solution.





But in your case:


Code:
boolean success = stereoProds[prodIdx * 2].setParity(atm0Idx,


                                stereoProds[prodIdx * 2].getLocalParity(atm0Idx));



you want to set some parity to the specified atom. But let's see what is that parity that you would like to set. The one which is returned by getLocalParity(..). Note, that you did not change the parity of the atom as the wedge setting had no parity effect in 0D.





So if your molecule is in 2D, the wedge setting will change the parity, but in case of 0D only the setParity(..) function will work. In 3D you have to change the coordinates to achieve the needed parity.

User 870ab5b546

09-08-2007 14:05:12

I didn't realize I could have a molecule in 0D, especially when it looks so pretty when I convert it into an image.





The molecule comes out of Reactor. Can I do a clean2D on a 0D molecule to give it 2D coordinates?

ChemAxon 25dcd765a3

09-08-2007 14:11:17

Quote:
Can I do a clean2D on a 0D molecule to give it 2D coordinates?
Sure.


If you do so, then only the wedge change is necessary to achieve the given stereochemistry.


Or equally you can work on 0D (using parity settings) and clean your structure to 2D, if neccessary.