copy bug

User 870ab5b546

13-09-2011 15:29:50

Consider this structure:


<?xml version="1.0" ?>
<cml>
<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"
elementType="C C C C C C C C C R R H C C C C C C C C C Br R"
mrvMap="0 0 0 0 0 0 0 0 0 0 11 0 1 2 3 4 5 8 9 10 6 7 0"
sgroupRef="0 0 0 0 0 0 0 0 0 sg1 sg2 0 0 0 0 0 0 0 0 0 0 0 sg3"
x3="-4.629613009938996 -4.565843377022752 -5.259307535176514 -6.7379205391735235 -6.503039272924697 -6.163673618586791 -8.223150396452 -7.5934558723170404 -3.184983124234586 -2.4497814091299728 -11.64625072479248 -9.930626068115235 -15.111249923706055 -13.777570801878019 -12.443891680049983 -11.110212558221948 -9.776533436393912 -8.442854314565876 -7.10917519273784 -5.775496070909805 -9.776533436393912 -8.131085169203478 -4.441816949081769"
y3="0.6316366887693423 -0.49287051730163345 -0.0020923257919180926 0.45826034313052944 1.66989599445367 1.0361864811959736 3.894259246086662E-4 0.6341184421561197 -0.6400493501261 0.6116437337106291 1.5399998426437378 1.5399998426437378 5.678750038146973 4.908750038146973 5.678750038146973 4.908750038146972 5.678750038146972 4.908750038146971 5.678750038146971 4.90875003814697 7.218750038146972 8.168750038146971 5.67875003814697"
z3="-4.029635224964309 -2.8441399532315996 -1.4705479348913886 -1.846778709222371 -2.7980178060000114 -4.180526107514 -2.19922291232889 -4.758310205823841 -2.543655183843436 -2.029512341840779 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"
/>
<bondArray>
<bond atomRefs2="a1 a2" order="1" />
<bond atomRefs2="a1 a6" order="1" />
<bond atomRefs2="a2 a3" order="1" />
<bond atomRefs2="a3 a4" order="1" />
<bond atomRefs2="a4 a5" order="1" />
<bond atomRefs2="a5 a6" order="1" />
<bond atomRefs2="a4 a7" order="1" />
<bond atomRefs2="a6 a8" order="1" />
<bond atomRefs2="a7 a8" order="1" />
<bond atomRefs2="a2 a9" order="1">
<bondStereo convention="MDL" conventionValue="4" />
</bond>
<bond atomRefs2="a13 a14" order="2" />
<bond atomRefs2="a14 a15" order="1" />
<bond atomRefs2="a15 a16" order="1" />
<bond atomRefs2="a16 a17" order="1" />
<bond atomRefs2="a17 a18" order="1" />
<bond atomRefs2="a18 a19" order="1" />
<bond atomRefs2="a19 a20" order="2" />
<bond atomRefs2="a17 a21" order="1" />
<bond atomRefs2="a21 a22" order="1" />
<bond atomRefs2="a20 a23" order="1" />
<bond atomRefs2="a11 a12" order="1" />
<bond atomRefs2="a9 a10" order="1" />
</bondArray>
<molecule id="sg1" role="SuperatomSgroup" title="Ph" molID="m2">
<atomArray
atomID="a24 a25 a26 a27 a28 a29"
elementType="C C C C C C"
attachmentPoint="1 0 0 0 0 0"
sgroupAttachmentPoint="1 0 0 0 0 0"
x3="-3.5862581356816725 -2.592682284591795 -1.2671939261541731 -0.9086695679721619 -1.9024404706009501 -3.227021481293478"
y3="1.9305276098721063 0.9301803643420943 1.2152796824549998 2.5099619451747417 3.512005407631268 3.223625588121501"
z3="0.0 0.0 0.0 0.0 0.0 0.0"
/>
<bondArray>
<bond atomRefs2="a24 a25" order="2">
<bondStereo>C</bondStereo>
</bond>
<bond atomRefs2="a24 a29" order="1" />
<bond atomRefs2="a25 a26" order="1" />
<bond atomRefs2="a26 a27" order="2">
<bondStereo>C</bondStereo>
</bond>
<bond atomRefs2="a27 a28" order="1" />
<bond atomRefs2="a28 a29" order="2">
<bondStereo>C</bondStereo>
</bond>
</bondArray>
</molecule>
<molecule id="sg2" role="SuperatomSgroup" title="SnBu3"
leftName="Bu3Sn" molID="m3">
<atomArray
atomID="a30 a31 a32 a33 a34 a35 a36 a37 a38 a39 a40 a41 a42"
elementType="Sn C C C C C C C C C C C C"
attachmentPoint="1 0 0 0 0 0 0 0 0 0 0 0 0"
sgroupAttachmentPoint="1 0 0 0 0 0 0 0 0 0 0 0 0"
x3="-14.221851105398912 -16.04494167893774 -15.5520948058921 -15.048265879237432 -16.569861074248404 -12.828337488352245 -11.587341041889932 -10.449079547183986 -9.235483195909424 -13.662755434435814 -13.210415669922995 -12.687148964281848 -12.243019395698106"
y3="8.902226420707523 12.94140965679999 11.626544913930324 10.633632461435054 13.946565877952917 9.280611062466257 9.899073998311865 10.248004914976978 10.861695349772583 7.365515852003108 6.103035142969123 5.0211098413026924 3.740491151614181"
z3="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"
/>
<bondArray>
<bond atomRefs2="a33 a30" order="1" />
<bond atomRefs2="a30 a35" order="1" />
<bond atomRefs2="a30 a39" order="1" />
<bond atomRefs2="a34 a31" order="1" />
<bond atomRefs2="a31 a32" order="1" />
<bond atomRefs2="a32 a33" order="1" />
<bond atomRefs2="a35 a36" order="1" />
<bond atomRefs2="a36 a37" order="1" />
<bond atomRefs2="a37 a38" order="1" />
<bond atomRefs2="a39 a40" order="1" />
<bond atomRefs2="a40 a41" order="1" />
<bond atomRefs2="a41 a42" order="1" />
</bondArray>
</molecule>
<molecule id="sg3" role="SuperatomSgroup" title="Ph" molID="m4">
<atomArray
atomID="a43 a44 a45 a46 a47 a48"
elementType="C C C C C C"
attachmentPoint="1 0 0 0 0 0"
sgroupAttachmentPoint="1 0 0 0 0 0"
x3="-5.916512739162107 -5.194622652907951 -3.780488175246626 -3.058874102021151 -3.780488175246628 -5.194622652907952"
y3="7.4125507369616574 6.201252073172579 6.199519453758269 7.412550736961659 8.62558202016505 8.62384940075074"
z3="0.0 0.0 0.0 0.0 0.0 0.0"
/>
<bondArray>
<bond atomRefs2="a43 a44" order="2">
<bondStereo>C</bondStereo>
</bond>
<bond atomRefs2="a43 a48" order="1" />
<bond atomRefs2="a44 a45" order="1" />
<bond atomRefs2="a45 a46" order="2">
<bondStereo>C</bondStereo>
</bond>
<bond atomRefs2="a46 a47" order="1" />
<bond atomRefs2="a47 a48" order="2">
<bondStereo>C</bondStereo>
</bond>
</bondArray>
</molecule>
</molecule>
</MChemicalStruct>
<MPolyline id="o2" headLength="0.8" headWidth="0.5">
<MPoint x="-12.849374771118164" y="0.5774999856948853" />
<MPoint x="-9.576874732971191" y="0.5774999856948853" />
</MPolyline>
</MDocument>
</cml>

