inconsistency in JChem and MarvinJS numbering of MObjects

User 870ab5b546

01-12-2014 17:30:44

I get this MRV from MarvinJS (I added return characters to make it readable):


<cml>
<MDocument>
<MChemicalStruct>
<molecule molID="m1">
<atomArray>
<atom id="a1" elementType="Br" x2="-8.36789083480835" y2="8.262186765670776"/>
<atom id="a2" elementType="C" x2="-6.82789083480835" y2="8.262186765670776"/>
<atom id="a3" elementType="C" x2="-7.857472896575928" y2="2.4040632247924805" radical="monovalent"/>
<atom id="a4" elementType="C" x2="-7.449139356613159" y2="0.2457294464111328"/>
<atom id="a5" elementType="C" x2="-6.1154602347851235" y2="1.0157294464111324"/>
<atom id="a6" elementType="R" x2="-4.781781112957088" y2="0.2457294464111328" sgroupRef="sg1"/>
<atom id="a7" elementType="C" x2="4.976622742509798" y2="-0.06781287074089049" radical="monovalent"/>
<atom id="a8" elementType="R" x2="6.310301864337834" y2="-0.8378128707408905" sgroupRef="sg2"/>
<atom id="a9" elementType="C" x2="3.6429436206817627" y2="-0.8378128707408905"/>
<atom id="a10" elementType="C" x2="2.309264498853727" y2="-0.06781287074089004"/>
<atom id="a11" elementType="C" x2="7.914402008056641" y2="2.3705206513404846"/>
<atom id="a12" elementType="Br" x2="6.37440200805664" y2="2.3705206513404846"/>
<atom id="a13" elementType="Cl" x2="-9.344998669061093" y2="2.005481895334598"/>
<atom id="a14" elementType="Cl" x2="-8.627472896575927" y2="3.737742346620516"/>
<atom id="a15" elementType="Cl" x2="-7.087472896575927" y2="3.737742346620516"/>
<atom id="a16" elementType="Cl" x2="2.309264498853727" y2="1.47218712925911"/>
<atom id="a17" elementType="Cl" x2="0.9755853770256913" y2="-0.8378128707408905"/>
<atom id="a18" elementType="Cl" x2="2.309264498853727" y2="-1.60781287074089"/>
<atom id="a19" elementType="C" x2="-1.5245401304844446" y2="-8.08134564870343"/>
<atom id="a20" elementType="R" x2="-0.19086100865640887" y2="-8.85134564870343" sgroupRef="sg3"/>
<atom id="a21" elementType="C" x2="-2.8582192523124803" y2="-8.85134564870343"/>
<atom id="a22" elementType="C" x2="-4.191898374140516" y2="-8.08134564870343"/>
<atom id="a23" elementType="Cl" x2="-4.191898374140516" y2="-6.54134564870343"/>
<atom id="a24" elementType="Cl" x2="-5.525577495968552" y2="-8.85134564870343"/>
<atom id="a25" elementType="Cl" x2="-4.191898374140516" y2="-9.62134564870343"/>
<atom id="a26" elementType="Br" x2="-1.5245401304844446" y2="-6.54134564870343"/>
<atom id="a27" elementType="Cl" x2="-6.057890834808349" y2="9.595865887498812"/>
<atom id="a28" elementType="Cl" x2="-5.2878908348083495" y2="8.262186765670776"/>
<atom id="a29" elementType="Cl" x2="-6.057890834808349" y2="6.928507643842741"/>
<atom id="a30" elementType="Cl" x2="8.68440200805664" y2="3.7041997731685203"/>
<atom id="a31" elementType="Cl" x2="9.45440200805664" y2="2.3705206513404846"/>
<atom id="a32" elementType="Cl" x2="8.68440200805664" y2="1.036841529512449"/>
</atomArray>
<bondArray>
<bond atomRefs2="a4 a5" order="2"/>
<bond atomRefs2="a9 a7" order="1"/>
<bond atomRefs2="a9 a10" order="1"/>
<bond atomRefs2="a3 a13" order="1"/>
<bond atomRefs2="a3 a14" order="1"/>
<bond atomRefs2="a3 a15" order="1"/>
<bond atomRefs2="a10 a16" order="1"/>
<bond atomRefs2="a10 a17" order="1"/>
<bond atomRefs2="a10 a18" order="1"/>
<bond atomRefs2="a21 a19" order="1"/>
<bond atomRefs2="a21 a22" order="1"/>
<bond atomRefs2="a22 a23" order="1"/>
<bond atomRefs2="a22 a24" order="1"/>
<bond atomRefs2="a22 a25" order="1"/>
<bond atomRefs2="a19 a26" order="1"/>
<bond atomRefs2="a19 a20" order="1"/>
<bond atomRefs2="a11 a12" order="1"/>
<bond atomRefs2="a7 a8" order="1"/>
<bond atomRefs2="a5 a6" order="1"/>
<bond atomRefs2="a1 a2" order="1"/>
<bond atomRefs2="a2 a27" order="1"/>
<bond atomRefs2="a2 a28" order="1"/>
<bond atomRefs2="a2 a29" order="1"/>
<bond atomRefs2="a11 a30" order="1"/>
<bond atomRefs2="a11 a31" order="1"/>
<bond atomRefs2="a11 a32" order="1"/>
</bondArray>
<molecule id="sg1" molID="m2" role="SuperatomSgroup" title="Ph">
<atomArray>
<atom id="a33" elementType="C" x2="-4.781781112957088" y2="0.2457294464111328" sgroupAttachmentPoint="1"/>
<atom id="a34" elementType="C" x2="-3.4481019911290502" y2="1.0157294464111333"/>
<atom id="a35" elementType="C" x2="-3.4481019911290502" y2="2.5557294464111333"/>
<atom id="a36" elementType="C" x2="-4.781781112957086" y2="3.325729446411133"/>
<atom id="a37" elementType="C" x2="-6.115460234785122" y2="2.555729446411134"/>
<atom id="a38" elementType="C" x2="-6.115460234785123" y2="1.0157294464111342"/>
</atomArray>
<bondArray>
<bond atomRefs2="a33 a34" order="2"/>
<bond atomRefs2="a33 a38" order="1"/>
<bond atomRefs2="a34 a35" order="1"/>
<bond atomRefs2="a35 a36" order="2"/>
<bond atomRefs2="a36 a37" order="1"/>
<bond atomRefs2="a37 a38" order="2"/>
</bondArray>
</molecule>
<molecule id="sg2" molID="m3" role="SuperatomSgroup" title="Ph">
<atomArray>
<atom id="a39" elementType="C" x2="6.310301864337834" y2="-0.8378128707408905" sgroupAttachmentPoint="1"/>
<atom id="a40" elementType="C" x2="7.643980986165872" y2="-0.06781287074088915"/>
<atom id="a41" elementType="C" x2="7.643980986165872" y2="1.47218712925911"/>
<atom id="a42" elementType="C" x2="6.310301864337834" y2="2.2421871292591096"/>
<atom id="a43" elementType="C" x2="4.9766227425098" y2="1.4721871292591118"/>
<atom id="a44" elementType="C" x2="4.976622742509798" y2="-0.06781287074088915"/>
</atomArray>
<bondArray>
<bond atomRefs2="a39 a40" order="2"/>
<bond atomRefs2="a39 a44" order="1"/>
<bond atomRefs2="a40 a41" order="1"/>
<bond atomRefs2="a41 a42" order="2"/>
<bond atomRefs2="a42 a43" order="1"/>
<bond atomRefs2="a43 a44" order="2"/>
</bondArray>
</molecule>
<molecule id="sg3" molID="m4" role="SuperatomSgroup" title="Ph">
<atomArray>
<atom id="a45" elementType="C" x2="-0.19086100865640887" y2="-8.85134564870343" sgroupAttachmentPoint="1"/>
<atom id="a46" elementType="C" x2="1.1428181131716286" y2="-8.08134564870343"/>
<atom id="a47" elementType="C" x2="1.1428181131716286" y2="-6.54134564870343"/>
<atom id="a48" elementType="C" x2="-0.1908610086564071" y2="-5.771345648703431"/>
<atom id="a49" elementType="C" x2="-1.5245401304844428" y2="-6.5413456487034285"/>
<atom id="a50" elementType="C" x2="-1.5245401304844437" y2="-8.08134564870343"/>
</atomArray>
<bondArray>
<bond atomRefs2="a45 a46" order="2"/>
<bond atomRefs2="a45 a50" order="1"/>
<bond atomRefs2="a46 a47" order="1"/>
<bond atomRefs2="a47 a48" order="2"/>
<bond atomRefs2="a48 a49" order="1"/>
<bond atomRefs2="a49 a50" order="2"/>
</bondArray>
</molecule>
</molecule>
</MChemicalStruct>
<MEFlow id="o1" arcAngle="270" headFlags="4">
<MAtomSetPoint atomRefs="m1.a1 m1.a2"/>
<MAtomSetPoint atomRefs="m1.a1"/>
</MEFlow>
<MEFlow id="o2" arcAngle="90" headFlags="4">
<MAtomSetPoint atomRefs="m1.a11 m1.a12"/>
<MAtomSetPoint atomRefs="m1.a12 m1.a7"/>
</MEFlow>
<MEFlow id="o3" arcAngle="270" headFlags="2">
<MAtomSetPoint atomRefs="m1.a11 m1.a12"/>
<MAtomSetPoint atomRefs="m1.a11"/>
</MEFlow>
<MEFlow id="o4" arcAngle="270" headFlags="4">
<MAtomSetPoint atomRefs="m1.a4 m1.a5"/>
<MAtomSetPoint atomRefs="m1.a4 m1.a3"/>
</MEFlow>
<MEFlow id="o5" arcAngle="270" headFlags="2">
<MAtomSetPoint atomRefs="m1.a4 m1.a5"/>
<MAtomSetPoint atomRefs="m1.a5"/>
</MEFlow>
<MEFlow id="o6" arcAngle="270" headFlags="2">
<MAtomSetPoint atomRefs="m1.a1 m1.a2"/>
<MAtomSetPoint atomRefs="m1.a2"/>
</MEFlow>
<MEFlow id="o7" arcAngle="270" headFlags="2">
<MEFlowBasePoint atomRef="m1.a7"/>
<MAtomSetPoint atomRefs="m1.a7 m1.a12"/>
</MEFlow>
<MEFlow id="o8" arcAngle="270" headFlags="2">
<MEFlowBasePoint atomRef="m1.a3"/>
<MAtomSetPoint atomRefs="m1.a3 m1.a4"/>
</MEFlow>
<MRectangle lineColor="#000000" id="o9">
<MPoint x="-9.638098239898682" y="6.347341299057007"/>
<MPoint x="-4.507628500461578" y="6.347341299057007"/>
<MPoint x="-4.507628500461578" y="10.279062032699585"/>
<MPoint x="-9.638098239898682" y="10.279062032699585"/>
</MRectangle>
<MRectangle lineColor="#000000" id="o10">
<MPoint x="-10.371639251708984" y="-1.0507296323776245"/>
<MPoint x="-3.6414316296577454" y="-1.0507296323776245"/>
<MPoint x="-3.6414316296577454" y="4.97072958946228"/>
<MPoint x="-10.371639251708984" y="4.97072958946228"/>
</MRectangle>
<MRectangle lineColor="#000000" id="o11">
<MPoint x="0.033568382263183594" y="-3.0223959386348724"/>
<MPoint x="10.371639251708984" y="-3.0223959386348724"/>
<MPoint x="10.371639251708984" y="4.410836845636368"/>
<MPoint x="0.033568382263183594" y="4.410836845636368"/>
</MRectangle>
<MRectangle lineColor="#000000" id="o12">
<MPoint x="-6.59601503610611" y="-10.279062032699585"/>
<MPoint x="1.488985002040863" y="-10.279062032699585"/>
<MPoint x="1.488985002040863" y="-5.707187056541443"/>
<MPoint x="-6.59601503610611" y="-5.707187056541443"/>
</MRectangle>
<MPolyline headLength="0.6" headWidth="0.4" id="o13">
<MRectanglePoint rectRef="o9" pos="6"/>
<MRectanglePoint rectRef="o10" pos="4"/>
</MPolyline>
<MPolyline headLength="0.6" headWidth="0.4" id="o14">
<MRectanglePoint rectRef="o10" pos="5"/>
<MRectanglePoint rectRef="o11" pos="7"/>
</MPolyline>
<MPolyline headLength="0.6" headWidth="0.4" id="o15">
<MRectanglePoint rectRef="o11" pos="3"/>
<MRectanglePoint rectRef="o10" pos="2"/>
</MPolyline>
<MPolyline headLength="0.6" headWidth="0.4" id="o16">
<MPoint x="-1.8346467798406432" y="-2.0760476719249383"/>
<MRectanglePoint rectRef="o12" pos="4"/>
</MPolyline>
</MDocument>
</cml>

