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:
The log output is:
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:
Why?
P.S. I get the same result even when I omit the parity-setting.
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.