I click and hold on the Sn-H bond, and I drag and release elsewhere to make a copy of it.  New MRV:


<?xml version="1.0" ?>
<cml>
<MDocument>
<MPolyline id="o1" headLength="0.8" headWidth="0.5">
<MPoint x="-12.849374771118164" y="0.5774999856948853" />
<MPoint x="-9.576874732971191" y="0.5774999856948853" />
</MPolyline>
<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"
elementType="C C C C C C C C C R R H C C C C C C C C C Br R R H"
mrvMap="0 0 0 0 0 0 0 0 0 0 11 0 1 2 3 4 5 8 9 10 6 7 0 11 0"
sgroupRef="0 0 0 0 0 0 0 0 0 sg1 0 0 0 0 0 0 0 0 0 0 0 0 sg2 sg3 0"
x3="-4.629613009938996 -4.565843377022752 -5.259307535176514 -6.7379205391735235 -6.503039272924697 -6.163673618586791 -8.223150396452 -7.5934558723170404 -3.184983124234586 -2.4497814091299728 -11.64625072479248 -9.930626068115235 -15.111249923706055 -13.777570801878019 -12.443891680049983 -11.110212558221948 -9.776533436393912 -8.442854314565876 -7.10917519273784 -5.775496070909805 -9.776533436393912 -8.131085169203478 -4.441816949081769 -2.3978122901916503 -0.6821876335144044"
y3="0.6316366887693423 -0.49287051730163345 -0.0020923257919180926 0.45826034313052944 1.66989599445367 1.0361864811959736 3.894259246086662E-4 0.6341184421561197 -0.6400493501261 0.6116437337106291 1.5399998426437378 1.5399998426437378 5.678750038146973 4.908750038146973 5.678750038146973 4.908750038146972 5.678750038146972 4.908750038146971 5.678750038146971 4.90875003814697 7.218750038146972 8.168750038146971 5.67875003814697 3.134999990463257 3.134999990463257"
z3="-4.029635224964309 -2.8441399532315996 -1.4705479348913886 -1.846778709222371 -2.7980178060000114 -4.180526107514 -2.19922291232889 -4.758310205823841 -2.543655183843436 -2.029512341840779 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"
/>
<bondArray>
<bond atomRefs2="a1 a2" order="1" />
<bond atomRefs2="a1 a6" order="1" />
<bond atomRefs2="a2 a3" order="1" />
<bond atomRefs2="a3 a4" order="1" />
<bond atomRefs2="a4 a5" order="1" />
<bond atomRefs2="a5 a6" order="1" />
<bond atomRefs2="a4 a7" order="1" />
<bond atomRefs2="a6 a8" order="1" />
<bond atomRefs2="a7 a8" order="1" />
<bond atomRefs2="a2 a9" order="1">
<bondStereo convention="MDL" conventionValue="4" />
</bond>
<bond atomRefs2="a13 a14" order="2" />
<bond atomRefs2="a14 a15" order="1" />
<bond atomRefs2="a15 a16" order="1" />
<bond atomRefs2="a16 a17" order="1" />
<bond atomRefs2="a17 a18" order="1" />
<bond atomRefs2="a18 a19" order="1" />
<bond atomRefs2="a19 a20" order="2" />
<bond atomRefs2="a17 a21" order="1" />
<bond atomRefs2="a21 a22" order="1" />
<bond atomRefs2="a20 a23" order="1" />
<bond atomRefs2="a11 a12" order="1" />
<bond atomRefs2="a9 a10" order="1" />
<bond atomRefs2="a24 a25" order="1" />
</bondArray>
<molecule id="sg1" role="SuperatomSgroup" title="Ph" molID="m2">
<atomArray
atomID="a26 a27 a28 a29 a30 a31"
elementType="C C C C C C"
attachmentPoint="1 0 0 0 0 0"
sgroupAttachmentPoint="1 0 0 0 0 0"
x3="-3.5862581356816725 -2.592682284591795 -1.2671939261541731 -0.9086695679721619 -1.9024404706009501 -3.227021481293478"
y3="1.9305276098721063 0.9301803643420943 1.2152796824549998 2.5099619451747417 3.512005407631268 3.223625588121501"
z3="0.0 0.0 0.0 0.0 0.0 0.0"
/>
<bondArray>
<bond atomRefs2="a26 a27" order="2">
<bondStereo>C</bondStereo>
</bond>
<bond atomRefs2="a26 a31" order="1" />
<bond atomRefs2="a27 a28" order="1" />
<bond atomRefs2="a28 a29" order="2">
<bondStereo>C</bondStereo>
</bond>
<bond atomRefs2="a29 a30" order="1" />
<bond atomRefs2="a30 a31" order="2">
<bondStereo>C</bondStereo>
</bond>
</bondArray>
</molecule>
<molecule id="sg2" role="SuperatomSgroup" title="Ph" molID="m3">
<atomArray
atomID="a32 a33 a34 a35 a36 a37"
elementType="C C C C C C"
attachmentPoint="1 0 0 0 0 0"
sgroupAttachmentPoint="1 0 0 0 0 0"
x3="-5.916512739162107 -5.194622652907951 -3.780488175246626 -3.058874102021151 -3.780488175246628 -5.194622652907952"
y3="7.4125507369616574 6.201252073172579 6.199519453758269 7.412550736961659 8.62558202016505 8.62384940075074"
z3="0.0 0.0 0.0 0.0 0.0 0.0"
/>
<bondArray>
<bond atomRefs2="a32 a33" order="2">
<bondStereo>C</bondStereo>
</bond>
<bond atomRefs2="a32 a37" order="1" />
<bond atomRefs2="a33 a34" order="1" />
<bond atomRefs2="a34 a35" order="2">
<bondStereo>C</bondStereo>
</bond>
<bond atomRefs2="a35 a36" order="1" />
<bond atomRefs2="a36 a37" order="2">
<bondStereo>C</bondStereo>
</bond>
</bondArray>
</molecule>
<molecule id="sg3" role="SuperatomSgroup" title="SnBu3"
leftName="Bu3Sn" molID="m4">
<atomArray
atomID="a38 a39 a40 a41 a42 a43 a44 a45 a46 a47 a48 a49 a50"
elementType="Sn C C C C C C C C C C C C"
attachmentPoint="1 0 0 0 0 0 0 0 0 0 0 0 0"
sgroupAttachmentPoint="1 0 0 0 0 0 0 0 0 0 0 0 0"
x3="4.2750257638027485 2.451935190263921 2.9447820633095603 3.4486109899642283 1.927015794953256 5.668539380849415 6.909535827311728 8.047797322017674 9.261393673292236 4.834121434765846 5.286461199278666 5.8097279049198125 6.253857473503555"
y3="12.09222671634656 16.13140995243903 14.816545209569362 13.823632757074092 17.136566173591955 12.470611358105295 13.089074293950903 13.438005210616016 14.051695645411622 10.555516147642146 9.293035438608161 8.21111013694173 6.930491447253219"
z3="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"
/>
<bondArray>
<bond atomRefs2="a41 a38" order="1" />
<bond atomRefs2="a38 a43" order="1" />
<bond atomRefs2="a38 a47" order="1" />
<bond atomRefs2="a42 a39" order="1" />
<bond atomRefs2="a39 a40" order="1" />
<bond atomRefs2="a40 a41" order="1" />
<bond atomRefs2="a43 a44" order="1" />
<bond atomRefs2="a44 a45" order="1" />
<bond atomRefs2="a45 a46" order="1" />
<bond atomRefs2="a47 a48" order="1" />
<bond atomRefs2="a48 a49" order="1" />
<bond atomRefs2="a49 a50" order="1" />
</bondArray>
</molecule>
</molecule>
</MChemicalStruct>
</MDocument>
</cml>

