ValenceCheck is supported for atoms in molecules only

User 870ab5b546

30-09-2014 00:38:35

The code:


        final String SELF = "ChemUtils.checkValence: ";
origMol.valenceCheck();
final Molecule mol = origMol.clone();
boolean throwError = false;
debugPrintMRV(SELF + "checking for coordinate bonds starting at "
+ "shortcut groups in:\n", mol);
ValenceException exception = new ValenceException("You have drawn a "
+ "coordinate bond that originates at a shortcut group. A "
+ "coordinate bond must originate at an atom. ");
for (final Sgroup sgroupRaw : mol.getSgroupArray()) {
if (sgroupRaw instanceof SuperatomSgroup) {
final SuperatomSgroup sgroup = (SuperatomSgroup) sgroupRaw;
final SgroupAtom superatom = sgroup.getSuperAtom();
final MolAtom attachPt = sgroup.findAttachAtom();
if (attachPt != null) {
debugPrint(SELF + "found shortcut group ", superatom,
" with attachment point ", attachPt,
mol.indexOf(attachPt) + 1, " with ",
attachPt.getBondCount(),
" bond(s); checking for coordinate bond.");
for (final MolBond bond : attachPt.getBondArray()) {
if (bond.getType() == MolBond.COORDINATE) {
debugPrint(SELF + "Coordinate bond originates "
+ "at attachment point of shortcut group ",
superatom, mol.indexOf(attachPt) + 1);
final MolAtom atom1 = bond.getAtom1();
final MolAtom atom2 = bond.getAtom2();
// pointer equality:
final int[] badAtomNums = ArrayUtils.addAll(
exception.getBadAtomNums(),
new int[] {mol.indexOf(superatom) + 1,
mol.indexOf(atom1 == attachPt
|| atom1 == (MolAtom) superatom
? atom2 : atom1) + 1});
exception.setBadAtomNums(badAtomNums);
throwError = true;
} // if bond is coordinate
} // for each bond to the superatom attachment point
} // if there's an attachment point
} // if shortcut group is a superatom
} // for each shortcut group
if (throwError) {
debugPrintMRV(SELF + "Coordinate bond error(s) in:\n", mol);
throw exception;
} // if should throw an error
debugPrint(SELF + "no coordinate bonds starting at shortcut group; "
+ "checking for valence errors.");
mol.ungroupSgroups(SHORTCUT_GROUPS); // line 876
debugPrintMRV(SELF + "after ungroupSgroups():\n", mol);
...

The substrate:


<?xml version="1.0" encoding="windows-1252"?>
<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_8_4.xsd" version="ChemAxon file format v14.8.4, generated by v14.9.8.0">
<MDocument>
<MChemicalStruct>
<molecule molID="m1">
<atomArray atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14" elementType="C C N C C C
R C C C C C C C" sgroupRef="0 0 0 0 0 0 sg1 0 0 0 0 0 0 sg2" x2="-1.5399999618530273 -2.873669302901286 -2.873669302901286 -1.5399999618530273 -0.20633062080476905 -0.20633062080476905 -4.2073533150385165 2.4610227323807212 3.7946920734289815 3.7946920734289824 2.461022732380724 1.1273533913324643 1.127353391332463 5.128376085566212" y2="1.973158870389245 1.2031419298302044 -0.3368919512878767 -1.1069088918469172 -0.3368919512878767 1.2031419298302044 1.9731334595040955 1.2031165189450506 1.9731334595040926 3.513167340622174 4.283184281181216 3.513167340622174 1.973133459504094 4.283158870296064"/>
<bondArray>
<bond id="b1" atomRefs2="a1 a2" order="1"/>
<bond id="b2" atomRefs2="a2 a3" order="2"/>
<bond id="b3" atomRefs2="a3 a4" order="1"/>
<bond id="b4" atomRefs2="a4 a5" order="2"/>
<bond id="b5" atomRefs2="a5 a6" order="1"/>
<bond id="b6" atomRefs2="a1 a6" order="2"/>
<bond id="b7" atomRefs2="a2 a7" order="1"/>
<bond id="b8" atomRefs2="a8 a9" order="1"/>
<bond id="b9" atomRefs2="a9 a10" order="2"/>
<bond id="b10" atomRefs2="a10 a11" order="1"/>
<bond id="b11" atomRefs2="a11 a12" order="2"/>
<bond id="b12" atomRefs2="a12 a13" order="1"/>
<bond id="b13" atomRefs2="a8 a13" order="2"/>
<bond id="b14" atomRefs2="a10 a14" order="1"/>
<bond id="b15" atomRefs2="a13 a6" order="1"/>
</bondArray>
<molecule id="sg1" role="SuperatomSgroup" title="OMe" leftName="MeO" molID="m2">
<atomArray atomID="a15 a16" elementType="O C" attachmentPoint="1 0" sgroupAttachmentPoint="1 0" x2="-7.892500381469727 -6.352500381469726" y2="3.8499999046325684 3.8499999046325684"/>
<bondArray>
<bond id="b16" atomRefs2="a16 a15" order="1"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a15" order="1" bond="b7"/>
</AttachmentPointArray>
</molecule>
<molecule id="sg2" role="SuperatomSgroup" title="OMe" leftName="MeO" molID="m3">
<atomArray atomID="a17 a18" elementType="O C" attachmentPoint="1 0" sgroupAttachmentPoint="1 0" x2="5.868394939919245 5.098377999360202" y2="5.93557983760554 4.601910496557284"/>
<bondArray>
<bond id="b17" atomRefs2="a18 a17" order="1"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a17" order="1" bond="b14"/>
</AttachmentPointArray>
</molecule>
</molecule>
</MChemicalStruct>
</MDocument>
</cml>