Note that the first MEFlow is object number 1, and the last MPolyline is object number 16. I send it to JChem 14.11.10, which imports it into a Molecule, and I export the MDocument to MRV format. I get this MRV output:


<?xml version="1.0" encoding="UTF-8"?>
<cml xmlns="http://www.chemaxon.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com/marvin/schema/mrvSchema_14_10_13.xsd" version="ChemAxon file format v14.10.13, generated by v14.11.10.0">
<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" elementType="Br C C C C R C R C C C Br Cl Cl Cl Cl Cl Cl C R C C Cl Cl Cl Br Cl Cl Cl Cl Cl Cl" radical="0 0 monovalent 0 0 0 monovalent 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" sgroupRef="0 0 0 0 0 sg1 0 sg2 0 0 0 0 0 0 0 0 0 0 0 sg3 0 0 0 0 0 0 0 0 0 0 0 0" x2="-8.36789083480835 -6.82789083480835 -7.857472896575928 -7.449139356613159 -6.1154602347851235 -4.781781112957088 4.976622742509798 6.310301864337834 3.6429436206817627 2.309264498853727 7.914402008056641 6.37440200805664 -9.344998669061093 -8.627472896575927 -7.087472896575927 2.309264498853727 0.9755853770256913 2.309264498853727 -1.5245401304844446 -0.19086100865640887 -2.8582192523124803 -4.191898374140516 -4.191898374140516 -5.525577495968552 -4.191898374140516 -1.5245401304844446 -6.057890834808349 -5.2878908348083495 -6.057890834808349 8.68440200805664 9.45440200805664 8.68440200805664" y2="8.262186765670776 8.262186765670776 2.4040632247924805 0.2457294464111328 1.0157294464111324 0.2457294464111328 -0.06781287074089049 -0.8378128707408905 -0.8378128707408905 -0.06781287074089004 2.3705206513404846 2.3705206513404846 2.005481895334598 3.737742346620516 3.737742346620516 1.47218712925911 -0.8378128707408905 -1.60781287074089 -8.08134564870343 -8.85134564870343 -8.85134564870343 -8.08134564870343 -6.54134564870343 -8.85134564870343 -9.62134564870343 -6.54134564870343 9.595865887498812 8.262186765670776 6.928507643842741 3.7041997731685203 2.3705206513404846 1.036841529512449"/>
<bondArray>
<bond id="b1" atomRefs2="a4 a5" order="2"/>
<bond id="b2" atomRefs2="a9 a7" order="1"/>
<bond id="b3" atomRefs2="a9 a10" order="1"/>
<bond id="b4" atomRefs2="a3 a13" order="1"/>
<bond id="b5" atomRefs2="a3 a14" order="1"/>
<bond id="b6" atomRefs2="a3 a15" order="1"/>
<bond id="b7" atomRefs2="a10 a16" order="1"/>
<bond id="b8" atomRefs2="a10 a17" order="1"/>
<bond id="b9" atomRefs2="a10 a18" order="1"/>
<bond id="b10" atomRefs2="a21 a19" order="1"/>
<bond id="b11" atomRefs2="a21 a22" order="1"/>
<bond id="b12" atomRefs2="a22 a23" order="1"/>
<bond id="b13" atomRefs2="a22 a24" order="1"/>
<bond id="b14" atomRefs2="a22 a25" order="1"/>
<bond id="b15" atomRefs2="a19 a26" order="1"/>
<bond id="b16" atomRefs2="a19 a20" order="1"/>
<bond id="b17" atomRefs2="a11 a12" order="1"/>
<bond id="b18" atomRefs2="a7 a8" order="1"/>
<bond id="b19" atomRefs2="a5 a6" order="1"/>
<bond id="b20" atomRefs2="a1 a2" order="1"/>
<bond id="b21" atomRefs2="a2 a27" order="1"/>
<bond id="b22" atomRefs2="a2 a28" order="1"/>
<bond id="b23" atomRefs2="a2 a29" order="1"/>
<bond id="b24" atomRefs2="a11 a30" order="1"/>
<bond id="b25" atomRefs2="a11 a31" order="1"/>
<bond id="b26" atomRefs2="a11 a32" order="1"/>
</bondArray>
<molecule id="sg1" role="SuperatomSgroup" title="Ph" molID="m2">
<atomArray atomID="a33 a34 a35 a36 a37 a38" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="-4.781781112957088 -3.4481019911290502 -3.4481019911290502 -4.781781112957086 -6.115460234785122 -6.115460234785123" y2="0.2457294464111328 1.0157294464111333 2.5557294464111333 3.325729446411133 2.555729446411134 1.0157294464111342"/>
<bondArray>
<bond id="b27" atomRefs2="a33 a34" order="2"/>
<bond id="b28" atomRefs2="a33 a38" order="1"/>
<bond id="b29" atomRefs2="a34 a35" order="1"/>
<bond id="b30" atomRefs2="a35 a36" order="2"/>
<bond id="b31" atomRefs2="a36 a37" order="1"/>
<bond id="b32" atomRefs2="a37 a38" order="2"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a33" order="1" bond="b19"/>
</AttachmentPointArray>
</molecule>
<molecule id="sg2" role="SuperatomSgroup" title="Ph" molID="m3">
<atomArray atomID="a39 a40 a41 a42 a43 a44" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="6.310301864337834 7.643980986165872 7.643980986165872 6.310301864337834 4.9766227425098 4.976622742509798" y2="-0.8378128707408905 -0.06781287074088915 1.47218712925911 2.2421871292591096 1.4721871292591118 -0.06781287074088915"/>
<bondArray>
<bond id="b33" atomRefs2="a39 a40" order="2"/>
<bond id="b34" atomRefs2="a39 a44" order="1"/>
<bond id="b35" atomRefs2="a40 a41" order="1"/>
<bond id="b36" atomRefs2="a41 a42" order="2"/>
<bond id="b37" atomRefs2="a42 a43" order="1"/>
<bond id="b38" atomRefs2="a43 a44" order="2"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a39" order="1" bond="b18"/>
</AttachmentPointArray>
</molecule>
<molecule id="sg3" role="SuperatomSgroup" title="Ph" molID="m4">
<atomArray atomID="a45 a46 a47 a48 a49 a50" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="-0.19086100865640887 1.1428181131716286 1.1428181131716286 -0.1908610086564071 -1.5245401304844428 -1.5245401304844437" y2="-8.85134564870343 -8.08134564870343 -6.54134564870343 -5.771345648703431 -6.5413456487034285 -8.08134564870343"/>
<bondArray>
<bond id="b39" atomRefs2="a45 a46" order="2"/>
<bond id="b40" atomRefs2="a45 a50" order="1"/>
<bond id="b41" atomRefs2="a46 a47" order="1"/>
<bond id="b42" atomRefs2="a47 a48" order="2"/>
<bond id="b43" atomRefs2="a48 a49" order="1"/>
<bond id="b44" atomRefs2="a49 a50" order="2"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a45" order="1" bond="b16"/>
</AttachmentPointArray>
</molecule>
</molecule>
</MChemicalStruct>
<MEFlow id="o2" arcAngle="270.0" headFlags="4" headLength="0.6" headWidth="0.5" baseElectronContainerIndex="-1" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a1 m1.a2"/>
<MAtomSetPoint atomRefs="m1.a1"/>
</MEFlow>
<MEFlow id="o3" arcAngle="90.0" headFlags="4" headLength="0.6" headWidth="0.5" baseElectronContainerIndex="-1" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a11 m1.a12"/>
<MAtomSetPoint atomRefs="m1.a12 m1.a7"/>
</MEFlow>
<MEFlow id="o4" arcAngle="270.0" headFlags="2" headLength="0.6" headWidth="0.5" baseElectronContainerIndex="-1" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a11 m1.a12"/>
<MAtomSetPoint atomRefs="m1.a11"/>
</MEFlow>
<MEFlow id="o5" arcAngle="270.0" headFlags="4" headLength="0.6" headWidth="0.5" baseElectronContainerIndex="-1" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a4 m1.a5"/>
<MAtomSetPoint atomRefs="m1.a4 m1.a3"/>
</MEFlow>
<MEFlow id="o6" arcAngle="270.0" headFlags="2" headLength="0.6" headWidth="0.5" baseElectronContainerIndex="-1" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a4 m1.a5"/>
<MAtomSetPoint atomRefs="m1.a5"/>
</MEFlow>
<MEFlow id="o7" arcAngle="270.0" headFlags="2" headLength="0.6" headWidth="0.5" baseElectronContainerIndex="-1" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a1 m1.a2"/>
<MAtomSetPoint atomRefs="m1.a2"/>
</MEFlow>
<MEFlow id="o8" arcAngle="270.0" headFlags="2" headLength="0.6" headWidth="0.5" baseElectronContainerIndex="-1" baseElectronIndexInContainer="0">
<MEFlowBasePoint atomRef="m1.a7"/>
<MAtomSetPoint atomRefs="m1.a7 m1.a12"/>
</MEFlow>
<MEFlow id="o9" arcAngle="270.0" headFlags="2" headLength="0.6" headWidth="0.5" baseElectronContainerIndex="-1" baseElectronIndexInContainer="0">
<MEFlowBasePoint atomRef="m1.a3"/>
<MAtomSetPoint atomRefs="m1.a3 m1.a4"/>
</MEFlow>
<MRectangle id="o10" lineColor="#000000">
<MPoint x="-9.638098239898682" y="6.347341299057007"/>
<MPoint x="-4.507628500461578" y="6.347341299057007"/>
<MPoint x="-4.507628500461578" y="10.279062032699585"/>
<MPoint x="-9.638098239898682" y="10.279062032699585"/>
</MRectangle>
<MRectangle id="o11" lineColor="#000000">
<MPoint x="-10.371639251708984" y="-1.0507296323776245"/>
<MPoint x="-3.6414316296577454" y="-1.0507296323776245"/>
<MPoint x="-3.6414316296577454" y="4.97072958946228"/>
<MPoint x="-10.371639251708984" y="4.97072958946228"/>
</MRectangle>
<MRectangle id="o12" lineColor="#000000">
<MPoint x="0.033568382263183594" y="-3.0223959386348724"/>
<MPoint x="10.371639251708984" y="-3.0223959386348724"/>
<MPoint x="10.371639251708984" y="4.410836845636368"/>
<MPoint x="0.033568382263183594" y="4.410836845636368"/>
</MRectangle>
<MRectangle id="o13" lineColor="#000000">
<MPoint x="-6.59601503610611" y="-10.279062032699585"/>
<MPoint x="1.488985002040863" y="-10.279062032699585"/>
<MPoint x="1.488985002040863" y="-5.707187056541443"/>
<MPoint x="-6.59601503610611" y="-5.707187056541443"/>
</MRectangle>
<MPolyline id="o14" headLength="0.6" headWidth="0.4">
<MRectanglePoint pos="6" rectRef="o10"/>
<MRectanglePoint pos="4" rectRef="o11"/>
</MPolyline>
<MPolyline id="o15" headLength="0.6" headWidth="0.4">
<MRectanglePoint pos="5" rectRef="o11"/>
<MRectanglePoint pos="7" rectRef="o12"/>
</MPolyline>
<MPolyline id="o16" headLength="0.6" headWidth="0.4">
<MRectanglePoint pos="3" rectRef="o12"/>
<MRectanglePoint pos="2" rectRef="o11"/>
</MPolyline>
<MPolyline id="o17" headLength="0.6" headWidth="0.4">
<MPoint x="-1.8346467798406432" y="-2.0760476719249383"/>
<MRectanglePoint pos="4" rectRef="o13"/>
</MPolyline>
</MDocument>
</cml>

