how can i display the molecule or reaction in the browser?

User 8769aa7b37

02-03-2007 10:16:27

Hi everybody,


i am getting the below given structure in my console by using marvin sketch





<?xml version="1.0" ?>


<MDocument>


<MChemicalStruct>


<molecule molID="m1">


<atomArray


atomID="a1"


elementType="C"


x2="-5.308333396911621"


y2="1.8083332777023315"


/>


<bondArray>


</bondArray>


</molecule>


</MChemicalStruct>


</MDocument>





how can i convert the above code to get the molecule or reaction in the browser can any body plz help me.

ChemAxon 7c2d26e5cf

02-03-2007 21:30:45

Your request is not clear for me.


You can paste this structure into a Marvin Sketch/View applet by copy.


You can also pass this molecule string to the applet as applet parameter or you can call JMView.setM(int,String) and JMSketch.setMol(String) methods from JavaScript to load it into a Marvin applet.


I can suggest you to see the following examples:


- Define molecule string in applet parameter:


http://www.chemaxon.com/marvin/examples/applets/example-sketch3.2.html


- Update molecule in sketcher through JavaScript:


http://www.chemaxon.com/marvin/examples/applets/example-sketch3.4.html

ChemAxon 7c2d26e5cf

02-03-2007 21:40:57

If you want to convert an MRV into another format in browser, I can suggest you to import MRV into a MarvinSketch or MarvinView applet then retrieve it in the proper format from the applet by JMView.getM(int,String) or JMSketch.getMol(String) through JavaScript.





If you use Marvin Beans (or JChem) package, you can call the MolConverter API in a JSP to convert your MRV to another format.