The exception:


Sep 29, 2014 8:14:21 PM org.apache.catalina.core.StandardWrapperValve invoke
INFO: java.lang.UnsupportedOperationException: ValenceCheck is supported for atoms in molecules only
at chemaxon.struc.MolAtom.valenceCheck(MolAtom.java:4069)
at chemaxon.struc.Molecule.ungroupSgroup(Molecule.java:2627)
at chemaxon.struc.Molecule.ungroupSgroup(Molecule.java:2488)
at chemaxon.struc.Molecule.ungroupSgroups(Molecule.java:2568)
at chemaxon.struc.Molecule.ungroupSgroups(Molecule.java:2550)
at com.epoch.chem.ChemUtils.checkValence(ChemUtils.java:876)
at com.epoch.responses.Response.initializeResponse(Response.java:166)
at com.epoch.responses.Response.<init>(Response.java:104)
at com.epoch.qBank.Question.parseResponse(Question.java:1216)
at com.epoch.session.HWSession.submitResponse(HWSession.java:928)
at org.apache.jsp.homework.answerframe_jsp._jspService(answerframe_jsp.java:582)

What does this exception mean? Using JChem and MarvinSketch 14.9.8.0; the structure would have been drawn with MarvinSketch. If there is something malformed about the MRV, then there is something wrong with how MarvinSketch converted the drawing into MRV.

User 870ab5b546

30-09-2014 01:20:37

Here's another structure that elicited the same error:


<?xml version="1.0" encoding="windows-1252"?>
<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_8_4.xsd" version="ChemAxon file format v14.8.4, generated by v14.9.8.0">
<MDocument>
<MChemicalStruct>
<molecule molID="m1">
<atomArray atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14 a15 a16" elementType="C C N C C C R C C C C C C C C C" sgroupRef="0 0 0 0 0 0 sg1 0 0 0 0 0 0 0 sg2 sg3" x2="-1.5399999618530273 -2.873669302901286 -2.873669302901286 -1.5399999618530273 -0.20633062080476905 -0.07433065132234717 -4.2073533150385165 1.2593484705056883 5.138344888327568 5.53690732294557 4.447938922349937 2.960408087136301 2.5618456525182998 3.6508140531139333 3.2522232762602243 4.846529699203644" y2="1.973158870389245 1.2031419298302044 -0.3368919512878767 -1.1069088918469172 -0.3368919512878767 1.291141988958012 1.9731334595040955 2.061141988958012 -0.8483434661607414 0.6391873690528946 1.7281557696485272 1.3295933350305242 -0.15793750018311048 -1.2469059007787449 -2.7344291418096764 3.2156790106794553"/>
<bondArray>
<bond id="b1" atomRefs2="a1 a2" order="1"/>
<bond id="b2" atomRefs2="a2 a3" order="2"/>
<bond id="b3" atomRefs2="a3 a4" order="1"/>
<bond id="b4" atomRefs2="a4 a5" order="2"/>
<bond id="b5" atomRefs2="a5 a6" order="1"/>
<bond id="b6" atomRefs2="a1 a6" order="2"/>
<bond id="b7" atomRefs2="a2 a7" order="1"/>
<bond id="b8" atomRefs2="a6 a8" order="1"/>
<bond id="b9" atomRefs2="a9 a10" order="1"/>
<bond id="b10" atomRefs2="a10 a11" order="2"/>
<bond id="b11" atomRefs2="a11 a12" order="1"/>
<bond id="b12" atomRefs2="a12 a13" order="2"/>
<bond id="b13" atomRefs2="a13 a14" order="1"/>
<bond id="b14" atomRefs2="a9 a14" order="2"/>
<bond id="b15" atomRefs2="a14 a15" order="1"/>
<bond id="b16" atomRefs2="a11 a16" order="1"/>
<bond id="b17" atomRefs2="a12 a8" order="1"/>
</bondArray>
<molecule id="sg1" role="SuperatomSgroup" title="OMe" leftName="MeO" molID="m2">
<atomArray atomID="a17 a18" elementType="O C" attachmentPoint="1 0" sgroupAttachmentPoint="1 0" x2="-7.892500381469727 -6.352500381469726" y2="3.8499999046325684 3.8499999046325684"/>
<bondArray>
<bond id="b18" atomRefs2="a18 a17" order="1"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a17" order="1" bond="b7"/>
</AttachmentPointArray>
</molecule>
<molecule id="sg2" role="SuperatomSgroup" title="SnMe3" leftName="Me3Sn" molID="m3">
<atomArray atomID="a19 a20 a21 a22" elementType="Sn C C C" attachmentPoint="1 0 0 0" sgroupAttachmentPoint="1 0 0 0" x2="-3.369056452275034 -2.9704751228171657 -4.8565822247602135 -2.280112009247757" y2="-12.146117240990066 -13.633643013475226 -11.74753591153219 -11.057172797962778"/>
<bondArray>
<bond id="b19" atomRefs2="a20 a19" order="1"/>
<bond id="b20" atomRefs2="a19 a21" order="1"/>
<bond id="b21" atomRefs2="a19 a22" order="1"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a19" order="1" bond="b15"/>
</AttachmentPointArray>
</molecule>
<molecule id="sg3" role="SuperatomSgroup" title="OMe" leftName="MeO" molID="m4">
<atomArray atomID="a23 a24" elementType="O C" attachmentPoint="1 0" sgroupAttachmentPoint="1 0" x2="4.171044575316719 4.56960700993472" y2="4.807102660154164 3.319571824940528"/>
<bondArray>
<bond id="b22" atomRefs2="a24 a23" order="1"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a23" order="1" bond="b16"/>
</AttachmentPointArray>
</molecule>
</molecule>
</MChemicalStruct>
</MDocument>
</cml>

ChemAxon d26931946c

30-09-2014 13:06:54

Hi,


 


This mrv is clearly corrupted. I could not draw a structure which have this issue in Marvin. Could you ask the student what he did? Could you reproduce this issue by yourself?


Is it possible that the file was edited after export?


 


Peter

User 870ab5b546

30-09-2014 14:45:33

I don't think the MRV could have been modified. Here's the Javascript that gets the MRV and processes it. You can see that we use the Javascript String.builder() object:



			// String cast necessary because Safari makes the value an object
