How to Change default as static 2D image

User b5f79361ac

30-01-2009 17:49:03

Hi,








I used the following javascript to inialize the marvie view result of compound search. It is 3D automatic rotated animation. It is wonderful. But I wonder how I change it as static 2D image as default. What are the parameters named?





Thanks!

















*****************************************************************


<script LANGUAGE="JavaScript1.1" SRC="jchem/marvin/marvin.js" >


                    </script>


<script LANGUAGE="JavaScript1.1">                                                                                                                                                            


                    <!--                                                                                                                                                            


                    <% /* Intializing the applet */ %>


                    mview_name="mview";                                                                                                                                       


                    mview_begin("jchem/marvin","100","100");                                                                                                                                        


                    mview_param("rows", "1");


                    mview_param("cols", "1");


                    mview_param("navmode", "rot3d");


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


                    mview_param("rendering", "ballstick");


                    mview_param("bgcolor", "#e0e0e0");


                    mview_param("border", "1");


                    mview_param("animSync","true");


                    mview_param("animate", "all");


                    mview_param("layout0", ":4:1:"+"M:0:0:1:1:c:n:1:10");      


                    <%  /* Molecule          */%>


                    mview_param("param0", ":"+"M:100:100");


                    mview_param("cell0","|<%= HTMLTools.convertForJavaScript(dbMolfile) %>");


                    mview_end();


                    //-->


                    </script>

User b5f79361ac

30-01-2009 21:05:26

I know how to make it static now. Just simply delete the sentense "mview_param("animate", "all");" to let it static.








But one more question is that I need every marvin applet show as "optimize 2D". I can manually right click the applet, select "Edit" -> "Clean" -> "2D" -> "Optimize" option. But I wonder how to set it as default display. 





Thanks a lot!

ChemAxon 909aee4527

05-02-2009 10:52:35

Dear Yinghua,





the default behavior is that the molecules are loaded in 2D, however you have used some parameters that change this, for example:





mview_param("navmode", "rot3d");


mview_param("rendering", "ballstick");





Please look at this more basic example: http://www.chemaxon.com/marvin/examples/applets/view/sdtable.html





To be sure that the molecules get cleaned, you can also use the following parameters:





mview_param("cleanDim", "2");


mview_param("importConv", "c");





The full list of the available parameters and descriptions is here: http://www.chemaxon.com/marvin/help/developer/viewman.html





We also suggest the MarvinView applet examples: http://www.chemaxon.com/marvin/examples/applets/examples-marvinview-applet.html





Please report us should you have any notices, suggestions, or difficulties with the documentation.





Kind regards,


Judit