Note that the first MEFlow is object number 2, and the last MPolyline is object number 17. JChem appears to be counting the MChemicalStruct as object 1. I see this same behavior in the log when I walk through all the MObjects in the MDocument: the MEFlows are objects 2-9, MRectangles are 10-13, and MPolylines are 14-17.


MarvinSketch also appears to do the same thing as JChem. Here's the same or almost the same drawing acquired from MarvinSketch 14.11.24:


<?xml version="1.0" encoding="UTF-8"?>
<cml xmlns="http://www.chemaxon.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.chemaxon.com/marvin/schema/mrvSchema_14_11_17.xsd" version="ChemAxon file format v14.11.17, generated by v14.11.24.0">
<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" elementType="Br C C C C R C R C C C Br Cl Cl Cl Cl Cl Cl C R C C Cl Cl Cl Br Cl Cl Cl Cl Cl Cl" radical="0 0 monovalent 0 0 0 monovalent 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" sgroupRef="0 0 0 0 0 sg1 0 sg2 0 0 0 0 0 0 0 0 0 0 0 sg3 0 0 0 0 0 0 0 0 0 0 0 0" x2="-4.8518757820129395 -3.3118757820129394 -4.341457843780518 -3.933124303817749 -2.5994451819897133 -1.2657660601616776 8.492637795305209 9.826316917133244 7.158958673477173 5.825279551649137 11.43041706085205 9.89041706085205 -5.828983616265683 -5.111457843780517 -3.571457843780517 5.825279551649137 4.491600429821101 5.825279551649137 1.9914749223109656 3.3251540441390013 0.6577958004829298 -0.6758833213451059 -0.6758833213451059 -2.0095624431731416 -0.6758833213451059 1.9914749223109656 -2.541875782012939 -1.7718757820129394 -2.541875782012939 12.20041706085205 12.97041706085205 12.20041706085205" y2="11.851874351501465 11.851874351501465 5.993750810623169 3.8354170322418213 4.605417032241821 3.8354170322418213 3.521874715089798 2.751874715089798 2.751874715089798 3.5218747150897984 5.960208237171173 5.960208237171173 5.595169481165287 7.327429932451205 7.327429932451205 5.0618747150897985 2.751874715089798 1.9818747150897984 -4.491658062872742 -5.261658062872742 -5.261658062872742 -4.491658062872741 -2.951658062872742 -5.261658062872742 -6.031658062872742 -2.951658062872742 13.1855534733295 11.851874351501465 10.51819522967343 7.293887358999209 5.960208237171173 4.626529115343137"/>
<bondArray>
<bond id="b1" atomRefs2="a4 a5" order="2"/>
<bond id="b2" atomRefs2="a9 a7" order="1"/>
<bond id="b3" atomRefs2="a9 a10" order="1"/>
<bond id="b4" atomRefs2="a3 a13" order="1"/>
<bond id="b5" atomRefs2="a3 a14" order="1"/>
<bond id="b6" atomRefs2="a3 a15" order="1"/>
<bond id="b7" atomRefs2="a10 a16" order="1"/>
<bond id="b8" atomRefs2="a10 a17" order="1"/>
<bond id="b9" atomRefs2="a10 a18" order="1"/>
<bond id="b10" atomRefs2="a21 a19" order="1"/>
<bond id="b11" atomRefs2="a21 a22" order="1"/>
<bond id="b12" atomRefs2="a22 a23" order="1"/>
<bond id="b13" atomRefs2="a22 a24" order="1"/>
<bond id="b14" atomRefs2="a22 a25" order="1"/>
<bond id="b15" atomRefs2="a19 a26" order="1"/>
<bond id="b16" atomRefs2="a19 a20" order="1"/>
<bond id="b17" atomRefs2="a11 a12" order="1"/>
<bond id="b18" atomRefs2="a7 a8" order="1"/>
<bond id="b19" atomRefs2="a5 a6" order="1"/>
<bond id="b20" atomRefs2="a1 a2" order="1"/>
<bond id="b21" atomRefs2="a2 a27" order="1"/>
<bond id="b22" atomRefs2="a2 a28" order="1"/>
<bond id="b23" atomRefs2="a2 a29" order="1"/>
<bond id="b24" atomRefs2="a11 a30" order="1"/>
<bond id="b25" atomRefs2="a11 a31" order="1"/>
<bond id="b26" atomRefs2="a11 a32" order="1"/>
</bondArray>
<molecule id="sg1" role="SuperatomSgroup" title="Ph" molID="m2">
<atomArray atomID="a33 a34 a35 a36 a37 a38" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="-1.0587499141693124 0.2749292076587251 0.2749292076587251 -1.0587499141693106 -2.3924290359973464 -2.3924290359973472" y2="2.261874637603759 3.0318746376037593 4.571874637603759 5.341874637603759 4.57187463760376 3.03187463760376"/>
<bondArray>
<bond id="b27" atomRefs2="a33 a34" order="2"/>
<bond id="b28" atomRefs2="a33 a38" order="1"/>
<bond id="b29" atomRefs2="a34 a35" order="1"/>
<bond id="b30" atomRefs2="a35 a36" order="2"/>
<bond id="b31" atomRefs2="a36 a37" order="1"/>
<bond id="b32" atomRefs2="a37 a38" order="2"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a33" order="1" bond="b19"/>
</AttachmentPointArray>
</molecule>
<molecule id="sg2" role="SuperatomSgroup" title="Ph" molID="m3">
<atomArray atomID="a39 a40 a41 a42 a43 a44" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="9.913749694824219 11.247428816652256 11.247428816652256 9.913749694824219 8.580070572996185 8.580070572996183" y2="1.4437501049041739 2.2137501049041752 3.7537501049041744 4.523750104904174 3.753750104904176 2.2137501049041752"/>
<bondArray>
<bond id="b33" atomRefs2="a39 a40" order="2"/>
<bond id="b34" atomRefs2="a39 a44" order="1"/>
<bond id="b35" atomRefs2="a40 a41" order="1"/>
<bond id="b36" atomRefs2="a41 a42" order="2"/>
<bond id="b37" atomRefs2="a42 a43" order="1"/>
<bond id="b38" atomRefs2="a43 a44" order="2"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a39" order="1" bond="b18"/>
</AttachmentPointArray>
</molecule>
<molecule id="sg3" role="SuperatomSgroup" title="Ph" molID="m4">
<atomArray atomID="a45 a46 a47 a48 a49 a50" elementType="C C C C C C" attachmentPoint="1 0 0 0 0 0" sgroupAttachmentPoint="1 0 0 0 0 0" x2="3.4649999141693106 4.798679035997348 4.798679035997348 3.4649999141693124 2.1313207923412767 2.131320792341276" y2="-6.881874599456788 -6.111874599456787 -4.5718745994567875 -3.801874599456788 -4.571874599456786 -6.111874599456787"/>
<bondArray>
<bond id="b39" atomRefs2="a45 a46" order="2"/>
<bond id="b40" atomRefs2="a45 a50" order="1"/>
<bond id="b41" atomRefs2="a46 a47" order="1"/>
<bond id="b42" atomRefs2="a47 a48" order="2"/>
<bond id="b43" atomRefs2="a48 a49" order="1"/>
<bond id="b44" atomRefs2="a49 a50" order="2"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a45" order="1" bond="b16"/>
</AttachmentPointArray>
</molecule>
</molecule>
</MChemicalStruct>
<MElectronContainer id="o2" occupation="1" radical="1">
<MElectron atomRefs="m1.a3" difLoc="0.2728940081609039 -0.3556423955316266 0.0"/>
</MElectronContainer>
<MElectronContainer id="o3" occupation="1" radical="1">
<MElectron atomRefs="m1.a7" difLoc="-1.7763568394002505E-15 -0.44827742882014343 0.0"/>
</MElectronContainer>
<MEFlow id="o4" arcAngle="-257.0544339526754" headSkip="0.44999999999999996" headFlags="2" headLength="0.5" headWidth="0.4" tailSkip="0.44999999999999996" baseElectronContainerIndex="-1" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a1 m1.a2"/>
<MAtomSetPoint atomRefs="m1.a1"/>
</MEFlow>
<MEFlow id="o5" arcAngle="254.77468199999998" headSkip="0.44999999999999996" headFlags="2" headLength="0.5" headWidth="0.4" tailSkip="0.44999999999999996" baseElectronContainerIndex="-1" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a1 m1.a2"/>
<MAtomSetPoint atomRefs="m1.a2"/>
</MEFlow>
<MEFlow id="o6" arcAngle="254.77468199999998" headSkip="0.25" headFlags="2" headLength="0.5" headWidth="0.4" tailSkip="0.25" baseElectronContainerIndex="0" baseElectronIndexInContainer="0">
<MEFlowBasePoint atomRef="m1.a3"/>
<MAtomSetPoint atomRefs="m1.a3 m1.a4" weights="0.5 0.5"/>
</MEFlow>
<MEFlow id="o7" arcAngle="215.658" headSkip="0.25" headFlags="2" headLength="0.5" headWidth="0.4" tailSkip="0.25" baseElectronContainerIndex="0" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a4 m1.a5"/>
<MAtomSetPoint atomRefs="m1.a4 m1.a3" weights="0.5 0.5"/>
</MEFlow>
<MEFlow id="o8" arcAngle="-257.0544339526754" headSkip="0.15" headFlags="2" headLength="0.5" headWidth="0.4" tailSkip="0.15" baseElectronContainerIndex="0" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a4 m1.a5"/>
<MAtomSetPoint atomRefs="m1.a5"/>
</MEFlow>
<MEFlow id="o9" arcAngle="-140.0" headSkip="0.25" headFlags="2" headLength="0.5" headWidth="0.4" tailSkip="0.25" baseElectronContainerIndex="0" baseElectronIndexInContainer="0">
<MEFlowBasePoint atomRef="m1.a7"/>
<MAtomSetPoint atomRefs="m1.a7 m1.a12" weights="0.5 0.5"/>
</MEFlow>
<MEFlow id="o10" arcAngle="140.0" headSkip="0.25" headFlags="2" headLength="0.5" headWidth="0.4" tailSkip="0.25" baseElectronContainerIndex="0" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a11 m1.a12"/>
<MAtomSetPoint atomRefs="m1.a12 m1.a7" weights="0.5 0.5"/>
</MEFlow>
<MEFlow id="o11" arcAngle="-257.0544339526754" headSkip="0.44999999999999996" headFlags="2" headLength="0.5" headWidth="0.4" tailSkip="0.44999999999999996" baseElectronContainerIndex="0" baseElectronIndexInContainer="0">
<MAtomSetPoint atomRefs="m1.a11 m1.a12"/>
<MAtomSetPoint atomRefs="m1.a11"/>
</MEFlow>
<MRectangle id="o12">
<MPoint x="-7.031802654266357" y="14.210101127624512"/>
<MPoint x="-0.07324794679880142" y="14.210101127624512"/>
<MPoint x="-0.07324794679880142" y="9.888472557067871"/>
<MPoint x="-7.031802654266357" y="9.888472557067871"/>
</MRectangle>
<MRectangle id="o13">
<MPoint x="-7.544538497924805" y="8.496761322021484"/>
<MPoint x="0.2929917871952057" y="8.496761322021484"/>
<MPoint x="0.2929917871952057" y="2.124190330505371"/>
<MPoint x="-7.544538497924805" y="2.124190330505371"/>
</MRectangle>
<MRectangle id="o14">
<MPoint x="2.4904301166534424" y="8.423513412475586"/>
<MPoint x="14.136853218078613" y="8.423513412475586"/>
<MPoint x="14.136853218078613" y="0.5859835743904114"/>
<MPoint x="2.4904301166534424" y="0.5859835743904114"/>
</MRectangle>
<MRectangle id="o15">
<MPoint x="-4.028636932373047" y="-1.6114548444747925"/>
<MPoint x="5.20060396194458" y="-1.6114548444747925"/>
<MPoint x="5.20060396194458" y="-7.178298473358154"/>
<MPoint x="-4.028636932373047" y="-7.178298473358154"/>
</MRectangle>
<MPolyline id="o16" headLength="0.6" headWidth="0.4">
<MRectanglePoint pos="6" rectRef="o12"/>
<MPoint x="-3.735645294189453" y="8.496761322021484"/>
</MPolyline>
<MPolyline id="o17" headLength="0.6" headWidth="0.4">
<MRectanglePoint pos="5" rectRef="o13"/>
<MPoint x="2.4904301166534424" y="4.541372776031494"/>
</MPolyline>
<MPolyline id="o18" headLength="0.6" headWidth="0.4">
<MRectanglePoint pos="3" rectRef="o14"/>
<MRectanglePoint pos="2" rectRef="o13"/>
</MPolyline>
<MPolyline id="o19" headLength="0.6" headWidth="0.4">
<MMidPoint lineRef="o18"/>
<MRectanglePoint pos="4" rectRef="o15"/>
</MPolyline>
</MDocument>
</cml>

Here, the first MElectronContainer is given object number 2.


Needless to say, the numbering behavior should be consistent between JChem and MarvinJS, else the programmer becomes confused.

ChemAxon f052bdfe3c

03-12-2014 13:29:02

Thank you for this feedback. This numbering is only used in internal methods. We did not receive bug reports that it caused any confusion so far. 


Best regards,


Efi

User 870ab5b546

03-12-2014 16:12:35

When I said, "the programmer becomes confused," I was referring to myself. I became confused when I was trying to isolate the bug that I describe in this forum topic

ChemAxon 7c2d26e5cf

12-12-2014 13:29:51

I admit that comparing the IDs in different implementations can be confused especially when you would like to isolate a bug. But - as we have already mentioned - it is only an internal unique reference to a tag in an MRV.


When I debug, generally, I identify an electron flow by its order in the MRV.


By implementing MRV support in Marvin JS, we keep in mind to preserve the order of the elements at import / export.