How to get the SMILES and MRV from Marvin Viewer Applet

User 58ea0aff73

10-12-2006 11:19:52

Hi Guys...





I'm using Marvin Viewr to Draw and Show the structures...





Then can any one tell me how can i retrive the SMILES or MRV form a spcific Cell in the Viewer Applet..





Like : document.msketch.getMol("mrv");





This is my Applet code :





mview_name = "MView";


mview_begin("../tools/marvin/", 501, 201);


mview_param("rows", "2");


mview_param("cols", "2");


mview_param("border", "1");


mview_param("background", "#ffffff");


mview_param("molbg", "#F0F0F0");


mview_param("editable", "2");


mview_param("preload", "MolExport");


msketch_param("isMyTemplatesEnabled", "true");


mview_param("layoutH", ":1:1:L:0:0:1:1:");


mview_param("paramH", ":L:12bl");


mview_param("cell0", "|Structure|");


mview_param("cell1", "|Reaction|");


mview_param("cell2","||");


mview_param("cell3","||");


mview_end();





I have a button. when click the button how can i retrive the MRV and SMILES for Cell2 and Cell3.





Regards


Sarma

ChemAxon 7c2d26e5cf

11-12-2006 14:19:53

Use the JMView.getM(int,String) method to retrieve molecule in the required format from the specified cell.


Code:
if(document.MView != null) {


    smiles2 = document.MView.getM(2, "smiles");


    smiles3 = document.MView.getM(2, "smiles");


    mrv2 = document.MView.getM(2, "mrv");


    mrv3 = document.MView.getM(3, "mrv");


}