var molstruct = String(applet.getMol('mrv:PS'));
// alert('got molstruct from applet:\n' + molstruct);
if (molstruct.indexOf('mrvAlias') >= 0 && true) {
toAlert('You probably meant to add a shortcut group such as Ph or Et to your structure, but you added an atom alias instead. (Aliases and shortcut groups look alike, but ACE cannot interpret aliases properly.) To replace the alias with a shortcut group, type the name of the shortcut group in the Marvin window (not in the textbox in the More window), then click on the alias.');
return;
} // if response contains an alias
if (molstruct.indexOf('z3=') > 0
&& (molstruct.indexOf('<bondStereo>W') > 0
|| molstruct.indexOf('<bondStereo>H') > 0)) {
if (!toConfirm('Your response appears to be in 3D mode and to contain stereo bonds such as bold or hashed wedges. When a drawing is in 3D mode, ACE ignores the stereochemical information conveyed by stereo bonds. Do you still want to submit your response?')) {
toAlert('To convert your drawing back into 2D mode, either click on "3D" in the lower left corner of the applet, or choose Structure &rarr; Clean 2D &rarr; Clean in 2D. Then you can redraw your wedge bonds.');
return;
} // if no confirm
} // if response is in 3D and has wedge bonds
submissionBld.append(molstruct);

var submissionStr = submissionBld.toString();
var url = 'answerframe.jsp';
// alert('submission =\n' + submissionStr);
if (submissionStr == '') {
toAlert('ACE could not acquire your response to this question. Please submit a response that is not empty.');
return;
} // if response is empty string
var toSend = new String.builder();

toSend.append('submission=').
append(encodeURIComponent(submissionStr));

toSend.append('&currentQNum=5&getresponse=true'
+ '&mode=0&evaluate=').append(evaluate);
// alert('calling ' + url + ' with params ' + toSend.toString());
setInnerHTML('submitCell', '<span class="boldtext">Processing... Please wait...<\/span>');
setInnerHTML('statusText', '');
setInnerHTML('status2Text', '');
setInnerHTML('feedbackText', '');
callAJAX(url, toSend.toString());
} // callServer

And here's the Java code where the MRV is acquired and gets sent to the back end to be processed:


