molecule properties needed

User 870ab5b546

07-11-2014 14:45:03

Sometimes I paste an MRV that contains a molecule property into Marvin. I then have code that extracts that molecule property from the applet and uses it to alter information elsewhere on the page when I press a button.


However, when I paste such a structure into MarvinJS, MarvinJS appears to ignore and lost the molecule property information.


I need MarvinJS to at least be able to save the molecule property and export it into the MRV.


Better would be setProperty() and getProperty() methods.

ChemAxon 996dedebe0

10-11-2014 09:59:21

Dear Bob,


We cannot fulfill this request. Marvin JS imports everything that is supported. If something is lost, it means that that property is not supported yet. Since different properties are stored at different locations in the molecule source, it would be a huge overhead to store all the unrecognized things and try to restore them on export.


Instead of this approach i suggest you to ask for real support of those properties. Please tell us which properties are these one by one and give us some clue about the usage frequency of those features.

User 870ab5b546

10-11-2014 14:09:09

Well, I need to be able to set my own molecule properties. The reason is that we sometimes gather extra information from the user in the GUI that contains Marvin[JS], and we store that extra information as a molecule property in the MRV string that we send to the server. For example, the screen shot shows a synthetic scheme in the MarvinSketch window, where the user has indicated that reaction conditions 1 and 2 apply to the reagents in boxes 1 and 2, respectively. Below the MarvinSketch window, the user has chosen some reaction conditions through separate actions (JavaScript code). When the user submits this response, the program stores the ID numbers corresponding to the reaction conditions as a molecule property in the MRV of the MarvinSketch drawing. We use this JMSketch method:


applet.setMolProperty('<%= Synthesis.RXN_IDS %>', rxnIds);

And the resulting MRV is:


<?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_8_4.xsd" version="ChemAxon file format v14.8.4, generated by v14.9.8.0">
<MDocument>
<MPolyline id="o1" headLength="0.8" headWidth="0.5">
<MRectanglePoint pos="3" rectRef="o4"/>
<MRectanglePoint pos="4" rectRef="o3"/>
</MPolyline>
<MPolyline id="o2" headLength="0.8" headWidth="0.5">
<MRectanglePoint pos="5" rectRef="o5"/>
<MRectanglePoint pos="7" rectRef="o4"/>
</MPolyline>
<MRectangle id="o3">
<MPoint x="-6.833750009536743" y="-2.2137500047683716"/>
<MPoint x="2.8874998092651367" y="-2.2137500047683716"/>
<MPoint x="2.8874998092651367" y="-7.218749761581421"/>
<MPoint x="-6.833750009536743" y="-7.218749761581421"/>
</MRectangle>
<MRectangle id="o4">
<MPoint x="0.19249999523162842" y="6.256249904632568"/>
<MPoint x="7.17062520980835" y="6.256249904632568"/>
<MPoint x="7.17062520980835" y="-0.1925000548362732"/>
<MPoint x="0.19249999523162842" y="-0.1925000548362732"/>
</MRectangle>
<MRectangle id="o5">
<MPoint x="-9.961874961853027" y="5.149374961853027"/>
<MPoint x="-2.983750104904175" y="5.149374961853027"/>
<MPoint x="-2.983750104904175" y="0.8181247711181641"/>
<MPoint x="-9.961874961853027" y="0.8181247711181641"/>
</MRectangle>
<MChemicalStruct>
<molecule molID="m1">
<propertyList>
<property dictRef="reactionIds" title="reactionIds">
<scalar><![CDATA[23;3]]></scalar>
</property>
</propertyList>
<atomArray atomID="a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13 a14" elementType="C C C C C C C C C C C C C Br" formalCharge="0 0 0 0 0 -1 0 0 0 0 0 0 0 0" x2="-7.940625190734863 -6.400625190734863 -4.860625190734863 2.40625 3.94625 5.48625 -5.197499990463257 -3.657499990463257 -2.1174999904632568 -0.5774999904632567 0.1925000095367435 1.9731249809265137 3.5131249809265137 4.283124980926514" y2="2.7912497520446777 2.7912497520446777 2.7912497520446777 4.427500009536743 4.427500009536743 4.427500009536743 -3.7537500858306885 -3.7537500858306885 -3.7537500858306885 -3.7537500858306885 -5.087429207658724 2.309999942779541 2.309999942779541 0.9763208209515057"/>
<bondArray>
<bond id="b1" atomRefs2="a1 a2" order="1"/>
<bond id="b2" atomRefs2="a2 a3" order="3"/>
<bond id="b3" atomRefs2="a4 a5" order="1"/>
<bond id="b4" atomRefs2="a5 a6" order="3"/>
<bond id="b5" atomRefs2="a7 a8" order="1"/>
<bond id="b6" atomRefs2="a8 a9" order="3"/>
<bond id="b7" atomRefs2="a9 a10" order="1"/>
<bond id="b8" atomRefs2="a10 a11" order="1"/>
<bond id="b9" atomRefs2="a12 a13" order="1"/>
<bond id="b10" atomRefs2="a13 a14" order="1"/>
</bondArray>
</molecule>
</MChemicalStruct>
<MTextBox id="o7" toption="NOROT" fontScale="10.0" halign="LEFT" valign="TOP" autoSize="true">
<Field name="text">1</Field>
<MPoint x="-6.833749771118164" y="4.379374980926514"/>
<MPoint x="-6.503749771118163" y="4.379374980926514"/>
<MPoint x="-6.503749771118163" y="3.6643749809265134"/>
<MPoint x="-6.833749771118163" y="3.6643749809265134"/>
</MTextBox>
<MTextBox id="o8" toption="NOROT" fontScale="10.0" halign="LEFT" valign="TOP" autoSize="true">
<Field name="text">2</Field>
<MPoint x="6.06374979019165" y="2.021250009536743"/>
<MPoint x="6.393749790191654" y="2.0212500095367405"/>
<MPoint x="6.393749790191654" y="1.3062500095367398"/>
<MPoint x="6.063749790191652" y="1.3062500095367424"/>
</MTextBox>
</MDocument>
</cml>

I would like to do something similar in MarvinJS. Currently I have a partial workaround in place, which is to send the reaction IDs as a separate URI to the JSP page, which then calls the Marvin Java Molecule.setProperty() method. But it complicates the code to have different techniques depending on whether the user is using MarvinSketch or MarvinJS, and it adds an extra import and export. Also, this workaround still does not allow the program to extract the reaction ID numbers from a synthesis response that has been pasted into MarvinJS, so that the program can use this information to update the other parts of the page.


We require this feature for every synthesis question, which I would say is about 15% of the kinds of questions I ask my students. 

ChemAxon f052bdfe3c

08-12-2014 10:26:13

Thank you for the information, I am attaching it to the related task.


Best regards,


Efi