Overview
This module adds a display formatter for the file field type to display molecular structure files in a Jmol interactive Java or HTML5 applet. Using the applet, it is possible to interactively analyse the uploaded molecule structure in 3D.
Features
This package includes two modules: a file field formatter and example pages.
The formatter module settings include options to set:
- the size of the applet
- a number of exposed viewing styles (wireframe, sticks, ribbon, ...)
- the default view style
- a textbox for custom Jmol script input
- the page alignment of the applet
- the default measurements units (angstroms or nanometers)
When the example module is enabled three examples pages with Jmol applets are created for showcasing. The example module file jmol_examples.module under the examples subfolder includes additonal tips and instructions for:
- Creating multiple pages with a Jmol applet programatically
- Generating different content on different Jmol pages programatically
Requirements
- Modules
- External libraries
- Jmol: download Jmol from http://jmol.sourceforge.net/
Important: Jmol and JSmol
Jmol library versions up to 13.0.x only include the Java driven applet. If you use Jmol 13.0.x or an earlier version, you have to use the 7.x-1.x version of the module.
Jmol versions 13.2.x and higher include support for a JavaScript driven applet (JSmol) without the necessity to have a Java browser plugin enabled. Java applets are also still possible. If you use Jmol 13.2.x or higher, you have to use the 7.x-2.x-dev version of the module. Report any bugs in the issue queue.
Installation (7.x-1.x)
Please read the included README.txt file for full installation instructions and usage. A worked out usage example with lots of screenshots can be found here.
Basic usage
The default usage of this module would be to create a new content type with a file field or to add a file field to an existing content type and choose "Jmol applet" as formatter in the manage display section of the content type fields. Each uploaded file in this field will then be displayed as a Jmol applet.
Info for themers and developers
The jmol.module code contains a theme function called theme_jmol_formatter() that provides all the formatter settings. Themers can create a template file e.g. jmol-formatter.tpl.php to override the default theme function and take full control of the presentation of all formatter settings without modifying the module code. More info in README.txt.
Feature requests
Jmol is an extremely versatile molecular viewer which allows almost any manipulation from within the applet. The formatter currently contains a few basic but solid features for customizing the applet, but feature requests (more formatter settings) are more than welcome. I'd be happy to include them for you. Just leave a note in the issue queue.
Jmol script language links
- http://jmol.sourceforge.net/ : the Jmol homepage
- http://jmol.sourceforge.net/demo/jssample1/ : some example code and scripts to start working with the applet.
- http://chemapps.stolaf.edu/jmol/docs/ : the reference of all scripting commands in Jmol to manipulate structure viewing. These are the script commands you can type in the textbox provided by this module.
- http://jmol.sourceforge.net/jslibrary : the reference for the Jmol applet functionality to customize the web applet layout.
Project information
- Minimally maintained
Maintainers monitor issues, but fast responses are not guaranteed. - 13 sites report using this module
- Created by jvdurme on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.