String responseMol = request.getParameter("submission");
if (mappingIsVisible && usesApplet && !"marvin".equals(marvinVersion)) {
responseMol = MapProperty.convertSelections(responseMol); // wouldn't apply because mapping not visible
} else if (isTable) {
responseMol = TableQ.responseToXML(request, TableQ.URIS_ENCODED);
} else if (isText || isLogicalStmts) {
responseMol = Utils.inputToCERs(responseMol);
} // if is table or text
final String doEvaluateStr = request.getParameter("evaluate");
final boolean doEvaluate = doEvaluateStr == null
|| "true".equals(doEvaluateStr);
final boolean submitIt = !dueDatePast || mode != SOLVE || !doEvaluate;
try {
evalResult = (submitIt
? hwsession.submitResponse(responseMol, mode, doEvaluate)
: hwsession.getCurrentResult());

From here, we go to the server. The response MRV is passed unchanged from method to method until finally it arrives at:


return MolImporter.importMol(responseMRV);

where the exception is thrown.


I can try to ask the student what he or she did, but I doubt he or she can reproduce it. But I assure you, they would have been using MarvinSketch 14.9.8.0!


Whatever the problem is, it is rare. I found only the following 7 examples out of hundreds if not thousands of responses yesterday:


by E3shxSL7 to Skeletal structure question 5 (ID 8141) of assignment 8227 at Sep 29, 2014, 9:15 PM, EDT; not recording.
by eyPc59Hk to Skeletal structure question 5 (ID 8141) of assignment 8227 at Sep 29, 2014, 8:45 PM, EDT; not recording.
by FpTNhSJM to Skeletal structure question 5 (ID 8141) of assignment 8227 at Sep 29, 2014, 8:14 PM, EDT; not recording.
by YYvvR55h to Multistep synthesis question 3 (ID 8122) of assignment 8225 at Sep 29, 2014, 6:13 PM, EDT; not recording.
by YYvvR55h to Multistep synthesis question 3 (ID 8122) of assignment 8225 at Sep 29, 2014, 6:11 PM, EDT; not recording.
by cwsm223 to Skeletal structure question 13 (ID 1402) of assignment 8187 at Sep 29, 2014, 3:14 PM, EDT; not recording.
by skma236 to Mechanism question 3 (ID 2761) of assignment 8188 at Sep 29, 2014, 12:18 PM, EDT; not recording.

But you can see several different students made such malformed responses to several different questions of several different kinds. (The kinds of questions may determine how MarvinSketch is displayed, what toolbar buttons are present, etc.) And even a rare problem is a severe problem to the student it happens to, especially during an exam.


I've attached an archive of the responses from yesterday that elicited the exception.

User 870ab5b546

30-09-2014 19:47:49

A student just generated another corrupt response:


<?xml version="1.0" encoding="windows-1252"?>
<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_8_4.xsd" version="ChemAxon file format v14.8.4, generate
d by v14.9.8.0">
<MDocument>
<MRectangle id="o1">
<MPoint x="-6.496874958276749" y="5.678750514984131"/>
<MPoint x="4.042499870061874" y="5.678750514984131"/>
<MPoint x="4.042499870061874" y="-1.203124761581421"/>
<MPoint x="-6.496874958276749" y="-1.203124761581421"/>
</MRectangle>
<MRectangle id="o2">
<MPoint x="-32.55999755859375" y="-0.9679999351501465"/>
<MPoint x="-22.307998657226562" y="-0.9679999351501465"/>
<MPoint x="-22.307998657226562" y="-6.863999724388123"/>
<MPoint x="-32.55999755859375" y="-6.863999724388123"/>
</MRectangle>
<MRectangle id="o3">
<MPoint x="-21.29599952697754" y="-0.5720000267028809"/>
<MPoint x="-12.100000381469727" y="-0.5720000267028809"/>
<MPoint x="-12.100000381469727" y="-7.260000228881836"/>
<MPoint x="-21.29599952697754" y="-7.260000228881836"/>
</MRectangle>
<MPolyline id="o4" headLength="0.6" headWidth="0.4">
<MPoint x="-28.95199966430664" y="3.5199999809265137"/>
<MPoint x="-30.31599998474121" y="-2.084287794233387"/>
</MPolyline>
<MPolyline id="o5" headLength="0.6" headWidth="0.4">
<MPoint x="-23.011999130249023" y="-6.335999965667725"/>
<MPoint x="-20.322234805343367" y="-6.335999965667725"/>
</MPolyline>
<MPolyline id="o6" headLength="0.6" headWidth="0.4">
<MPoint x="-12.539999961853027" y="-4.840000152587891"/>
<MPoint x="-11.125999380843885" y="-11.274375737114623"/>
</MPolyline>
<MRectangle id="o7">
<MPoint x="-16.5" y="-9.284000396728516"/>
<MPoint x="-3.388000011444092" y="-9.284000396728516"/>
<MPoint x="-3.388000011444092" y="-17.29199981689453"/>
<MPoint x="-16.5" y="-17.29199981689453"/>
</MRectangle>
<MPolyline id="o8" headLength="0.6" headWidth="0.4">
<MPoint x="-4.883999824523926" y="-10.251999855041504"/>
<MPoint x="1.0120411134889267" y="-0.03975738689718358"/>
</MPolyline>
<MRectangle id="o9" lineColor="#ff0000">
<MPoint x="-31.107999801635742" y="8.315999984741211"/>
<MPoint x="-24.947999954223633" y="8.315999984741211"/>
<MPoint x="-24.947999954223633" y="3.3440001010894775"/>
<MPoint x="-31.107999801635742" y="3.3440001010894775"/>
</MRectangle>
<MChemicalStruct>
<molecule molID="m1">
<propertyList>
<property dictRef="reactionIds" title="reactionIds">
<scalar><![CDATA[61;184;105;64]]></scalar>
</property>
</propertyList>
<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" elementType="C C C C C C N N C C C C C C C C C C C C C C C C C C C C C C N C C C C C C C C C C R N C C C C R Br Br" 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 sg1 0 0 0 0 0 sg2 sg3 0" x2="-2.0693750381469727 -3.403044379195231 -3.403044379195231 -2.0693750381469727 -0.7357056970987141 -0.7357056970987141 -4.736723501023267 0.5979734247293214 2.0534431294475906 0.5909970181277198 2.0647482142491356 2.964238627570784 -27.719999313354492 -29.05366865440275 -29.05366865440275 -27.719999313354492 -26.386329972306235 -26.386329972306235 -27.940000534057617 -29.273669875105874 -29.273669875105874 -27.940000534057617 -26.60633119300936 -26.60633119300936 -17.468000411987305 -18.801669753035558 -18.80166975303556 -17.468000411987305 -16.134331070939048 -16.134331070939048 -14.800651949111012 -14.030648037481205 -15.276514366498231 -13.260644125851398 -12.784781708464177 -11.857950880959955 -13.191620222008211 -13.191620222008211 -11.857950880959955 -10.524281539911698 -10.524281539911698 -14.525299343836245 -9.190602418083664 -8.420598506453857 -9.666464835470883 -7.6505945948240495 -7.174732177436827 -30.607348996933908 -20.289195525520725 -17.468000411987305" y2="2.743158881118081 1.9731419405590405 0.43310805944095954 -0.3369088811180809 0.43310805944095954 1.9731419405590405 2.743141940559041 2.7431419405590405 4.7655898534649666 4.283043097714414 2.2738916741447137 3.523796166656031 7.172033731391213 6.402016790832173 4.861982909714092 4.091965969155051 4.861982909714092 6.402016790832173 -3.5639662104346534 -4.333983150993694 -5.874017032111775 -6.644033972670815 -5.874017032111775 -4.333983150993694 -3.2559661226966163 -4.025983063255654 -5.566016944373738 -6.336033884932778 -5.566016944373738 -4.025983063255657 -3.255983063255657 -0.8862190248237627 -1.7914356233357638 -3.255983063255657 -1.7914356233357638 -12.739546005466796 -13.509562946025834 -15.049596827143915 -15.819613767702958 -15.049596827143915 -13.509562946025834 -12.739562946025835 -12.739562946025835 -10.36979890759394 -11.275015506105941 -12.739562946025835 -11.275015506105941 -5.104017032111774 -5.96459827383162 -1.7159661226966163"/>
<bondArray>
<bond id="b1" atomRefs2="a1 a2" order="1"/>
<bond id="b2" atomRefs2="a2 a3" order="2"/>
<bond id="b3" atomRefs2="a3 a4" order="1"/>
<bond id="b4" atomRefs2="a4 a5" order="2"/>
<bond id="b5" atomRefs2="a5 a6" order="1"/>
<bond id="b6" atomRefs2="a1 a6" order="2"/>
<bond id="b7" atomRefs2="a2 a7" order="1"/>
<bond id="b8" atomRefs2="a6 a8" order="1"/>
<bond id="b9" atomRefs2="a10 a8" order="1"/>
<bond id="b10" atomRefs2="a8 a11" order="1"/>
<bond id="b11" atomRefs2="a9 a10" order="1"/>
<bond id="b12" atomRefs2="a11 a12" order="1"/>
<bond id="b13" atomRefs2="a9 a12" order="1"/>
<bond id="b14" atomRefs2="a13 a14" order="1"/>
<bond id="b15" atomRefs2="a14 a15" order="2"/>
<bond id="b16" atomRefs2="a15 a16" order="1"/>
<bond id="b17" atomRefs2="a16 a17" order="2"/>
<bond id="b18" atomRefs2="a17 a18" order="1"/>
<bond id="b19" atomRefs2="a13 a18" order="2"/>
<bond id="b20" atomRefs2="a19 a20" order="1"/>
<bond id="b21" atomRefs2="a20 a21" order="2"/>
<bond id="b22" atomRefs2="a21 a22" order="1"/>
<bond id="b23" atomRefs2="a22 a23" order="2"/>
<bond id="b24" atomRefs2="a23 a24" order="1"/>
<bond id="b25" atomRefs2="a19 a24" order="2"/>
<bond id="b26" atomRefs2="a25 a26" order="1"/>
<bond id="b27" atomRefs2="a26 a27" order="2"/>
<bond id="b28" atomRefs2="a27 a28" order="1"/>
<bond id="b29" atomRefs2="a28 a29" order="2"/>
<bond id="b30" atomRefs2="a29 a30" order="1"/>
<bond id="b31" atomRefs2="a25 a30" order="2"/>
<bond id="b32" atomRefs2="a32 a33" order="1"/>
<bond id="b33" atomRefs2="a34 a35" order="1"/>
<bond id="b34" atomRefs2="a32 a35" order="1"/>
<bond id="b35" atomRefs2="a33 a31" order="1"/>
<bond id="b36" atomRefs2="a31 a34" order="1"/>
<bond id="b37" atomRefs2="a36 a37" order="1"/>
<bond id="b38" atomRefs2="a37 a38" order="2"/>
<bond id="b39" atomRefs2="a38 a39" order="1"/>
<bond id="b40" atomRefs2="a39 a40" order="2"/>
<bond id="b41" atomRefs2="a40 a41" order="1"/>
<bond id="b42" atomRefs2="a36 a41" order="2"/>
<bond id="b43" atomRefs2="a37 a42" order="1"/>
<bond id="b44" atomRefs2="a41 a43" order="1"/>
<bond id="b45" atomRefs2="a44 a45" order="1"/>
<bond id="b46" atomRefs2="a46 a47" order="1"/>
<bond id="b47" atomRefs2="a44 a47" order="1"/>
<bond id="b48" atomRefs2="a45 a43" order="1"/>
<bond id="b49" atomRefs2="a43 a46" order="1"/>
<bond id="b50" atomRefs2="a21 a48" order="1"/>
<bond id="b51" atomRefs2="a27 a49" order="1"/>
<bond id="b52" atomRefs2="a25 a50" order="1"/>
</bondArray>
<molecule id="sg1" role="SuperatomSgroup" title="NO2" leftName="O2N" molID="m2">
<atomArray atomID="a51 a52 a53" elementType="N O O" formalCharge="1 -1 0" attachmentPoint="1 0 0" sgroupAttachmentPoint="1 0 0" x2="-10.061274433513512 -10.83127443351351 -8.521274433513511" y2="-19.582361482405897 -18.248682360577863 -19.582361482405897"/>
<bondArray>
<bond id="b53" atomRefs2="a51 a52" order="1"/>
<bond id="b54" atomRefs2="a51 a53" order="2"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a51" order="1" bond="b43"/>
</AttachmentPointArray>
</molecule>
<molecule id="sg2" role="SuperatomSgroup" title="NO2" leftName="O2N" molID="m3">
<atomArray atomID="a54 a55 a56" elementType="N O O" formalCharge="1 -1 0" attachmentPoint="1 0 0" sgroupAttachmentPoint="1 0 0" x2="-26.14332408661118 -26.91332408661118 -24.60332408661118" y2="-11.94681556849184 -10.613136446663805 -11.946815568491843"/>
<bondArray>
<bond id="b55" atomRefs2="a54 a55" order="1"/>
<bond id="b56" atomRefs2="a54 a56" order="2"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a54" order="1" bond="b50"/>
</AttachmentPointArray>
</molecule>
<molecule id="sg3" role="SuperatomSgroup" title="NO2" leftName="O2N" molID="m4">
<atomArray atomID="a57 a58 a59" elementType="N O O" formalCharge="1 -1 0" attachmentPoint="1 0 0" sgroupAttachmentPoint="1 0 0" x2="-13.172640840816587 -14.506319962644621 -11.838961718988552" y2="-9.458024849287582 -8.688024849287583 -8.688024849287581"/>
<bondArray>
<bond id="b57" atomRefs2="a57 a58" order="1"/>
<bond id="b58" atomRefs2="a57 a59" order="2"/>
</bondArray>
<AttachmentPointArray>
<attachmentPoint atom="a57" order="1" bond="b51"/>
</AttachmentPointArray>
</molecule>
</molecule>
</MChemicalStruct>
</MDocument>
</cml>

Clearly this is a real problem, even if it is hard to reproduce.

ChemAxon d26931946c

01-10-2014 08:43:02

I could reproduce one issue:


1) put a CO on the canvas with Lone pair calculation on and showing lone pairs.