Even though the original Bu3Sn group appear to be unchanged, it is undefiend in the MRV.  I have reproduced this behavior both here (Marvin 5.6.0.0 with iCab 4.8 for Mac) and here (Marvin 5.4.1.0 with iCab 4.8 for Mac).


There's an easy workaround -- highlight the bond and the two associated atoms before the click-hold-drag -- but, in order to know that one needs to use the workaround, one would need to know that the copying process caused an inconsistency.  Better just to fix the inconsistency.

User 870ab5b546

04-10-2011 01:13:53

A student just came to me with a problem that was caused by this bug.  Have you reproduced it, and do you plan to fix it?

ChemAxon 5433b8e56b

05-10-2011 02:56:15

Hi Bob,


i am apologize for the very late answer on this thread, i tried to reproduce it on my Windows both with applet and Beans packages, but i was not able to reproduce the issue.


Today me or my colleague will also try it on a Mac, and we try to figure out what could be the problem, if we are able to reproduce it.


We implement some changes on this area in 5.7 so it is may be fixed there, we will also check this with 5.7 on a Mac today, and get back to you with the results.


Regards,
Istvan

ChemAxon 5433b8e56b

05-10-2011 15:56:48

Hi Bob,


i have tried the example page on the chemaxon site which currently have 5.6.0.1 installed, this version was released after your first post. I also checked the simple embedding example of 5.6.0.0.


