Marvin 5.3.3 templates

User 870ab5b546

24-05-2010 01:00:29

In Marvin 5.3.2, Marvin templates are kept in jchem/marvin/chemaxon/marvin/templates/ .  In Marvin 5.3.3, the templates directory (and the styles directory as well) is missing from jchem/marvin/chemaxon/marvin/ .  Is this an oversight, or are the template files stored elsewhere, or have the templates files become obsolete?

ChemAxon e500b51457

24-05-2010 08:39:53

Hello,

We have a long weekend due to our national holiday here, but my colleagues will answer you soon.

Regards,
Erika.

ChemAxon 5433b8e56b

01-06-2010 09:41:17

Hi Bob,



Apologies for the very late answer, we were lack of capacity in the
previous days.



Yes the template files have been moved into a jar files, that is located
under the jchem/marvin/sjars directory and called as templates.jar. The
style information also have been moved there into the
jchem/marvin/sjars/styles/properties.jar file.



This change was necessary because of the security warning window that
appears with java 1.6.0_19 and newer versions.


Is this an
important thing to you to access these files?



Best regards,

Istvan

ChemAxon 5433b8e56b

01-06-2010 09:43:05

Hi Bob,

Apologies for the very late answer, we were lack of capacity in the previous days.

Yes the template files have been moved into a jar files, that is located under the jchem/marvin/sjars directory and called as templates.jar. The style information also have been moved there into the jchem/marvin/sjars/styles/properties.jar file.

This change was necessary because of the security warning window that appears with java 1.6.0_19 and newer versions.


Is this an important thing to you to access these files?


Best regards,
Istvan

User 870ab5b546

01-06-2010 13:27:26

We have been putting our own templates and shortcut groups files in this directory, referring to them in our MarvinSketch startup code.  But I guess we can put them anywhere now.

ChemAxon 7c2d26e5cf

01-06-2010 22:01:31










bobgr wrote:

We have been putting our own templates and shortcut groups files in this directory, referring to them in our MarvinSketch startup code.  But I guess we can put them anywhere now.



If you have trusted sign certificate for signing jar files, the best way is the wrapping of your resources into a separate jar that you sign with your own certificate. After that, enumate this new jar in the applet classpath (archives attribute of the applet tag).


Is it a suitable solution for you?

User 870ab5b546

02-06-2010 14:11:24

We don't have a certificate.  Everything is working well, though.  I'm glad we can finally create our own generic templates toolbar.  I have never, ever liked those house-shaped pyrrole and cyclopentane rings.

ChemAxon 7c2d26e5cf

02-06-2010 16:48:14

I have fixed this issue now. I have restored the old behaviour: templates are accessible from out of the jars.


marvin/sjars/templates.jar are eliminated, marvin/chemaxon/marvin/templates directory is available again.


This modification is available in next release.

User 08353716d8

14-06-2010 17:43:10

Any idea when this release will be available? We just upgraded to 5.3.3 and are having a lot of problems getting templates working again. Example: We have MarvinSketch integrated into an online homework/testing application, and we have different situations where the generic templates toolbar is available (or not).


 


We used to make it available with the param:


<param name='ttmpls0' value='*Generic*chemaxon/marvin/templates/generic.t'>


and unavailable with:


<param name='ttmpls0' value=''>


Side note, it alwasy seemed strange to me that I had to set ttmpls0 to nothing explicitly, but if I don't, the generic templates toolbar will show (in Marvin 5.2.4).


 


Now, in 5.3.3, we get errors when the applet loads, because generic.t doesn't live where it used to. I see it noted here that these have been wrapped into a .jar file. How would I include them via applet parameters now? Generic isn't the only template we use, just the example I give here. We have other situations where we need to use rings and bicyclics, again we get errors if we try to do this ...


Is the new way of using template files documented somewhere? I searched the docs but could only find reference to the old way. Or, an eta on the new release would suffice, if I'm understanding this thread correctly, those .t files will be put back where they used to live.


any help is greatly appreciated. For now, we're reverting back to 5.2.4 as 5.3.3 is currently unusable for us ..


thanks.


Danny Holyfield


WebAssign.net

User 870ab5b546

14-06-2010 23:36:52

I recommend you use the menuconfig applet parameter to load in a MarvinSketch menu/toolbar configuration file.  Depending on the particular type of question, you can load in different configuration files.  For example,


    if (isMechanism) {
msketch_param('menuconfig', '/nosession/configMech');
} else if (isSynthesis) {
msketch_param('menuconfig', (appletName == 'synthAuthApplet'
? '/nosession/configSynthAuth' : '/nosession/configSynth'));
} else if (is3D) {
msketch_param('menuconfig', '/nosession/config3D');
} else {
msketch_param('menuconfig', '/nosession/configNormal');
}

In my example above, /nosession/ contains symlinks to the original configuration files, which must be kept at the top level of the Marvin directory.


The documentation on how to design the menu/toolbar configuration files is poor, although there is some here.  I made my desktop MarvinSketch applet look the way I wanted, then went to View -> Configurations -> Configuration Settings to export the configuration file.  


To load the generic toolbar of your choice, you can use the Javascript command,


msketch_param('ttmpls0', '*Generic*chemaxon/marvin/templates/ACEGenerics' + (is3D ? '3D.t' : '.t'));

where the text following *Generic* is the location in the Marvin directory of the file defining the toolbar.