2) move your mouse over the O atom and type "ome"


An exception is thrown and the applet becomes unusable. My theory is that you can still submit the molecule in this stage of the applet and the inconsistent molecule is being exported to mrv.


I've created a ticket for this in our system and get back to you when it's fixed.


Hopefully it will solve the other similar issue too.

User 870ab5b546

01-10-2014 13:00:36










gezapeti wrote:

I could reproduce one issue:


1) put a CO on the canvas with Lone pair calculation on and showing lone pairs.


2) move your mouse over the O atom and type "ome"


An exception is thrown and the applet becomes unusable. My theory is that you can still submit the molecule in this stage of the applet and the inconsistent molecule is being exported to mrv.


I've created a ticket for this in our system and get back to you when it's fixed.


Hopefully it will solve the other similar issue too.



Thank you so much for working on this problem and identifying a case where it can be reproduced!


I would note that lone pair display is turned on by default only for mechanism questions, but if you look at the 7 original examples I posted, only one of them involved a mechanism. A student could still have turned lone pair display on for one of these questions, but normally they wouldn't do so. (But maybe that's why the exception is so infrequent.)


Allow me to impress on you the urgency of fixing this bug. It's incredibly frustrating to the students.

User 870ab5b546

01-10-2014 13:18:55

These other forum topics here and here might be relevant to your work.

