Marvin 5.3.4 configuration

User 870ab5b546

22-06-2010 14:57:27

When I switch from Marvin 5.3.3 to Marvin 5.3.4, my configuration files stop working.  See the two screen shots.


My configuration file configurationMech.xml reads as follows:


<?xml version="1.0" encoding="UTF-8"?>
<customization active="classic">
<scheme id="classic" largeIcons="true">
<remove path="toolbar/chemical"/>
<remove path="toolbar/config3_1"/>
<remove path="toolbar/config3_2"/>
<remove path="toolbar/config3_3"/>
<remove path="toolbar/config3_4"/>
<toolbar id="CustomToolbar-0" anchor="north" row="1" index="0">
<item id="selectMode"/>
<item id="eraseMode"/>
<item id="cut"/>
<item id="copy"/>
<item id="paste"/>
<separator id="sep-0"/>
<item id="zoomIn"/>
<item id="zoomAll"/>
<item id="zoomOut"/>
<separator id="sep-1"/>
<item id="undo"/>
<item id="redo"/>
</toolbar>
<toolbar id="CustomToolbar-1" anchor="north" row="2" index="0">
<item id="increaseCharge"/>
<item id="decreaseCharge"/>
<item id="radicalGroup"/>
<separator id="sep-2"/>
<item id="atom.H"/>
<item id="atom.C"/>
<item id="atom.N"/>
<item id="atom.O"/>
<item id="atom.S"/>
<item id="atom.Cl"/>
<item id="atom.Br"/>
<item id="atom.I"/>
<item id="more"/>
<item id="atom.P"/>
<item id="atom.F"/>
</toolbar>
<toolbar id="CustomToolbar-2" anchor="north" row="3" index="0">
<item id="bond.single"/>
<item id="bond.singleDown"/>
<item id="bond.singleUp"/>
<item id="bond.singleEither"/>
<separator id="sep-3"/>
<item id="insertChain"/>
<separator id="sep-4"/>
<item id="insertElectronFlow2"/>
<item id="insertElectronFlow"/>
<item id="insertRectangle"/>
<item id="insertArrow"/>
<item id="insertTwoHeadedArrow"/>
</toolbar>
<modify path="toolbar/mytemplates" row="3" index="1"/>
<remove path="menubar/atom-menu/atomRgroup"/>
<remove path="menubar/atom-menu/group-menu"/>
<remove path="menubar/atom-menu/atomLinkNode"/>
<remove path="menubar/atom-menu/sep-1"/>
<remove path="menubar/atom-menu/branchAtom"/>
<remove path="menubar/structure-menu/structure-add-menu/setAbsoluteStereo"/>
<remove path="popup/atom/atomRgroup"/>
<remove path="popup/atom/atomLinkNode"/>
<remove path="popup/atom/branchAtom"/>
<remove path="popup/atom/structure-add-menu/setAbsoluteStereo"/>
<remove path="menubar/atom-menu/radical-menu/atomRadical.rad2"/>
<remove path="menubar/atom-menu/radical-menu/atomRadical.rad2triplet"/>
<remove path="menubar/atom-menu/radical-menu/atomRadical.rad3"/>
<remove path="menubar/atom-menu/radical-menu/atomRadical.rad3doublet"/>
<remove path="menubar/atom-menu/radical-menu/atomRadical.rad3quartet"/>
<remove path="menubar/insert-menu/insert-arrow-menu/reactionArrow0"/>
<remove path="menubar/insert-menu/insert-arrow-menu/reactionArrow2"/>
<remove path="menubar/insert-menu/insert-arrow-menu/arrow-sep1"/>
<remove path="menubar/insert-menu/insert-arrow-menu/reactionArrow1"/>
<remove path="menubar/insert-menu/insert-arrow-menu/reactionArrow3"/>
<remove path="menubar/insert-menu/insert-arrow-menu/arrow-sep2"/>
<remove path="menubar/edit-menu/sourcename"/>
</scheme>
</customization>

I call the configuration file as follows:

    msketch_param('menuconfig', '/nosession/config'
+ (appletName == 'synthAuthApplet' ? 'SynthAuth'
: isSynthesis ? 'Synth'
: isMechanism ? 'Mech'
: is3D ? '3D'
: 'Normal'));

/nosession/configMech is a symlink to marvin/configurationMech.xml.  I have confirmed that the configuration file is in the marvin/ directory for both Marvin 5.3.3 and Marvin 5.3.4.  I have switched back and forth between Marvin 5.3.3 and 5.3.4 several times, and the behavior described above is reproducible.  Any idea why the configuration files are no longer working?

ChemAxon 5433b8e56b

23-06-2010 16:32:33

Hi Bob,


i have tried to reproduce the problem but i did not able to reproduce it.


I have one question and a guess. Is the nosession directory in the applet codebase or not?


