MView accessing extra parameters in SDF file

User 4ba1437001

30-10-2009 17:57:45

I have a file in SDF format that I can read in to a webpage with an MView applet (based on the sdtable.html example provided in the documentation).  The SDF file contains additional parameters that I would like to add to the MView frames.  Can Mview access these parameters, or are they discarded when the file is read?


BoB

ChemAxon e274e1bada

01-11-2009 22:36:35

I have moved this topic to the appropriate forum.


Regards,
Edvard

ChemAxon 7c2d26e5cf

04-11-2009 15:43:00

No, the applet can not process the SD file directly.


I suggest to write a pre-process module for your SD file and feed the applet with its output.


With other words, write a JSP page that process SD file and write applet parameters dynamically.


I recommend to investigate JChem JSP examples. Actually, they do the same (set molecule and labels separately to each cell). Its output looks like that:


    mview_name="mview";
mview_begin("../../marvin","752","965");
 mview_param("rows", "6");
mview_param("cols", "3");
mview_param("bgcolor", "#e0e0e0");
mview_param("border", 1);
mview_param("layout", ":3:2:M:0:0:3:1:n:n:1:10:L:0:1:1:1:nw:n:0:10:L:1:1:1:1:nw:n:0:10:L:2:1:1:1:nw:n:0:10");
mview_param("param", ":M:150:150:L:10:L:10:L:10");
mview_param("rgroupsVisible", "true");
mview_param("cell0_0", "wrap molecule source into a single line and escape linebreakswith \n");
mview_param("cell0_1", "ID: 2292");
mview_param("cell0_2", "C21H20N2O4");
mview_param("cell0_3", "MW: 364.3945");
mview_param("cell0_4", "");
mview_param("cell1_0", "wrap molecule source into a single line and escape linebreaks with \n");
mview_param("cell1_1", "ID: 2294");
mview_param("cell1_2", "C15H21O6P");
mview_param("cell1_3", "MW: 328.2974");
mview_param("cell1_4", "");
...
mview_end();



You can find the source of the JSP pages in the jchem package. Theirs online version is available on the ChemAxon site: JChemBase JSP implementation