User 870ab5b546

02-10-2014 14:41:24










gezapeti wrote:

I could reproduce one issue:


1) put a CO on the canvas with Lone pair calculation on and showing lone pairs.


2) move your mouse over the O atom and type "ome"


An exception is thrown and the applet becomes unusable. My theory is that you can still submit the molecule in this stage of the applet and the inconsistent molecule is being exported to mrv.


I've created a ticket for this in our system and get back to you when it's fixed.


Hopefully it will solve the other similar issue too.



I tested your hypothesis. I did steps 1 and 2 and pressed Submit Response. I got a Javascript alert:


ACE could not acquire your response to this question. Please submit a response that is not empty.

In other words, the exception prevents the applet from exporting any MRV at all. So unfortunately, I don't think your hypothesis is correct.

ChemAxon d26931946c

07-10-2014 13:47:32

Thanks for the testing!


We'll look into this and fix this issue for sure, but we'll have to find some other ways to reproduce it then :)

User 870ab5b546

07-10-2014 13:52:06

This topic may also be relevant (read through it and you'll see why).


I think there's some fundamental bug in how shortcut groups are stored or encoded when they are drawn in certain ways.

User 870ab5b546

08-10-2014 17:53:00

I think that in at least some of these cases, a student may have replaced a shortcut group like OMe with a regular atom like C.


We upgraded to Java 8 on our server, and I can no longer reproduce these errors by pasting the MRV into the MarvinSketch window and submitting. I'm pretty sure I was able to reproduce them this way when we were still using Java 6. Perhaps the upgrade to Java 8 allows the molecule importer to work around the corrupted MRV. I'll let you know if I see the error appear in the logs again.

ChemAxon d26931946c

09-10-2014 08:20:39

Thank you for the information. I hope that fixes in lone pair painting and Sgroup creation will fix this issue too.

User 870ab5b546

09-10-2014 14:50:58

Thanks. Any chance this will be fixed very soon?


I continue to field occasional queries from students. One that I have seen twice recently is that when the students draw a series of rectangles, and they place all their structures inside the rectangles, some inconsistent shortcut groups are still located outside the rectangles. So they get an error message that tells them that some atoms are outside rectangles, but they can't see any such atoms. Ungrouping all of the shortcut groups solves the problem.

ChemAxon f052bdfe3c

10-10-2014 14:04:17

I understand these both are serious issues, we can start to work on them in two weeks.


Best regards,


Efi 

User 870ab5b546

28-10-2014 17:30:08

Hi, any progress on fixing these problems? Students find them very frustrating.

ChemAxon d26931946c

06-11-2014 15:32:10

We're still unable to create files like this with Marvin. We're trying to reproduce it and make abbreviation creation more robust.


The last mrv you've added has a broken header. After fixing the header it imports and shows the invalid behaviour, but we don't know how it's possible  to create an mrv with invalid header.


 

User 870ab5b546

06-11-2014 15:41:02

Well, all I can tell you is that it was done by drawing a structure in MarvinSketch.

ChemAxon f052bdfe3c

26-11-2014 13:06:18

", all I can tell you is that it was done by drawing a structure in MarvinSketch."


Do you have any information about the version of MSketch?

User 870ab5b546

26-11-2014 15:21:02

MarvinSketch 14.9.8.0. We recently upgraded to 14.11.10.0, and we have had some issues, but not this one in particular.