copy-paste bugs

User 870ab5b546

04-04-2016 18:39:14

Consider the following drawing copied from Marvin JS, pasted into a new Marvin JS window, with lone pair visibility turned on:


<cml><MDocument><MChemicalStruct><molecule molID="m1"><atomArray><atom id="a1" elementType="C" x2="54.82645623580127" y2="37.1570373110679"/><atom id="a2" elementType="C" x2="53.88982453750222" y2="35.934613055033424"/><atom id="a3" elementType="C" x2="54.762910743177926" y2="34.666123905881484"/><atom id="a4" elementType="C" x2="56.23920176391571" y2="35.10451747083176"/><atom id="a5" elementType="C" x2="56.278463409055924" y2="36.64393384312304"/><atom id="a6" elementType="C" x2="57.61214253088396" y2="37.41393384312304"/><atom id="a7" elementType="O" x2="58.94582165271199" y2="36.64393384312304" lonePair="2"/><atom id="a8" elementType="C" x2="57.57288088574374" y2="34.334517470831756"/><atom id="a9" elementType="C" x2="58.90656000757178" y2="35.10451747083176"/><atom id="a10" elementType="C" x2="60.24023912939981" y2="34.334517470831756"/><atom id="a11" elementType="N" x2="61.573918251227845" y2="35.10451747083176"/><atom id="a12" elementType="H" x2="64.63187408447266" y2="37.15250015258789"/><atom id="a13" elementType="Cl" x2="66.17187408447266" y2="37.15250015258789" lonePair="3"/><atom id="a14" elementType="C" x2="70.51882526798406" y2="37.921385090698216"/><atom id="a15" elementType="C" x2="69.21996713626632" y2="38.74877106693329"/><atom id="a16" elementType="C" x2="68.03175095284136" y2="37.76923722601472"/><atom id="a17" elementType="C" x2="68.59619543932608" y2="36.33639860377641"/><atom id="a18" elementType="C" x2="70.13323831539849" y2="36.430438176151675"/><atom id="a19" elementType="N" x2="69.91524861971428" y2="34.90594465613414"/><atom id="a20" elementType="C" x2="71.29767706000054" y2="34.227537808037"/><atom id="a21" elementType="C" x2="72.37013891108782" y2="35.332729951360164"/><atom id="a22" elementType="C" x2="71.65049189477345" y2="36.694145544031024"/><atom id="a23" elementType="C" x2="71.8525043898121" y2="38.69138509069822"/><atom id="a24" elementType="C" x2="71.8525043898121" y2="40.23138509069822"/><atom id="a25" elementType="C" x2="73.29625957780038" y2="37.82513600622556"/><atom id="a26" elementType="R" x2="68.82630417668699" y2="33.81700021310686" sgroupRef="sg1"/><atom id="a27" elementType="R" x2="62.90759737305588" y2="34.334517470831756" sgroupRef="sg2"/><atom id="a28" elementType="C" x2="56.842142530883955" y2="38.747612964951074"/><atom id="a29" elementType="C" x2="58.38214253088396" y2="38.747612964951074"/></atomArray><bondArray><bond atomRefs2="a1 a2" order="1" id="b1"/><bond atomRefs2="a2 a3" order="1" id="b2"/><bond atomRefs2="a3 a4" order="1" id="b3"/><bond atomRefs2="a4 a5" order="2" id="b4"/><bond atomRefs2="a1 a5" order="1" id="b5"/><bond atomRefs2="a5 a6" order="1" id="b6"/><bond atomRefs2="a6 a7" order="1" id="b7"/><bond atomRefs2="a4 a8" order="1" id="b8"/><bond atomRefs2="a8 a9" order="1" id="b9"/><bond atomRefs2="a9 a10" order="1" id="b10"/><bond atomRefs2="a10 a11" order="1" id="b11"/><bond atomRefs2="a12 a13" order="1" id="b12"/><bond atomRefs2="a14 a15" order="1" id="b13"/><bond atomRefs2="a15 a16" order="1" id="b14"/><bond atomRefs2="a16 a17" order="1" id="b15"/><bond atomRefs2="a17 a18" order="1" id="b16"/><bond atomRefs2="a14 a18" order="1" id="b17"/><bond atomRefs2="a18 a19" order="1" id="b18"/><bond atomRefs2="a18 a22" order="1" id="b19"/><bond atomRefs2="a19 a20" order="1" id="b20"/><bond atomRefs2="a20 a21" order="1" id="b21"/><bond atomRefs2="a21 a22" order="1" id="b22"/><bond atomRefs2="a14 a23" order="2" id="b23"/><bond atomRefs2="a23 a24" order="1" id="b24"/><bond atomRefs2="a23 a25" order="1" id="b25"/><bond atomRefs2="a6 a28" order="1" id="b26"/><bond atomRefs2="a6 a29" order="1" id="b27"/><bond atomRefs2="a19 a26" order="1" id="b28"/><bond atomRefs2="a11 a27" order="1" id="b29"/></bondArray><molecule id="sg1" molID="m2" role="SuperatomSgroup" title="CO2Me" leftName="MeO2C"><atomArray><atom id="a30" elementType="C" x2="68.82630417668699" y2="33.81700021310686"/><atom id="a31" elementType="O" x2="70.15998329851502" y2="33.04700021310686"/><atom id="a32" elementType="C" x2="71.49366242034306" y2="33.81700021310686"/><atom id="a33" elementType="O" x2="67.49262505485895" y2="33.04700021310686"/></atomArray><bondArray><bond atomRefs2="a32 a31" order="1" id="b30"/><bond atomRefs2="a31 a30" order="1" id="b31"/><bond atomRefs2="a30 a33" order="2" id="b32"/></bondArray></molecule><molecule id="sg2" molID="m3" role="SuperatomSgroup" title="CO2Me" leftName="MeO2C"><atomArray><atom id="a34" elementType="C" x2="62.90759737305588" y2="34.334517470831756"/><atom id="a35" elementType="O" x2="64.24127649488392" y2="33.56451747083176"/><atom id="a36" elementType="C" x2="65.57495561671195" y2="34.334517470831756"/><atom id="a37" elementType="O" x2="61.573918251227845" y2="33.56451747083176"/></atomArray><bondArray><bond atomRefs2="a36 a35" order="1" id="b33"/><bond atomRefs2="a35 a34" order="1" id="b34"/><bond atomRefs2="a34 a37" order="2" id="b35"/></bondArray></molecule></molecule></MChemicalStruct><MElectronContainer occupation="0 0" radical="0" id="o1"><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0"/><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0"/></MElectronContainer><MElectronContainer occupation="0 0" radical="0" id="o2"><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0"/><MElectron atomRefs="m1.a7" difLoc="0.0 0.0 0.0"/></MElectronContainer><MElectronContainer occupation="0 0" radical="0" id="o3"><MElectron atomRefs="m1.a13" difLoc="0.0 0.0 0.0"/><MElectron atomRefs="m1.a13" difLoc="0.0 0.0 0.0"/></MElectronContainer><MElectronContainer occupation="0 0" radical="0" id="o4"><MElectron atomRefs="m1.a13" difLoc="0.0 0.0 0.0"/><MElectron atomRefs="m1.a13" difLoc="0.0 0.0 0.0"/></MElectronContainer><MElectronContainer occupation="0 0" radical="0" id="o5"><MElectron atomRefs="m1.a13" difLoc="0.0 0.0 0.0"/><MElectron atomRefs="m1.a13" difLoc="0.0 0.0 0.0"/></MElectronContainer><MPolyline headLength="0.6" headWidth="0.4" id="o6"><MPoint x="64.39125061035156" y="36.334373474121094"/><MPoint x="66.6050033569336" y="36.28624725341797"/></MPolyline></MDocument></cml>

