User 870ab5b546
01-05-2013 16:15:28
The code:
int molIndex = 0;
debugPrint("Before ungrouping shortcut groups in molecule ",
++molIndex, ": ", mol);
debugPrintMRV(SELF + "mol in MRV:\n", mol);
mol.setGUIContracted(false);
mol.ungroupSgroups(SHORTCUT_GROUPS);
debugPrint("After ungrouping shortcut groups in molecule ",
molIndex, ": ", mol);
debugPrintMRV(SELF + "molecule ", molIndex, " in MRV:\n", mol);
The debugging output:
Before ungrouping shortcut groups in molecule 3: *[Pd]([H])(Br)(P(C1=CC=CC=C1)(C1=CC=CC=C1)C1=CC=CC=C1)P(C1=CC=CC=C1)(C1=CC=CC=C1)C1=CC=CC=C1.CCOC(=O)\C=C\C1=CC=CC=C1 |c:7,9,14,16,21,23,29,31,36,38,43,45,56,58,t:5,12,19,27,34,41,54,m:0:48.47,C:23.25,4.3,0.0|
MechData.extractMolecules: The remaining atoms are in the same stage.
MechData.extractMolecules: mol in MRV:
<?xml version="1.0"?>
<cml version="ChemAxon file format v5.10.0, generated by v5.11.5">
<MDocument>
<MChemicalStruct>
<molecule molID="m1">
<atomArray atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16" elementType="Pd H Br P P R R R R R R C C R X R" sgroupRef="0 0 0 0 0 sg2 sg3 sg4 sg5 sg6 sg7 sg1 sg1 sg8 0 sg9" x2="-18.205091512033988 -17.116147069006708 -17.116147069006708 -19.294035955061272 -19.294035955061272 -19.294035955061272 -20.834035955061275 -20.382980398088556 -20.834035955061275 -20.382980398088556 -19.294035955061272 -15.647103106806327 -15.647103106806327 -14.698424213860129 -15.647103106806327 -16.595781999752525" y2="2.9609431947980616 4.0498876378253446 1.8719987517707786 1.8719987517707786 4.0498876378253446 5.589887637825345 4.0498876378253446 5.1388320808526275 1.8719987517707781 0.7830543087434951 0.33199875177077853 3.7790679659162256 2.2390679659162256 0.939692949226925 3.0090679659162256 5.030317775181363"/>
<bondArray>
<bond atomRefs2="a1 a2" order="1"/>
<bond atomRefs2="a1 a3" order="1"/>
<bond atomRefs2="a4 a1" convention="cxn:coord"/>
<bond atomRefs2="a5 a1" convention="cxn:coord"/>
<bond atomRefs2="a15 a1" convention="cxn:coord"/>
<bond atomRefs2="a4 a9" order="1"/>
<bond atomRefs2="a4 a10" order="1"/>
<bond atomRefs2="a4 a11" order="1"/>
<bond atomRefs2="a5 a6" order="1"/>
<bond atomRefs2="a5 a7" order="1"/>
<bond atomRefs2="a5 a8" order="1"/>
<bond atomRefs2="a12 a13" order="2"/>
<bond atomRefs2="a12 a16" order="1"/>
<bond atomRefs2="a13 a14" order="1"/>
</bondArray>
<molecule id="sg1" role="MulticenterSgroup" molID="m2" atomRefs="a12 a13" center="a15"/>
<molecule id="sg2" role="SuperatomSgroup" title="Ph" molID="m3">
<atomArray atomID="a17 a18 a19 a20 a21 a22" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="-1.686708366723078 -3.0203874885511155 -3.020387488551112 -1.6867083667230744 -0.3530292448950405 -0.3530292448950405" y2="-2.954994332449779 -2.184994332449776 -0.6449943324497749 0.1250056675502229 -0.6449943324497802 -2.1849943324497803"/>
<bondArray>
<bond atomRefs2="a17 a18" order="2"/>
<bond atomRefs2="a17 a22" order="1"/>
<bond atomRefs2="a18 a19" order="1"/>
<bond atomRefs2="a19 a20" order="2"/>
<bond atomRefs2="a20 a21" order="1"/>
<bond atomRefs2="a21 a22" order="2"/>
</bondArray>
</molecule>
<molecule id="sg3" role="SuperatomSgroup" title="Ph" molID="m4">
<atomArray atomID="a23 a24 a25 a26 a27 a28" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="-14.507380803612463 -13.17370168178443 -13.173701681784433 -14.50738080361247 -15.841059925440497 -15.841059925440497" y2="11.157894648972228 10.387894648972223 8.847894648972224 8.077894648972226 8.847894648972227 10.387894648972226"/>
<bondArray>
<bond atomRefs2="a23 a24" order="2"/>
<bond atomRefs2="a23 a28" order="1"/>
<bond atomRefs2="a24 a25" order="1"/>
<bond atomRefs2="a25 a26" order="2"/>
<bond atomRefs2="a26 a27" order="1"/>
<bond atomRefs2="a27 a28" order="2"/>
</bondArray>
</molecule>
<molecule id="sg4" role="SuperatomSgroup" title="Ph" molID="m5">
<atomArray atomID="a29 a30 a31 a32 a33 a34" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="0.49939990554322833 -0.2706000944567748 -1.810600094456774 -2.5806000944567735 -1.8106000944567668 -0.27060009445677125" y2="11.149675262760486 9.815996140932443 9.815996140932446 11.149675262760486 12.483354384588523 12.48335438458852"/>
<bondArray>
<bond atomRefs2="a29 a30" order="2"/>
<bond atomRefs2="a29 a34" order="1"/>
<bond atomRefs2="a30 a31" order="1"/>
<bond atomRefs2="a31 a32" order="2"/>
<bond atomRefs2="a32 a33" order="1"/>
<bond atomRefs2="a33 a34" order="2"/>
</bondArray>
</molecule>
<molecule id="sg5" role="SuperatomSgroup" title="Ph" molID="m6">
<atomArray atomID="a35 a36 a37 a38 a39 a40" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="-14.507380803612463 -13.17370168178443 -13.17370168178443 -14.50738080361247 -15.841059925440504 -15.841059925440504" y2="6.802116876863094 6.032116876863091 4.49211687686309 3.722116876863093 4.492116876863095 6.032116876863094"/>
<bondArray>
<bond atomRefs2="a35 a36" order="2"/>
<bond atomRefs2="a35 a40" order="1"/>
<bond atomRefs2="a36 a37" order="1"/>
<bond atomRefs2="a37 a38" order="2"/>
<bond atomRefs2="a38 a39" order="1"/>
<bond atomRefs2="a39 a40" order="2"/>
</bondArray>
</molecule>
<molecule id="sg6" role="SuperatomSgroup" title="Ph" molID="m7">
<atomArray atomID="a41 a42 a43 a44 a45 a46" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="-11.43560018982421 -10.665600189824204 -9.125600189824205 -8.355600189824205 -9.125600189824208 -10.665600189824211" y2="-5.124663832292605 -3.790984710464567 -3.7909847104645706 -5.124663832292605 -6.458342954120642 -6.4583429541206385"/>
<bondArray>
<bond atomRefs2="a41 a42" order="2"/>
<bond atomRefs2="a41 a46" order="1"/>
<bond atomRefs2="a42 a43" order="1"/>
<bond atomRefs2="a43 a44" order="2"/>
<bond atomRefs2="a44 a45" order="1"/>
<bond atomRefs2="a45 a46" order="2"/>
</bondArray>
</molecule>
<molecule id="sg7" role="SuperatomSgroup" title="Ph" molID="m8">
<atomArray atomID="a47 a48 a49 a50 a51 a52" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="-1.686708366723078 -3.0203874885511155 -3.0203874885511084 -1.6867083667230744 -0.3530292448950405 -0.3530292448950405" y2="-2.954994332449779 -2.1849943324497767 -0.6449943324497758 0.12500566755022202 -0.6449943324497811 -2.1849943324497803"/>
<bondArray>
<bond atomRefs2="a47 a48" order="2"/>
<bond atomRefs2="a47 a52" order="1"/>
<bond atomRefs2="a48 a49" order="1"/>
<bond atomRefs2="a49 a50" order="2"/>
<bond atomRefs2="a50 a51" order="1"/>
<bond atomRefs2="a51 a52" order="2"/>
</bondArray>
</molecule>
<molecule id="sg8" role="SuperatomSgroup" title="CO2Et" leftName="EtO2C" molID="m9">
<atomArray atomID="a53 a54 a55 a56 a57" elementType="C C O C O" attachmentPoint="1 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0" x2="-1.5464783161991846 -1.546478316199181 -2.3164783161991807 -2.3164783161991807 -2.316478316199184" y2="-1.7651035074064767 -4.432461751062549 -3.0987826292345115 -5.766140872890585 -0.43142438557844187"/>
<bondArray>
<bond atomRefs2="a55 a53" order="1"/>
<bond atomRefs2="a53 a57" order="2"/>
<bond atomRefs2="a56 a54" order="1"/>
<bond atomRefs2="a54 a55" order="1"/>
</bondArray>
</molecule>
<molecule id="sg9" role="SuperatomSgroup" title="Ph" molID="m10">
<atomArray atomID="a58 a59 a60 a61 a62 a63" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="-17.145527326560092 -17.1455273265601 -18.47920644838814 -19.812885570216174 -19.812885570216164 -18.479206448388126" y2="21.240640544268167 19.70064054426817 18.930640544268172 19.70064054426818 21.24064054426817 22.010640544268167"/>
<bondArray>
<bond atomRefs2="a58 a59" order="2"/>
<bond atomRefs2="a58 a63" order="1"/>
<bond atomRefs2="a59 a60" order="1"/>
<bond atomRefs2="a60 a61" order="2"/>
<bond atomRefs2="a61 a62" order="1"/>
<bond atomRefs2="a62 a63" order="2"/>
</bondArray>
</molecule>
</molecule>
</MChemicalStruct>
</MDocument>
</cml>
After ungrouping shortcut groups in molecule 3: *[Pd]([H])(Br)(P(C1=CC=CC=C1)(C1=CC=CC=C1)C1=CC=CC=C1)P(C1=CC=CC=C1)(C1=CC=CC=C1)C1=CC=CC=C1.CCOC(=O)C=CC1=CC=CC=C1 |c:7,9,14,16,21,23,29,31,36,38,43,45,56,58,t:5,12,19,27,34,41,54,m:0:48.47,C:23.25,4.3,0.0|
MechData.extractFlows: molecule 3 in MRV:
<?xml version="1.0"?>
<cml version="ChemAxon file format v5.10.0, generated by v5.11.5">
<MDocument>
<MChemicalStruct>
<molecule molID="m1">
<atomArray atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16 a17 a18 a19 a20 a21 a22 a23 a24 a25 a26 a27 a28 a29 a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 a49 a50 a51 a52 a53 a54 a55" elementType="Pd H Br P P C C C C C C C C C X C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C C O C O C C C C C" sgroupRef="0 0 0 0 0 0 0 0 0 0 0 sg1 sg1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0" x2="-18.205091512033988 -17.116147069006708 -17.116147069006708 -19.294035955061272 -19.294035955061272 -1.686708366723078 -14.507380803612463 0.49939990554322833 -14.507380803612463 -11.43560018982421 -1.686708366723078 -15.647103106806327 -15.647103106806327 -1.5464783161991846 -15.647103106806327 -17.145527326560092 -3.0203874885511155 -3.020387488551112 -1.6867083667230744 -0.3530292448950405 -0.3530292448950405 -13.17370168178443 -13.173701681784433 -14.50738080361247 -15.841059925440497 -15.841059925440497 -0.2706000944567748 -1.810600094456774 -2.5806000944567735 -1.8106000944567668 -0.27060009445677125 -13.17370168178443 -13.17370168178443 -14.50738080361247 -15.841059925440504 -15.841059925440504 -10.665600189824204 -9.125600189824205 -8.355600189824205 -9.125600189824208 -10.665600189824211 -3.0203874885511155 -3.0203874885511084 -1.6867083667230744 -0.3530292448950405 -0.3530292448950405 -1.546478316199181 -2.3164783161991807 -2.3164783161991807 -2.316478316199184 -17.1455273265601 -18.47920644838814 -19.812885570216174 -19.812885570216164 -18.479206448388126" y2="2.9609431947980616 4.0498876378253446 1.8719987517707786 1.8719987517707786 4.0498876378253446 -2.954994332449779 11.157894648972228 11.149675262760486 6.802116876863094 -5.124663832292605 -2.954994332449779 3.7790679659162256 2.2390679659162256 -1.7651035074064767 3.0090679659162256 21.240640544268167 -2.184994332449776 -0.6449943324497749 0.1250056675502229 -0.6449943324497802 -2.1849943324497803 10.387894648972223 8.847894648972224 8.077894648972226 8.847894648972227 10.387894648972226 9.815996140932443 9.815996140932446 11.149675262760486 12.483354384588523 12.48335438458852 6.032116876863091 4.49211687686309 3.722116876863093 4.492116876863095 6.032116876863094 -3.790984710464567 -3.7909847104645706 -5.124663832292605 -6.458342954120642 -6.4583429541206385 -2.1849943324497767 -0.6449943324497758 0.12500566755022202 -0.6449943324497811 -2.1849943324497803 -4.432461751062549 -3.0987826292345115 -5.766140872890585 -0.43142438557844187 19.70064054426817 18.930640544268172 19.70064054426818 21.24064054426817 22.010640544268167"/>
<bondArray>
<bond atomRefs2="a1 a2" order="1"/>
<bond atomRefs2="a1 a3" order="1"/>
<bond atomRefs2="a4 a1" convention="cxn:coord"/>
<bond atomRefs2="a5 a1" convention="cxn:coord"/>
<bond atomRefs2="a15 a1" convention="cxn:coord"/>
<bond atomRefs2="a4 a9" order="1"/>
<bond atomRefs2="a4 a10" order="1"/>
<bond atomRefs2="a4 a11" order="1"/>
<bond atomRefs2="a5 a6" order="1"/>
<bond atomRefs2="a5 a7" order="1"/>
<bond atomRefs2="a5 a8" order="1"/>
<bond atomRefs2="a12 a13" order="2"/>
<bond atomRefs2="a12 a16" order="1"/>
<bond atomRefs2="a13 a14" order="1"/>
<bond atomRefs2="a6 a17" order="2"/>
<bond atomRefs2="a6 a21" order="1"/>
<bond atomRefs2="a17 a18" order="1"/>
<bond atomRefs2="a18 a19" order="2"/>
<bond atomRefs2="a19 a20" order="1"/>
<bond atomRefs2="a20 a21" order="2"/>
<bond atomRefs2="a7 a22" order="2"/>
<bond atomRefs2="a7 a26" order="1"/>
<bond atomRefs2="a22 a23" order="1"/>
<bond atomRefs2="a23 a24" order="2"/>
<bond atomRefs2="a24 a25" order="1"/>
<bond atomRefs2="a25 a26" order="2"/>
<bond atomRefs2="a8 a27" order="2"/>
<bond atomRefs2="a8 a31" order="1"/>
<bond atomRefs2="a27 a28" order="1"/>
<bond atomRefs2="a28 a29" order="2"/>
<bond atomRefs2="a29 a30" order="1"/>
<bond atomRefs2="a30 a31" order="2"/>
<bond atomRefs2="a9 a32" order="2"/>
<bond atomRefs2="a9 a36" order="1"/>
<bond atomRefs2="a32 a33" order="1"/>
<bond atomRefs2="a33 a34" order="2"/>
<bond atomRefs2="a34 a35" order="1"/>
<bond atomRefs2="a35 a36" order="2"/>
<bond atomRefs2="a10 a37" order="2"/>
<bond atomRefs2="a10 a41" order="1"/>
<bond atomRefs2="a37 a38" order="1"/>
<bond atomRefs2="a38 a39" order="2"/>
<bond atomRefs2="a39 a40" order="1"/>
<bond atomRefs2="a40 a41" order="2"/>
<bond atomRefs2="a11 a42" order="2"/>
<bond atomRefs2="a11 a46" order="1"/>
<bond atomRefs2="a42 a43" order="1"/>
<bond atomRefs2="a43 a44" order="2"/>
<bond atomRefs2="a44 a45" order="1"/>
<bond atomRefs2="a45 a46" order="2"/>
<bond atomRefs2="a48 a14" order="1"/>
<bond atomRefs2="a14 a50" order="2"/>
<bond atomRefs2="a49 a47" order="1"/>
<bond atomRefs2="a47 a48" order="1"/>
<bond atomRefs2="a16 a51" order="2"/>
<bond atomRefs2="a16 a55" order="1"/>
<bond atomRefs2="a51 a52" order="1"/>
<bond atomRefs2="a52 a53" order="2"/>
<bond atomRefs2="a53 a54" order="1"/>
<bond atomRefs2="a54 a55" order="2"/>
</bondArray>
<molecule id="sg1" role="MulticenterSgroup" molID="m2" atomRefs="a12 a13" center="a15"/>
</molecule>
</MChemicalStruct>
</MDocument>
</cml>
First look at the MRV before ungrouping, and note the trans stereochemistry of the cinnamate group. Now look at the MRV after ungrouping. In addition to the crazy positions of the atoms after the ungrouping, the location of the cinnamate Ph group relative to the C=C double bond is creating a problem; the C-Ph bond is nearly collinear with the C=C bond. If you now look at the CXSMILES after ungrouping, you can see that Marvin is now interpreting the double bond as having an unspecified geometry. This change is causing the compound not to match to the same structure before the shortcut groups were ungrouped.
It is absolutely essential that shortcut ungrouping be accomplished without changing the stereochemistry of the compound. Please fix.