If the nosession dir is not contained in the applet codebase, then you can refer to it by defining the exact url of the file (e.g.: http://mydomian.com/nosession/configMech) or you can use the path relative to the applet codebase (e.g.: ../nosession/configMech). According to my tests with the configuration you have given, i can simply put the config file somwhere in the server, and it is not required to place it into the applet codebase, but i have to specify its path relative to the codebase or with a fully qualified url.


If this is not the case, i can really appreciate a full javascript code snippet which you are using to add the applet to the page with marvin.js functions.


Best regards,
Istvan

User 870ab5b546

23-06-2010 16:41:26

If you go to http://epoch.uky.edu:9080/epoch-plugin/public/mechmarvin.jsp, you will see the page where the configuration file is not loaded properly.  I have set it now to load Marvin 5.3.4.


You can use the Web Inspector to access marvinStart.js, which contains the Javascript commands that load the applet.


The problem is not the call to /nosession/.  We use /nosession in two calls:


msketch_begin('/nosession/marvin', panelWidth, panelHeight);
msketch_param('menuconfig', '/nosession/config'
+ (appletName == 'synthAuthApplet' ? 'SynthAuth'
: isSynthesis ? 'Synth'
: isMechanism ? 'Mech'
: is3D ? '3D'
: 'Normal'));

If there were a problem with accessing /nosession, we wouldn't be able to load marvin at all.


Our /nosession directory contains:


-rw-rw-r-- 1 raphael aceorg 5624 2010-04-14 19:44 about.html
lrwxrwxrwx 1 raphael aceorg 49 2010-06-03 09:25 api -> /home/aceorg/aceorg/jchemDEV-2.3/doc/dev/java/api
lrwxrwxrwx 1 raphael aceorg 26 2010-05-18 15:09 config3D -> marvin/configuration3D.xml
lrwxrwxrwx 1 raphael aceorg 28 2010-05-18 15:10 configMech -> marvin/configurationMech.xml
lrwxrwxrwx 1 raphael aceorg 30 2010-05-18 15:10 configNormal -> marvin/configurationNormal.xml
lrwxrwxrwx 1 raphael aceorg 29 2010-05-18 15:10 configSynth -> marvin/configurationSynth.xml
lrwxrwxrwx 1 raphael aceorg 33 2010-05-18 15:10 configSynthAuth -> marvin/configurationSynthAuth.xml
lrwxrwxrwx 1 raphael aceorg 24 2010-05-25 16:57 jmol -> /home/aceorg/aceorg/jmol
lrwxrwxrwx 1 raphael aceorg 25 2010-05-25 16:43 lewis -> /home/aceorg/aceorg/lewis
drwxrwsr-x 3 raphael aceorg 4096 2010-04-14 19:44 manual
lrwxrwxrwx 1 bob aceorg 11 2010-06-23 12:34 marvin -> marvin5.3.4
lrwxrwxrwx 1 bob aceorg 37 2010-06-17 11:34 marvin5.2.5 -> /home/aceorg/aceorg/jchem5.2.5/marvin
lrwxrwxrwx 1 raphael aceorg 37 2010-05-18 15:18 marvin5.2.6 -> /home/aceorg/aceorg/jchem5.2.6/marvin
lrwxrwxrwx 1 raphael aceorg 37 2010-05-18 15:18 marvin5.3.3 -> /home/aceorg/aceorg/jchem5.3.3/marvin
lrwxrwxrwx 1 bob aceorg 37 2010-06-17 11:08 marvin5.3.4 -> /home/aceorg/aceorg/jchem5.3.4/marvin
-rw-rw-r-- 1 raphael aceorg 2476 2010-04-14 19:44 testLC.jsp

I repeat: If I change /nosession/marvin to point to marvin5.2.6 instead of marvin5.3.4, everything works fine.

ChemAxon 5433b8e56b

23-06-2010 17:28:55

I don't really know why it has worked with 5.2.6 and why it isn't working with 5.3.4 but.


In the first line, where you call msketch_begin, you can use relative or absolute path to define the codebase. In this case you are using an absolute path, which means, the path will be relative to the document root of the server. (AFAIK it is called as docBase in Tomcat).


While you are setting the menuconfig param, you have to use relative path from the codebase. Which is in this case the following, as i assume.



msketch_param('menuconfig', '../config'
+ (appletName == 'synthAuthApplet' ? 'SynthAuth'
: isSynthesis ? 'Synth'
: isMechanism ? 'Mech'
: is3D ? '3D'
: 'Normal'));


Would you please check it if it is working or not? If not, then the only thing that i can imagine for now is that, the configuration files are not included in the marvin5.3.4 directory.


If it is not working universally, the i will create the absolutely same structure and check it again in the evening.


 

User 870ab5b546

23-06-2010 17:43:45

Switching to the relative path into the Marvin directory works for both Marvin 5.3.4 and Marvin 5.2.6.  It also means we no longer need to maintain symlinks to the configuration files in /nosession.  Thanks.

ChemAxon 5433b8e56b

23-06-2010 21:51:43

I'm glad to hear this. I hope the other problems will be solved as well in the near future.