When I paste this structure into Marvin JS, the N–CO2Me bond in the structure on the right is missing.


Now, double-click on the left-hand structure, press and hold the command key (I'm using a Mac), drag, and release to make a copy of the structure. First, note that the copied structure retains the highlighting. Click somewhere on the canvas to turn the highlighting off; notice how the original structure relocates itself. Notice also how the N–CO2Me bond in the copied structure is erased, and the N no longer shows a lone pair. Restore the N-C bond, and the N still does not show a lone pair. Press the N button, then click on the N atom that is missing its lone pair, and notice how both the N–C bonds are broken.


Going back to the beginning. Double-click on the left-hand structure, then press command-C to copy it, then press command-V to paste it. Nothing happens.


Interestingly, if I copy the above structure from MarvinSketch, I don't see any of these bugs.

ChemAxon 76c88f5366

05-04-2016 16:53:07

Hi, 


The problem is that the source contains invalid structure: in your file, the abbreviated groups do not have attachment points, however these are treated so. 

In Marvin JS, if you try to attach an abbreviated group (which has no attachment points) to a structure, the abbreviation will ungroup, thus this should not happen is normal situations.


Can I ask you, whether you exported this structure from Marvin JS or did you generated it in other ways?


The source can be repaired in this way:
Import the file via Open dialog, and export it (in Export dialog).
Marvin JS will give the missing attachment points to the abbreviated groups. When you copy the improved source, all of the issues should disappear.


Please, let us know your findings.


Best regards,
Eszter 

User 870ab5b546

06-04-2016 14:56:53










eszabo wrote:

Hi, 


The problem is that the source contains invalid structure: in your file, the abbreviated groups do not have attachment points, however these are treated so. 

In Marvin JS, if you try to attach an abbreviated group (which has no attachment points) to a structure, the abbreviation will ungroup, thus this should not happen is normal situations.


Can I ask you, whether you exported this structure from Marvin JS or did you generated it in other ways?


The source can be repaired in this way:
Import the file via Open dialog, and export it (in Export dialog).
Marvin JS will give the missing attachment points to the abbreviated groups. When you copy the improved source, all of the issues should disappear.


Please, let us know your findings.


Best regards,
Eszter 



This source code was generated with MarvinSketch some years ago -- I don't know how long ago or what version, but it would have been a while ago. No problems occur when this source code is imported into MarvinSketch; problems have occurred only since we switched to Marvin JS on the front end. Here is the original source code generated by MarvinSketch and imported into Marvin JS:





<?xml version="1.0" ?>
<MDocument>
<MPolyline id="o1" headLength="0.8" headWidth="0.5">
<MPoint x="64.39125061035156" y="36.334373474121094" />
<MPoint x="66.6050033569336" y="36.28624725341797" />
</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 a26 a27 a28 a29"
elementType="C C C C C C O C C C N H Cl C C C C C N C C C C C C R R C C"
sgroupRef="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 sg2 sg1 0 0"
x2="54.82645623580127 53.88982453750222 54.762910743177926 56.23920176391571 56.278463409055924 57.61214253088396 58.94582165271199 57.57288088574374 58.90656000757178 60.24023912939981 61.573918251227845 64.63187408447266 66.17187408447266 70.51882526798406 69.21996713626632 68.03175095284136 68.59619543932608 70.13323831539849 69.91524861971428 71.29767706000054 72.37013891108782 71.65049189477345 71.8525043898121 71.8525043898121 73.29625957780038 68.82630417668699 62.90759737305588 56.842142530883955 58.38214253088396"
y2="37.1570373110679 35.934613055033424 34.666123905881484 35.10451747083176 36.64393384312304 37.41393384312304 36.64393384312304 34.334517470831756 35.10451747083176 34.334517470831756 35.10451747083176 37.15250015258789 37.15250015258789 37.921385090698216 38.74877106693329 37.76923722601472 36.33639860377641 36.430438176151675 34.90594465613414 34.227537808037 35.332729951360164 36.694145544031024 38.69138509069822 40.23138509069822 37.82513600622556 33.81700021310686 34.334517470831756 38.747612964951074 38.747612964951074"
/>
<bondArray>
<bond atomRefs2="a1 a2" order="1" />
<bond atomRefs2="a2 a3" order="1" />
<bond atomRefs2="a3 a4" order="1" />
<bond atomRefs2="a4 a5" order="2" />
<bond atomRefs2="a1 a5" order="1" />
<bond atomRefs2="a5 a6" order="1" />
<bond atomRefs2="a6 a7" order="1" />
<bond atomRefs2="a4 a8" order="1" />
<bond atomRefs2="a8 a9" order="1" />
<bond atomRefs2="a9 a10" order="1" />
<bond atomRefs2="a10 a11" order="1" />
<bond atomRefs2="a12 a13" order="1" />
<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="a14 a18" order="1" />
<bond atomRefs2="a18 a19" order="1" />
<bond atomRefs2="a18 a22" order="1" />
<bond atomRefs2="a19 a20" order="1" />
<bond atomRefs2="a20 a21" order="1" />
<bond atomRefs2="a21 a22" order="1" />
<bond atomRefs2="a14 a23" order="2" />
<bond atomRefs2="a23 a24" order="1" />
<bond atomRefs2="a23 a25" order="1" />
<bond atomRefs2="a6 a28" order="1" />
<bond atomRefs2="a6 a29" order="1" />
<bond atomRefs2="a19 a26" order="1" />
<bond atomRefs2="a11 a27" order="1" />
</bondArray>
<molecule id="sg1" role="SuperatomSgroup" title="CO2Me"
leftName="MeO2C" molID="m2">
<atomArray
atomID="a30 a31 a32 a33"
elementType="C O C O"
attachmentPoint="1 0 0 0"
x2="60.9812851339102 62.31496425573824 63.64864337756627 59.647606012082164"
y2="35.46812225341797 34.69812225341797 35.46812225341797 34.69812225341797"
/>
<bondArray>
<bond atomRefs2="a32 a31" order="1" />
<bond atomRefs2="a31 a30" order="1" />
<bond atomRefs2="a30 a33" order="2" />
</bondArray>
</molecule>
<molecule id="sg2" role="SuperatomSgroup" title="CO2Me"
leftName="MeO2C" molID="m3">
<atomArray
atomID="a34 a35 a36 a37"
elementType="C O C O"
attachmentPoint="1 0 0 0"
x2="67.8150253682852 69.14870449011323 70.48238361194127 66.48134624645716"
y2="34.36124588012695 33.591245880126955 34.36124588012695 33.591245880126955"
/>
<bondArray>
<bond atomRefs2="a36 a35" order="1" />
<bond atomRefs2="a35 a34" order="1" />
<bond atomRefs2="a34 a37" order="2" />
</bondArray>
</molecule>
</molecule>
</MChemicalStruct>
</MDocument>



It may be that this source contains an error in it that MarvinSketch tolerates, but if that is the case, then I urge you to have Marvin JS tolerate the error as well. Otherwise, I have to go back through thousands of structures and resave them with a more modern version of MarvinSketch.

ChemAxon 76c88f5366

07-04-2016 09:28:41

Hi,


I cannot reproduce the issues, you mentioned before, with the file you attached.


Could you, please, check if the problem still exists on our demo page: https://marvinjs-demo.chemaxon.com/latest/examples/example-copyasmrv.html 


(I assume you copy as MRV your structures.)


Best regards,
Eszter 

User 870ab5b546

07-04-2016 13:28:54

Yes, it happens on that page as well. If I copy the very first MRV code in this thread, and use command-V to paste it into the Marvin JS window, the problems that I mentioned occur. You can see immediately that the N–CO2Me bond in the righthand structure and the reaction arrow are both absent.


Where did I get the MRV code at the top of the thread? By copying (highlight, then command-C) the figure from a Marvin JS instance started in the following way:


<span id="responseAppletCell" style="text-align:center; width:500px; height:530px;">
<script type="text/javascript">
startMarvinJS('<?xml version="1.0" ?>\n<MDocument>\n <MPolyline id="o1" headLength="0.8" headWidth="0.5">\n <MPoint x="64.39125061035156" y="36.334373474121094" \/>\n <MPoint x="66.6050033569336" y="36.28624725341797" \/>\n <\/MPolyline>\n <MChemicalStruct>\n <molecule molID="m1">\n <atomArray\n 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"\n elementType="C C C C C C O C C C N H Cl C C C C C N C C C C C C R R C C"\n sgroupRef="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 sg2 sg1 0 0"\n x2="54.82645623580127 53.88982453750222 54.762910743177926 56.23920176391571 56.278463409055924 57.61214253088396 58.94582165271199 57.57288088574374 58.90656000757178 60.24023912939981 61.573918251227845 64.63187408447266 66.17187408447266 70.51882526798406 69.21996713626632 68.03175095284136 68.59619543932608 70.13323831539849 69.91524861971428 71.29767706000054 72.37013891108782 71.65049189477345 71.8525043898121 71.8525043898121 73.29625957780038 68.82630417668699 62.90759737305588 56.842142530883955 58.38214253088396"\n y2="37.1570373110679 35.934613055033424 34.666123905881484 35.10451747083176 36.64393384312304 37.41393384312304 36.64393384312304 34.334517470831756 35.10451747083176 34.334517470831756 35.10451747083176 37.15250015258789 37.15250015258789 37.921385090698216 38.74877106693329 37.76923722601472 36.33639860377641 36.430438176151675 34.90594465613414 34.227537808037 35.332729951360164 36.694145544031024 38.69138509069822 40.23138509069822 37.82513600622556 33.81700021310686 34.334517470831756 38.747612964951074 38.747612964951074"\n \/>\n <bondArray>\n <bond atomRefs2="a1 a2" order="1" \/>\n <bond atomRefs2="a2 a3" order="1" \/>\n <bond atomRefs2="a3 a4" order="1" \/>\n <bond atomRefs2="a4 a5" order="2" \/>\n <bond atomRefs2="a1 a5" order="1" \/>\n <bond atomRefs2="a5 a6" order="1" \/>\n <bond atomRefs2="a6 a7" order="1" \/>\n <bond atomRefs2="a4 a8" order="1" \/>\n <bond atomRefs2="a8 a9" order="1" \/>\n <bond atomRefs2="a9 a10" order="1" \/>\n <bond atomRefs2="a10 a11" order="1" \/>\n <bond atomRefs2="a12 a13" order="1" \/>\n <bond atomRefs2="a14 a15" order="1" \/>\n <bond atomRefs2="a15 a16" order="1" \/>\n <bond atomRefs2="a16 a17" order="1" \/>\n <bond atomRefs2="a17 a18" order="1" \/>\n <bond atomRefs2="a14 a18" order="1" \/>\n <bond atomRefs2="a18 a19" order="1" \/>\n <bond atomRefs2="a18 a22" order="1" \/>\n <bond atomRefs2="a19 a20" order="1" \/>\n <bond atomRefs2="a20 a21" order="1" \/>\n <bond atomRefs2="a21 a22" order="1" \/>\n <bond atomRefs2="a14 a23" order="2" \/>\n <bond atomRefs2="a23 a24" order="1" \/>\n <bond atomRefs2="a23 a25" order="1" \/>\n <bond atomRefs2="a6 a28" order="1" \/>\n <bond atomRefs2="a6 a29" order="1" \/>\n <bond atomRefs2="a19 a26" order="1" \/>\n <bond atomRefs2="a11 a27" order="1" \/>\n <\/bondArray>\n <molecule id="sg1" role="SuperatomSgroup" title="CO2Me"\n leftName="MeO2C" molID="m2">\n <atomArray\n atomID="a30 a31 a32 a33"\n elementType="C O C O"\n attachmentPoint="1 0 0 0"\n x2="60.9812851339102 62.31496425573824 63.64864337756627 59.647606012082164"\n y2="35.46812225341797 34.69812225341797 35.46812225341797 34.69812225341797"\n \/>\n <bondArray>\n <bond atomRefs2="a32 a31" order="1" \/>\n <bond atomRefs2="a31 a30" order="1" \/>\n <bond atomRefs2="a30 a33" order="2" \/>\n <\/bondArray>\n <\/molecule>\n <molecule id="sg2" role="SuperatomSgroup" title="CO2Me"\n leftName="MeO2C" molID="m3">\n <atomArray\n atomID="a34 a35 a36 a37"\n elementType="C O C O"\n attachmentPoint="1 0 0 0"\n x2="67.8150253682852 69.14870449011323 70.48238361194127 66.48134624645716"\n y2="34.36124588012695 33.591245880126955 34.36124588012695 33.591245880126955"\n \/>\n <bondArray>\n <bond atomRefs2="a36 a35" order="1" \/>\n <bond atomRefs2="a35 a34" order="1" \/>\n <bond atomRefs2="a34 a37" order="2" \/>\n <\/bondArray>\n <\/molecule>\n <\/molecule>\n <\/MChemicalStruct>\n<\/MDocument>\n',
3,
576,
'responseApplet',
'marvin'); // unnecessary for startMarvinJS()
</script>
</span>

<script type="text/javascript">

var MARVIN = 1;
var MECHANISM = 3;
var SYNTHESIS = 6;

var SHOWMAPPING = 128;
var THREEDIM = 256;
var SHOWLONEPAIRS = 512;
var IMPLICITHMASK = 263168;
var SHOWNOH = 262144;
var SHOWHETEROH = 263168;
var SHOWALLH = 1024;
var SHOWALLC = 8388608;
var SHOWRSLABELS = 2048;
var BADVALENCEINVISIBLE = 16777216;
var SHOW_COORD_BOND = 1073741824;

var marvinSketcherInstance;

/* Gets whether to show C atoms. */
function allCVisible(flags) {
"use strict";
return (flags & SHOWALLC) !== 0;
} // allCVisible()

/* Gets whether to show atom mapping. */
function atomMapsVisible(flags) {
"use strict";
return (flags & SHOWMAPPING) !== 0;
} // atomMapsVisible()

/* Gets whether to show R/S configurations. DOESN'T WORK IN MARVINJS.
function configsRSVisible(flags) {
"use strict";
return ((flags & SHOWRSLABELS) !== 0 ? 'ALL' : 'OFF');
} // configsRSVisible() */

/* Gets whether to show H atoms. */
function getHVisibilityJS(flags) {
"use strict";
return ((flags & IMPLICITHMASK) === SHOWNOH ? 'OFF' :
(flags & IMPLICITHMASK) === SHOWHETEROH ? 'HETERO' :
(flags & IMPLICITHMASK) === SHOWALLH ? 'ALL' :
'TERMINAL_AND_HETERO');
} // getHVisibilityJS()

/* Gets whether to display 3D templates. */
function is3D(flags) {
"use strict";
return (flags & THREEDIM) !== 0;
} // is3D()

// Loads the molecule and atom/bond selections. Called from below and also
// from resetFigure() in homework/answerJS.jsp.h.
function loadJSMol(mol) {
"use strict";
if (!isEmpty(mol)) {
marvinSketcherInstance.importStructure(null, mol);
}
if (loadSelections) {
loadSelections();
}
} // loadJSMol()

/* Gets whether to show lone pairs. */
function lonePairsVisible(flags) {
"use strict";
return (flags & SHOWLONEPAIRS) !== 0;
} // lonePairsVisible()

/* Gets whether to show valence errors. */
function valenceErrorVisible(flags) {
"use strict";
return (flags & BADVALENCEINVISIBLE) === 0;
} // valenceErrorVisible()

// Creates and initiates the Marvin JS drawing object.
function startMarvinJS(mol, qTypeRaw, qFlags, appletName) {
"use strict";
var qTypeNeg = qTypeRaw < 0,
qType = Math.abs(qTypeRaw),
isMechanism = qType === MECHANISM,
isSynthesis = qType === SYNTHESIS,
panelWidth = 400,
panelHeight = 400,
iframeBld;
if (((isMechanism || isSynthesis) && !qTypeNeg) ||
(!isMechanism && !isSynthesis && qTypeNeg)) {
panelWidth = 500;
panelHeight = 500;
} // how big to make canvas
iframeBld = new String.builder().
append('<div class="resizable" ' +
'style="margin-left:auto; margin-right:auto;">' +
'<iframe id="')
.append(appletName).append('" class="sketcher-frame" ' +
'src="\/nosession\/marvinJS\/editorws.html" '); // allows use of JChem Web Services
if (is3D(qFlags)) {
iframeBld.append('data-templateurl="templates\/3DTemplates.mrv" ');
} // if is3D
iframeBld.append('style="min-width:').append(panelWidth).
append('px; min-height:').append(panelHeight).
append('px; overflow:hidden; border:1px solid darkgray;" \/>' +
'<\/iframe><\/div');
setInnerHTML(appletName + 'Cell', iframeBld.toString());
getCell(appletName).addEventListener('load', function () {
// the iframe (id = appletName) has now been loaded
MarvinJSUtil.getEditor('#' + appletName).then(function (sketcher) {
// the Marvin JS editor (id = #appletName) has now been loaded
marvinSketcherInstance = sketcher;
marvinSketcherInstance.setServices({
reactionconvertws: null
});
marvinSketcherInstance.setDisplaySettings({
toolbars: 'reporting',
copyasmrv: true,
carbonLabelVisible: allCVisible(qFlags),
implicitHydrogen: getHVisibilityJS(qFlags),
valenceErrorVisible: valenceErrorVisible(qFlags),
atomIndicesVisible: appletName === 'hybridMarvin',
lonePairsVisible: lonePairsVisible(qFlags),
atomMapsVisible: atomMapsVisible(qFlags),
chiralFlagVisible: false, // don't show abs stereo flag
// currently no way to turn R/S visibility on/off
cpkColoring: true
});
loadJSMol(mol);
}, function (error) {
alert('Marvin JS did not load: ' + error);
}); // getEditor.then()
}); // addEventListener()
} // startMarvinJS()
</script>

ChemAxon 76c88f5366

08-04-2016 10:58:48

Dear Bob,


I think there is a misunderstanding between us, and my aim is to clear it up.


The first source is invalid, and all of the issues can be reproduced, you mentioned before, if I copy it on the canvas. 
We are working on one part of the solution currently, to repair such files during import, even without web services. I think this fix will be out in one of the following releases.


The other part of this issue is that worries me most: how could you get this invalid source by copying and pasting in Marvin JS, if you imported successfully a valid mrv at the first place? (Your second mrv source is valid, and I cannot reproduce any of the issues with it, neither setting this structure in this example, nor with an example based on the code snippet you sent.)


We could not launch the code you attached, so we needed to make some modifications in it. Please find it attached. Could you reproduce the issue with it?




Thank you in advance.


Best regards,
Eszter 

User 870ab5b546

11-04-2016 16:02:35

Well, now I can't reproduce it. I was able to reproduce it several times before I posted here, but now I can't. Ugh. Sorry to waste your time. If it comes up again, I'll contact you again. Maybe I was using an older version of MarvinJS.

ChemAxon 76c88f5366

11-04-2016 16:06:53

Thank you for checking it, and please, let us know if this happens again.