User cbb759276f
12-04-2016 15:26:16
I have a list of substrates and products in SMILES. I also have a list of matching reagents in ASCII.
Substrate: CCCCCO
Product: CCCC=C
Reagent: H2SO4
Is it possible to convert these structures to .MRV while also including the reagents as text?
Say for dehydration of an alcohol to an alkene:
CCCCCO>>CCCC=C
I know I can specify the sulfuric acid reagent if I draw it out in full:
CCCCCO>OS(O)(=O)=O>CCCC=C
But we don't normally do that, instead we would usually insert a text label of H2SO4 above the arrow as per attached MRV
e.g. CCCCCO>"H2SO4">CCCC=C
Equally, some reagents are normally in abbreviated form e.g. LDA or mCPBA?
User 870ab5b546
12-04-2016 16:38:21
You can store the H2SO4 as a molecule property in the MRV, as illustrated below. In Java, use the molecule.setProperty(String name, String value) method. If you're using MarvinSketch, you can use the JavaScript method applet.setMolProperty(name, value) to set the property value of the molecule displayed in the applet. Unfortunately, there does not yet appear to be a similar method for Marvin JS.
<?xml version="1.0" encoding="MacRoman"?>
<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_12_01.xsd" version="ChemAxon file format v14.12.01, generated by v16.2.1.0">
<MDocument>
<MChemicalStruct>
<reaction>
<arrow type="DEFAULT" x1="-0.8156146503216801" y1="0.10077761902107203" x2="3.7014601033973777" y2="0.10077761902107203"/>
<reactantList>
<molecule molID="m1">
<propertyList>
<property dictRef="reagent" title="reagent">
<scalar><![CDATA[H2SO4]]></scalar>
</property>
</propertyList>
<atomArray atomID="a1 a2 a3 a4 a5 a6" elementType="C C C C C O" x2="-9.748395609140177 -8.414716487312141 -7.081037365484106 -5.747358243656071 -4.413679121828036 -3.0799999999999996" y2="-0.38499999999999956 0.38500000000000045 -0.385 0.385 -0.38500000000000045 0.38499999999999956"/>
<bondArray>
<bond id="b1" atomRefs2="a1 a2" order="1"/>
<bond id="b2" atomRefs2="a2 a3" order="1"/>
<bond id="b3" atomRefs2="a3 a4" order="1"/>
<bond id="b4" atomRefs2="a4 a5" order="1"/>
<bond id="b5" atomRefs2="a5 a6" order="1"/>
</bondArray>
</molecule>
</reactantList>
<productList>
<molecule molID="m2">
<atomArray atomID="a1 a2 a3 a4 a5" elementType="C C C C C" x2="10.559999999999999 9.79 8.25 7.48 5.94" y2="-1.3336791218280357 -2.220446049250313E-16 0.0 1.3336791218280357 1.3336791218280357"/>
<bondArray>
<bond id="b1" atomRefs2="a1 a2" order="1"/>
<bond id="b2" atomRefs2="a2 a3" order="1"/>
<bond id="b3" atomRefs2="a3 a4" order="1"/>
<bond id="b4" atomRefs2="a4 a5" order="2"/>
</bondArray>
</molecule>
</productList>
</reaction>
</MChemicalStruct>
</MDocument>
</cml>
ChemAxon f052bdfe3c
15-04-2016 12:06:39
Hello Bob,
Thank you for the answer. The missed functionality is already in the Marvin JS backlog and will be implemented in 1-2 month.
Best regards,
Efi
User cbb759276f
15-04-2016 13:40:44
bobgr wrote: |
You can store the H2SO4 as a molecule property in the MRV, as illustrated below. In Java, use the molecule.setProperty(String name, String value) method. If you're using MarvinSketch, you can use the JavaScript method applet.setMolProperty(name, value) to set the property value of the molecule displayed in the applet. Unfortunately, there does not yet appear to be a similar method for Marvin JS.
|
Hi Bob,
Thanks for the reply. When I copy your code into MarvinSketch, I don't see H2SO4 in the reaction scheme. Is there someway of displaying the reagent as well?
User 870ab5b546
15-04-2016 15:19:09
In that case, you need to have the reagent description inside a text box. With some effort, you can definitely use the Java API to do that. If you wanted it to be user-readable, you would have to set the location of the text box relative to the arrow.
I don't think there's a way to manipulate text boxes (read or write) with the JavaScript API of either MarvinSketch or Marvin JS.
If worse came to worst, you could use JavaScript to manipulate the MRV directly. The MRV of the reaction with H2SO4 displayed in a textbox above the arrow is below. The H2SO4 itself follows <Field name="text"><![CDATA[ . The stuff in braces, for example {D font=SansSerif,size=10}, formats the font, subscripts and superscripts, etc.
<?xml version="1.0" encoding="MacRoman"?>
<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_12_01.xsd" version="ChemAxon file format v14.12.01, generated by v16.2.1.0">
<MDocument>
<MChemicalStruct>
<reaction>
<arrow type="DEFAULT" x1="-0.8156146503216801" y1="0.10077761902107203" x2="3.7014601033973777" y2="0.10077761902107203"/>
<reactantList>
<molecule molID="m1">
<atomArray atomID="a1 a2 a3 a4 a5 a6" elementType="C C C C C O" x2="-9.748395609140177 -8.414716487312141 -7.081037365484106 -5.747358243656071 -4.413679121828036 -3.0799999999999996" y2="-0.38499999999999956 0.38500000000000045 -0.385 0.385 -0.38500000000000045 0.38499999999999956"/>
<bondArray>
<bond id="b1" atomRefs2="a1 a2" order="1"/>
<bond id="b2" atomRefs2="a2 a3" order="1"/>
<bond id="b3" atomRefs2="a3 a4" order="1"/>
<bond id="b4" atomRefs2="a4 a5" order="1"/>
<bond id="b5" atomRefs2="a5 a6" order="1"/>
</bondArray>
</molecule>
</reactantList>
<productList>
<molecule molID="m2">
<atomArray atomID="a1 a2 a3 a4 a5" elementType="C C C C C" x2="10.559999999999999 9.79 8.25 7.48 5.94" y2="-1.3336791218280357 -2.220446049250313E-16 0.0 1.3336791218280357 1.3336791218280357"/>
<bondArray>
<bond id="b1" atomRefs2="a1 a2" order="1"/>
<bond id="b2" atomRefs2="a2 a3" order="1"/>
<bond id="b3" atomRefs2="a3 a4" order="1"/>
<bond id="b4" atomRefs2="a4 a5" order="2"/>
</bondArray>
</molecule>
</productList>
</reaction>
</MChemicalStruct>
<MTextBox id="o2" color="#000000" toption="NOROT" fontScale="10.0" halign="LEFT" valign="TOP" autoSize="true">
<Field name="text"><![CDATA[{D font=SansSerif,size=10}H{subL=-1,scale=0.7,dy=-0.4}2{subL=0,scale=1.0}SO{subL=-1,scale=0.7,dy=-0.4}4]]></Field>
<MPoint x="-0.2777777910232544" y="1.7222222089767456"/>
<MPoint x="1.2622222089767448" y="1.7222222089767456"/>
<MPoint x="1.2622222089767448" y="0.9082222089767473"/>
<MPoint x="-0.2777777910232544" y="0.9082222089767473"/>
</MTextBox>
</MDocument>
</cml>