How to disable MarvinSketch (java apllet) modules

User bb2ba884f2

11-02-2011 06:05:01

Hi to all !


To speed up the runing of MarvinSketch I need to disable some modules.


How  to do this ?

ChemAxon 0a9e2a55e1

14-02-2011 12:37:18

Hi,


What do You mean by "diable some modules"?


Marvin applet is in multiple jar files on the site, so Marvin only loads the currently needed jars. There are some modules, that is likely to be used by all users - like the menu icons - that are loaded in the backgound after a few seconds. If You download these files once, these jars will remain in Your java cash, so if You do not delete the cash these files are downloaded once/Marvin version/computer.


If You make Your own applet, and You have a slow internet connection, You can disable the background loading, but in that case the needed jars will be loaded when needed, so the user will have to wait a few seconds before he/she opens the menu the first time. If there are functions that are likely to be used You can force the java to load modules before showing the applet, but in this case loading the applet will take a bit longer, but there will be no downlods if the user uses that function.


The documentation for these parameters:


http://www.chemaxon.com/devel/marvin/help/developer/sketchman.html#parameters.preload


An applet example for these parameters:


http://www.chemaxon.com/devel/marvin/examples/applets/sketch/preload.html


Best Regards,


Peter

User bb2ba884f2

14-02-2011 12:55:27










pvadasz wrote:

Hi,


What do You mean by "diable some modules"?


Marvin applet is in multiple jar files on the site, so Marvin only loads the currently needed jars. There are some modules, that is likely to be used by all users - like the menu icons - that are loaded in the backgound after a few seconds. If You download these files once, these jars will remain in Your java cash, so if You do not delete the cash these files are downloaded once/Marvin version/computer.


If You make Your own applet, and You have a slow internet connection, You can disable the background loading, but in that case the needed jars will be loaded when needed, so the user will have to wait a few seconds before he/she opens the menu the first time. If there are functions that are likely to be used You can force the java to load modules before showing the applet, but in this case loading the applet will take a bit longer, but there will be no downlods if the user uses that function.


The documentation for these parameters:


http://www.chemaxon.com/devel/marvin/help/developer/sketchman.html#parameters.preload


An applet example for these parameters:


http://www.chemaxon.com/devel/marvin/examples/applets/sketch/preload.html


Best Regards,


Peter



Hi Peter!


By "disable modules" I mean tha this module or function will not be loaded when apllet start.


I need to do some restriction on MarvinSketch (on my site). For exemple: User draw his molecule in MarvinSketch. Then I need that user can't save this molecule, or apply functions on this molecule (like 3D, Add H+ or any others).
I know how to hide the menu bar by using "menubar parameter". I also tried the link that you posted with "preload" parameter (by the way - it speed up the running). But the functions still work (user can press hot keys for example ctrl+s to call "save as").


By applying this restrictions (disabling Marvinsketch modules) i think that it also speed up the MarvinSketch launch.


Hope you understood what i mean.


Best regards.

ChemAxon 7c2d26e5cf

14-02-2011 14:28:17

Generally, restriction of one or more features does not influence the startup time. When applet display, only the most important thinks are loaded in. The jar file of the save module is not downloaded by startup.


If background loading is enabled, it is received with other modules in the idle time of the applet. If background loading is disabled, first access of certain functionalities can be slower since their resources have not been downloaded yet. But neither the first, nor the second case influence the startup time of the applet.


In newer Java version (1.6.0_10 and higher), applets can handle compressed jar files. Since the size of jars are decreased dramatically by compression, it reduces the download time significantly.


If your embedded Marvin applet code is generated by marvin.js, this JVM option is active.


If you do not use marvin.js, you can specifiy it via the following applet parameter:


<param name="java_arguments" value="-Djnlp.packEnabled=true"/>

User bb2ba884f2

14-02-2011 15:35:25










Tamas wrote:

Generally, restriction of one or more features does not influence the startup time. When applet display, only the most important thinks are loaded in. The jar file of the save module is not downloaded by startup.


If background loading is enabled, it is received with other modules in the idle time of the applet. If background loading is disabled, first access of certain functionalities can be slower since their resources have not been downloaded yet. But neither the first, nor the second case influence the startup time of the applet.


In newer Java version (1.6.0_10 and higher), applets can handle compressed jar files. Since the size of jars are decreased dramatically by compression, it reduces the download time significantly.


If your embedded Marvin applet code is generated by marvin.js, this JVM option is active.


If you do not use marvin.js, you can specifiy it via the following applet parameter:


<param name="java_arguments" value="-Djnlp.packEnabled=true"/>


Hi!


Ok. Understood.


If I want to disable modules for user restriction reason. How to do this ? Give me please an example.

I am using MarvinSketch with "marvin.js".


Best Regards

ChemAxon 7c2d26e5cf

16-02-2011 14:32:02

 


If I want to disable modules for user restriction reason. How to do this ?

Customize MarvinSketch: remove those menu items that you would like restrict. See the documentation:


Customizing MarvinSketch GUI - Server Side

User bb2ba884f2

16-02-2011 18:32:19










Tamas wrote:

 


If I want to disable modules for user restriction reason. How to do this ?

Customize MarvinSketch: remove those menu items that you would like restrict. See the documentation:


Customizing MarvinSketch GUI - Server Side



Hi Tamas!


I know how to customize the GUI user interface. But I mean a complete disabling of module. For example: User has drawn his molecule and he can press hot key "Ctrl+S" to save the molecule or press Ctrl+3 (for clean 3D), even if  don't see the menu bar. So my goal is a complete function or module disabling.

ChemAxon 7c2d26e5cf

18-02-2011 20:42:07

I am not sure there is a general solution for it.


We are checking it.

ChemAxon 5433b8e56b

24-02-2011 02:23:38

Hi,


you also can customize the toolbars, popup menus(available thru right click), and the keymap for marvin.


Check this document on how to do this. After creating the desired configuration with the desktop app, you will have a customization.xml, and a shorcuts.xml file in your chemaxon settings directory. These files can be used for applet customization on server side.


The chemaxon settings directory is located under your home directory. On unix based systems it is called .chemaxon, on windows systems it is simply called chemaxon.


I hope that helps, if you have further questions do not hasitate to ask.


Regards,
Istvan

User bb2ba884f2

24-02-2011 08:17:06










ifajth wrote:

Hi,


you also can customize the toolbars, popup menus(available thru right click), and the keymap for marvin.


Check this document on how to do this. After creating the desired configuration with the desktop app, you will have a customization.xml, and a shorcuts.xml file in your chemaxon settings directory. These files can be used for applet customization on server side.


The chemaxon settings directory is located under your home directory. On unix based systems it is called .chemaxon, on windows systems it is simply called chemaxon.


I hope that helps, if you have further questions do not hasitate to ask.


Regards,
Istvan



Hi Istvan!


Thanks for help. This will be useful for this case.


Now I have another question about using molconvert (if you remember you advance me for using this here  - https://www.chemaxon.com/forum/ftopic7199.html). Now i have this problem - https://www.chemaxon.com/forum/ftopic7269.html. If you have any ideas please tell me.

Best regards,
Andrei.

ChemAxon 7c2d26e5cf

25-02-2011 17:11:09

Please read the proper part of Marvin manual (Installation / Marvin Beans for Java):


http://www.chemaxon.com/marvin/help/applications/install.html#install_applications


Furthermore, we  recommend to consult with the administrator of your server. Probably he can give more help why Java is not accessible in your environment.