The code above uses the marvin.js Javascript library to generate the HTML that invokes the applet.  The Marvin Javascript library is a more reliable method for generating the HTML because it already accounts for differences among browsers, so you don't need to deal with those issues yourself.

User 08353716d8

15-06-2010 05:37:34

thanks for the help, I'll give it a shot.

ChemAxon 7c2d26e5cf

15-06-2010 14:00:28

Hi Bob,


Thanks for helping Danny.

User 08353716d8

15-06-2010 14:06:57

I did want to come back and ask .. is this the best way to do this? Essentially what I'm doing here is putting the .t files back from our old marvinsketch 5.2.4 installation. This feels like hacking to me. Is there documentation somewhere on how to include template files when they're embedded in the .jar files? I'd like to be doing things the Chemaxon-recommended way ...

User 870ab5b546

15-06-2010 15:45:19

XML configuration files are definitely the best way to get your preferred Marvin menu/toolbar configurations.


As for the template files, according to Tamas,











Tamas wrote:

I have fixed this issue now. I have restored the old behaviour: templates are accessible from out of the jars.


marvin/sjars/templates.jar are eliminated, marvin/chemaxon/marvin/templates directory is available again.


This modification is available in next release.



So by restoring the .t template files, you are merely anticipating the return of those files in the next release.


BTW, this solution works in Marvin 5.2 as well.

User 08353716d8

15-06-2010 16:21:48

thanks for that. we will go that route then. is there an eta on MarvinSketch 5.3.4, Tamas?

User 08353716d8

15-06-2010 20:40:05

Well, I copied the templates files from our old 5.2.4 installation to the same location in 5.3.3, but no luck. When the applet loads, it still yields 'Uknown Error'. The stack trace is attached. Here's the source for the applet:


<applet codebase="http://www.dholyfield.dev.webassign.net/marvin-5.3.3" archive="appletlaunch.jar" code="chemaxon.marvin.applet.JMSketchLaunch" width="625" height="520" name="medit" id="medit" MAYSCRIPT>


<param name='scriptable' value='true'>
<param name='skin' value='javax.swing.plaf.metal.MetalLookAndFeel'>
<param name='autoscale' value='true'>
<param name='maxscale' value='42'>
<param name='scale' value='42'>
<param name='molbg' value='#c1d7e8'>
<param name='atomFont' value='Serif'>
<param name='undetachByX' value='false'>
<param name='menuconfig' value='http://www.dholyfield.dev.webassign.net/marvincustom/customization.xml'><param name='shortcuts' value='http://www.dholyfield.dev.webassign.net/marvincustom/shortcuts.xml'>
<param name='customizationEnabled' value='false'>
<param name='templateToolbarCustomizable' value='false'>
<param name='extraBonds' value='arom,wedge,either,any'>
<param name='atomNumbersVisible' value='false'>
<param name='bondLengthVisible' value='false'>
<param name='valenceErrorVisible' value='false'>
<param name='ezVisible' value='false'>
<param name='addRemoveHatomsEnabled' value='false'>
<param name='lonePairsAutoCalc' value='false'>
<param name='atomMappingVisible' value='true'>
<param name='lonePairsVisible' value='true'>
<param name='chiralitySupport' value='off'>
<param name='menubar' value='false'>


<param name='ttmpls0' value='*Generic*chemaxon/marvin/templates/generic.t'>
<param name='rendering' value='wireframe'>
<param name='atomSymbolsVisible' value='true'>
<param name='sketchCarbonVisibility' value='on'>
<param name='explicitH' value='true'>
<param name='implicitH' value='all'>
<strong>You must have Java and Javascript to view MarvinSketch</strong>
</applet>


 


 

User 870ab5b546

15-06-2010 22:53:10

If I am not mistaken, the XML customization file must be in the top level of the marvin/ directory, the same directory that contains marvin.jar.  From your code, it appears you have placed the XML file in a marvincustom/ directory.  If the marvincustom/ does not contain marvin.jar and the directory that contains marvin.jar does not also contain the XML configuration file, it might be the origin of your error.  But I could be wrong.


It took me a fair amount of fiddling to get all the parameters and their references to work properly.

User 08353716d8

16-06-2010 17:16:15

Well unfortunately, that doesn't seem to fix it. I moved the shortcuts and customization files into the same folder with jmarvin.jar, but I still get the error documented above. Same stack trace, etc.


 


Thanks for taking a stab though - anyone have any other ideas?


 


thanks,


Danny Holyfield


www.webassign.net

ChemAxon 7c2d26e5cf

24-06-2010 23:54:38

Do you get the same exception than earlier (NullPointerException in TempalteLibrary.a(...))?

User 870ab5b546

25-06-2010 03:28:40

You have an absolute path to the XML files in the menuconfig parameter.  Try using a relative path.  For example, for the configuration file marvincustom/myConfig.xml, use,


<param name='menuconfig' value='myConfig.xml'>

See this discussion.

User d9de9cbbdf

21-09-2011 18:47:44

I dont' know if this is the place to ask this and if it isn't then I'm sorry. I was wondering how to get molecules to look like ACS document 1996 (like in ChemDraw). I couldn't find that option in the "Load Styles" area. I would greatly appreciate the help. Thanks

ChemAxon 7c2d26e5cf

23-09-2011 12:17:36

You can choose only from these options that you can see in the Load Style menu. But you can define your own settings that you can save as a new style.

User d9de9cbbdf

23-09-2011 14:23:20

Thank you