I can not reproduce the bug unfortunatelly, i used iCab4.8.0, on a 10.5.8 Mac with 1.6.0_26 java.


What i done:
- copied the structure from your post
- paste it into the applet
- choose the selection tool
- click and hold on the bond, and drag it and release the mouse key


the structure did not disappeared from the molecule object. Did i somthing differently then you when the bug apears? Are you dragging the structure between two applet?


I just review the two structure, and i recognized that the Bu3Sn group is still there in the second structure, but it has been switched from sg2 to sg3, while the Ph whcih was sg3 became sg2, could it be the cause of the problem?


Regards,
Istvan 

User 870ab5b546

05-10-2011 17:21:15

Sorry, you need to option-click and hold on the Bu3Sn–H bond, then drag, to copy the Bu3Sn–H elsewhere.


If you now look at the MRV, you will see:


          elementType="C C C C C C C C C R R H C C C C C C C C C Br R R H"
mrvMap="0 0 0 0 0 0 0 0 0 0 11 0 1 2 3 4 5 8 9 10 6 7 0 11 0"
sgroupRef="0 0 0 0 0 0 0 0 0 sg1 0 0 0 0 0 0 0 0 0 0 0 0 sg2 sg3 0"

Note that there is no sg corresponding to the second R group.

ChemAxon 5433b8e56b

17-10-2011 13:02:41

Hi Bob,


sorry for the late reply, finally i understand the problem, and i can confirm, this is a bug. We will investigate it as soon as possible.


Regards,
Istvan

ChemAxon 5433b8e56b

19-10-2011 22:55:38

Hi Bob,


after investigating this issue a bit more, i found, the problem occurs when you have an s-grop that have an atom attached, and the group is contracted while the user wants to option+drag the bond.


This problem is not a platform specific problem. There is a workaround which can help in this situation, the option+drag works properly when you select the group and the connected atom before you drag it, not just click on the bond and option+drag it.


I filed a bug report to our issue tracker, we will notify you when a fix is ready.


Regards,
Istvan