Difference between revisions of "CMS Using Jmol"

From Jmol
Jump to navigation Jump to search
(username removed)
(LON-CAPA)
(+WordPress and http://openochem.org/ooc/)
 
(11 intermediate revisions by 3 users not shown)
Line 2: Line 2:
  
 
This page is devoted to Content Management Systems, Learning Management Systems, Virtual Learning Environments, e-Learning Platforms..., that have been set-up to use Jmol as part of their contents.
 
This page is devoted to Content Management Systems, Learning Management Systems, Virtual Learning Environments, e-Learning Platforms..., that have been set-up to use Jmol as part of their contents.
 +
 +
== OpenOChem ==
 +
[http://openochem.org/ooc/ OpenOChem] is an advanced homework/quizzing system that plugs in existing Learning Management Systems via Learning Tools Interoperability® (LTI) specification. There is a [http://openochem.org/tsugi/store/details/jsmolmodels 3D model kit based on JSmol]
  
 
== Moodle ==
 
== Moodle ==
 +
=== The Moodle filter for Jmol ===
 +
[http://moodle.org/ Moodle] is an open-source course management system. A third-party '''Jmol filter''' (information [http://docs.moodle.org/en/Jmol_filter here] and [https://moodle.org/plugins/view/filter_jmol here]) detects links to molecular model files (.mol, .csmol, .pdb, .xyz, .cml) in Moodle documents and converts them into embedded Jmol models. Jmol models can also be added as [http://moodle.org/mod/data/view.php?d=13&rid=87 resources], or placed in searchable databases that students can edit.
 +
 +
Current version of the filter uses '''JSmol''' (the HTML5 modality, i.e. no Java) by default, unless a noncompatible system is detected. The user can also opt for JSmol-Java or JSmol-WebGL modalities.
 +
 +
An example of a model inserted in a page using this filter (Moodle v.3.5.2, Jmol Filter v.6.1):
 +
[[File:Moodle Filter.png]]
 +
 
=== Moodle sites using Jmol ===
 
=== Moodle sites using Jmol ===
[http://moodle.org/ Moodle] is an open-source course management system. A third-party '''Jmol filter''' ([http://docs.moodle.org/en/Jmol_filter info]) automatically converts links to molecular model files (.mol, .csmol, .pdb, .xyz, .cml) in Moodle documents into embedded Jmol models. Jmol models can also be added as [http://moodle.org/mod/data/view.php?d=13&rid=87 resources], or placed in searchable databases that students can edit.
 
 
 
If you know a Moodle which uses Jmol, and which is not in the list below, please add it.
 
If you know a Moodle which uses Jmol, and which is not in the list below, please add it.
 
<!--
 
<!--
Line 14: Line 23:
 
* [http://montenet.monte.nsw.edu.au/ Monte Sant' Angelo Mercy College]
 
* [http://montenet.monte.nsw.edu.au/ Monte Sant' Angelo Mercy College]
 
* [http://confchem.frostburgchemistry.org Frostburg State University]
 
* [http://confchem.frostburgchemistry.org Frostburg State University]
* [http://moodle.fp.tul.cz/course/view.php?id=208 Technical University of Liberec (in Czech)]
+
* [https://nanoed.tul.cz/course/view.php?id=86 Study (nano)materials at Technical University of Liberec (in Czech)]
  
 
=== Molecular structures in Moodle ===
 
=== Molecular structures in Moodle ===
Line 25: Line 34:
 
* How do I embed molecules into Moodle pages?
 
* How do I embed molecules into Moodle pages?
 
: First, make sure that the administrators of your Moodle site have installed the Jmol filter. Then, simply upload a <code>.pdb</code> file to your course, and make a link to it using Moodle's HTML editor.
 
: First, make sure that the administrators of your Moodle site have installed the Jmol filter. Then, simply upload a <code>.pdb</code> file to your course, and make a link to it using Moodle's HTML editor.
 +
: The link must have <code>title="Jmol"</code> for it to work properly.
 
: Note that the server must be the same for the uploaded file and the Moodle system files, since Jmol will not display remote pdb files.
 
: Note that the server must be the same for the uploaded file and the Moodle system files, since Jmol will not display remote pdb files.
 
  <a href="path/aspartic.pdb">Aspartic acid</a>
 
  <a href="path/aspartic.pdb">Aspartic acid</a>
Line 36: Line 46:
  
 
=== Internationalization ===
 
=== Internationalization ===
The Jmol filter for Moodle is being internationalized (Jan 2008) [http://code.google.com/p/google-highly-open-participation-moodle/issues/detail?id=78]
+
A project to internationalize the Jmol filter for Moodle was started on Jan 2008 [http://code.google.com/p/google-highly-open-participation-moodle/issues/detail?id=78]
  
 +
A more recent update is including localization, i.e. translated text strings for different languages.
  
 
== WebAssign ==
 
== WebAssign ==
[http://webassign.net/index.html WebAssign®] is a Course Management System offered as a service and done by North Carolina State University and Advanced Instructional Systems, Inc.  
+
[http://webassign.net/index.html WebAssign®] is a Course Management System offered as a service and done by North Carolina State University and Advanced Instructional Systems, Inc.  
 
* [http://webassign.net/info/announcements/2005_7_8.html Notice] announcing Jmol functionality.
 
* [http://webassign.net/info/announcements/2005_7_8.html Notice] announcing Jmol functionality.
 
  
 
== LON-CAPA ==
 
== LON-CAPA ==
 
[http://www.loncapa.org LON-CAPA] is a "Free Open-Source Distributed Learning Content Management and Assessment System" under continuing development at Michigan State University.  There are many exercises in the growing database of shared resources that use Jmol.  Most require an account on the system to access the exercises, but a few are published "publicly" and do not require log-in for access.  For example:
 
[http://www.loncapa.org LON-CAPA] is a "Free Open-Source Distributed Learning Content Management and Assessment System" under continuing development at Michigan State University.  There are many exercises in the growing database of shared resources that use Jmol.  Most require an account on the system to access the exercises, but a few are published "publicly" and do not require log-in for access.  For example:
* [http://loncapa10.fsu.edu/res/fsu/rlight/GEO/Polyhedra.problem a problem for lower grade science and math students][http://www.bobsseo.com .]
+
* [http://loncapa10.fsu.edu/res/fsu/rlight/GEO/Polyhedra.problem a problem for lower grade science and math students]
 
* [http://pollux.physics.fsu.edu/res/fsu/OrganicChemistryLib/Stereochemistry/ChiralConfigurationFrom3DMOLImage.problem assignment of R or S configuration]
 
* [http://pollux.physics.fsu.edu/res/fsu/OrganicChemistryLib/Stereochemistry/ChiralConfigurationFrom3DMOLImage.problem assignment of R or S configuration]
 
* [http://pollux.physics.fsu.edu/res/fsu/OrganicChemistryLib/Stereochemistry/ChiralConfigurationFrom3DMOLImage.problem structure comparison]
 
* [http://pollux.physics.fsu.edu/res/fsu/OrganicChemistryLib/Stereochemistry/ChiralConfigurationFrom3DMOLImage.problem structure comparison]
 
*[http://pollux.physics.fsu.edu/res/fsu/OrganicChemistryLib/Stereochemistry/NamingStereoisomerFrom3DMOLimage.problem naming a structure]
 
*[http://pollux.physics.fsu.edu/res/fsu/OrganicChemistryLib/Stereochemistry/NamingStereoisomerFrom3DMOLimage.problem naming a structure]
 
* [http://pollux.physics.fsu.edu/res/fsu/OrganicChemistryLib/Stereochemistry/ComparingFischerwith3DMOLimages.problem comparing a 3D structure with a Fischer projection structure]
 
* [http://pollux.physics.fsu.edu/res/fsu/OrganicChemistryLib/Stereochemistry/ComparingFischerwith3DMOLimages.problem comparing a 3D structure with a Fischer projection structure]
 +
  
 
== Drupal ==
 
== Drupal ==
 
[http://drupal.org/ Drupal] is an open source content management platform.
 
[http://drupal.org/ Drupal] is an open source content management platform.
  
;Drupal 6
+
=== Drupal Jmol ===
:Jmol has been tried and tested on the Drupal 6 platform and works as expected. A Drupal 6 module is available for download to get you started and customize your own Jmol pages in Drupal. Below is a guide on how to install the module and get Jmol working on your Drupal site
+
A Drupal 7 and 8 module is available to display uploaded molecular structure files as a Jmol applet. The module can be found at [http://drupal.org/project/jmol http://drupal.org/project/jmol].
:*Download the [http://swi-srv-01.gbiomed.kuleuven.be/service/jmol_drupal6.tar.gz Drupal 6 module] and uncompress it in your module folder so you have a module folder called '''jmol'''
 
:*Activate the module from your Drupal site by going to ''Site building > modules > Other > Jmol''
 
:*Download Jmol and place the content in the Jmol module folder so you have e.g. <modules folder>/jmol/jmol-12.2.11/
 
:*Edit the ''jmol.module'' file in the jmol module folder and adjust paths where necessary, see the comments in the file
 
:*You should then be able to see the Jmol applet at (when Clean URLs is enabled) <pre>http://example.com/jmol</pre> or when you do not have Clean URLs enabled: <pre>http://example.com/?q=jmol</pre>where you have to replace example.com with your base url
 
:*In case the link to the module goes down, here is the code for the module which contains an info file and the module itself:
 
''jmol.info'' (change 6.x to 7.x if you're using Drupal 7)
 
<pre>
 
name = Jmol
 
description = Creates a Jmol applet page
 
core = 6.x
 
package = Other
 
</pre>
 
''jmol.module''
 
<pre>
 
<?php
 
 
 
/* Originally created by Joost Van Durme, University of Leuven, Belgium /*
 
/* joost.vandurme@switch.vib-kuleuven.be */
 
 
 
/*
 
* Add Jmol.js to the html header section, adjust paths where needed
 
* Here, I have placed the jmol package folder as a subfolder of the jmol module folder
 
*/
 
  
function jmol_init() {
+
=== Drupal Molecule ===
  drupal_add_js(drupal_get_path('module', 'jmol') .'/jmol-12.2.11/Jmol.js');
+
Another Drupal module, called '''Molecule''', enables to easily integrate JSmol and JSpecView objects into Drupal sites without technical knowledge. More information at the [http://www.drupal.org/project/molecule Molecule site]. It is only development version, last updated in 2015.  
}
 
  
/*
+
The Molecule module defines three types of display options for displaying
* Menu callback entry for the Jmol page, this creates a landing URL to view the Jmol applet e.g. http://example.com/jmol
+
JCAMP-DX files:
*/
+
* Spectrum: Show the spectrum contained in the JCAMP-DX file
 +
* Molecule: Show the molecule contained in the JCAMP-DX file
 +
* Spectrum with molecule: Show both the molecule and the spectrum in the JCAMP-DX file and link them.
  
function jmol_menu() {
 
  $items['jmol'] = array(
 
  'title' => 'Jmol structure view',
 
  'page callback' => 'jmol_page',
 
  'access callback' => TRUE,
 
  'type' => MENU_CALLBACK,
 
  );
 
  return $items;
 
}
 
  
/**
+
== Mahara ==
* Page callback for Jmol page, this tells Drupal what to display on the landing page
+
The Mahara e-Portfolio system includes the
*/
+
'Mahara artefact file blocktype jmol/jsmol plugin', which provides the interactive 3D display of chemical structure files, uploaded to Mahara, using Jmol/JSmol.
 +
* [https://wiki.mahara.org/wiki/Plugins/Blocktype/Jmol Documentation]
 +
* [https://github.com/geoffrowland/mahara-artefact_file_blocktype_jmol Source code repository] (GitHub)
  
function jmol_page() {
+
== WordPress ==
  $base_url = "http://example.com/"; # change this to your base url
+
For open source content management system [https://wordpress.org/ WordPress] there is a [https://wordpress.org/plugins/jsmol2wp/ jsmol2wp plugin], that has been closed as of January 7, 2019 and is not available for download for security issue.
  $pathToJmol = $base_url.drupal_get_path("module", "jmol")."/jmol-12.2.11"; # when Clean URLs is enabled, we have to provide absolute urls for Java applets. see http://drupal.org/node/312642#comment-1053077
 
  $pathToPdb = $base_url.drupal_get_path("module", "jmol")."/1crn.pdb"; # this will load 1crn.pdb if it is placed in the jmol module folder
 
  $initCommand = 'spacefill off;wireframe off;backbone off;trace on;';
 
  $output  = '<script type="text/javascript">';
 
  $output .= 'jmolInitialize("'.$pathToJmol.'");';
 
  $output .= 'jmolApplet(400, "load '.$pathToPdb.';'.$initCommand.'");';
 
  $output .= 'jmolBr();';
 
  $output .= 'jmolHtml("Style ");';
 
  $output .= 'jmolRadioGroup([["'.$initCommand.'", "cartoon","checked"],["select all;spacefill off;trace off;backbone off;wireframe on;", "wireframe"],["select all;spacefill off;trace off;wireframe off;backbone on", "C-alpha trace"]]);';
 
  $output .= '</script>';
 
  return $output;
 
}
 
?>
 
</pre>
 
  
;Drupal 7
 
:Download the [http://swi-srv-01.gbiomed.kuleuven.be/service/jmol_drupal7.tar.gz Drupal 7 module] and uncompress it in your module folder so you have a module folder called '''jmol'''. I just changed the jmol.info file to set Drupal 7 version compatibility. The rest is the same as the guide above for Drupal 6.
 
  
 
== Others ==
 
== Others ==
 
...?
 
...?

Latest revision as of 17:59, 7 February 2021

Jmol / JSmol Applications

This page is devoted to Content Management Systems, Learning Management Systems, Virtual Learning Environments, e-Learning Platforms..., that have been set-up to use Jmol as part of their contents.

OpenOChem

OpenOChem is an advanced homework/quizzing system that plugs in existing Learning Management Systems via Learning Tools Interoperability® (LTI) specification. There is a 3D model kit based on JSmol

Moodle

The Moodle filter for Jmol

Moodle is an open-source course management system. A third-party Jmol filter (information here and here) detects links to molecular model files (.mol, .csmol, .pdb, .xyz, .cml) in Moodle documents and converts them into embedded Jmol models. Jmol models can also be added as resources, or placed in searchable databases that students can edit.

Current version of the filter uses JSmol (the HTML5 modality, i.e. no Java) by default, unless a noncompatible system is detected. The user can also opt for JSmol-Java or JSmol-WebGL modalities.

An example of a model inserted in a page using this filter (Moodle v.3.5.2, Jmol Filter v.6.1): Moodle Filter.png

Moodle sites using Jmol

If you know a Moodle which uses Jmol, and which is not in the list below, please add it.

Molecular structures in Moodle

  • How does the Jmol filter work?
Like the other text filters in Moodle, the Jmol filter expands a simple, shorthand code typed by an author into more complex code the browser can display. Specifically, this filter removes a link to a molecular file (with recognized file extension) and inserts a JmolApplet that loads the model. It can optionally insert controls too (e.g. for changing the rendering style).
  • How do I embed molecules into Moodle pages?
First, make sure that the administrators of your Moodle site have installed the Jmol filter. Then, simply upload a .pdb file to your course, and make a link to it using Moodle's HTML editor.
The link must have title="Jmol" for it to work properly.
Note that the server must be the same for the uploaded file and the Moodle system files, since Jmol will not display remote pdb files.
<a href="path/aspartic.pdb">Aspartic acid</a>
The default size of the display is 350 pixels. You can set the size of the display to n pixels by appending ?s=n to the URL. For example:
<a href="path/aspartic.pdb?s=200">Aspartic acid</a>
You can turn the default controls off by appending ?c=0 to the URL. If you combine this with the sizing option, separate the parameters with an ampersand (&).
<a href="path/aspartic.pdb?s=200&c=0">Aspartic acid</a>
For even greater control, pass a Jmol script to the view by typing JMOLSCRIPT{} after the link. The script goes between the braces.
For example, to set the background to white, zoom in to 150%, and spin the molecule around its x and y axes, you could type:
<a href="path/aspartic.pdb?s=200&c=0">Aspartic acid</a>JMOLSCRIPT{color background white; zoom 150; set spin x 10; set spin y 10; spin;}

Internationalization

A project to internationalize the Jmol filter for Moodle was started on Jan 2008 [1]

A more recent update is including localization, i.e. translated text strings for different languages.

WebAssign

WebAssign® is a Course Management System offered as a service and done by North Carolina State University and Advanced Instructional Systems, Inc.

  • Notice announcing Jmol functionality.

LON-CAPA

LON-CAPA is a "Free Open-Source Distributed Learning Content Management and Assessment System" under continuing development at Michigan State University. There are many exercises in the growing database of shared resources that use Jmol. Most require an account on the system to access the exercises, but a few are published "publicly" and do not require log-in for access. For example:


Drupal

Drupal is an open source content management platform.

Drupal Jmol

A Drupal 7 and 8 module is available to display uploaded molecular structure files as a Jmol applet. The module can be found at http://drupal.org/project/jmol.

Drupal Molecule

Another Drupal module, called Molecule, enables to easily integrate JSmol and JSpecView objects into Drupal sites without technical knowledge. More information at the Molecule site. It is only development version, last updated in 2015.

The Molecule module defines three types of display options for displaying JCAMP-DX files:

  • Spectrum: Show the spectrum contained in the JCAMP-DX file
  • Molecule: Show the molecule contained in the JCAMP-DX file
  • Spectrum with molecule: Show both the molecule and the spectrum in the JCAMP-DX file and link them.


Mahara

The Mahara e-Portfolio system includes the 'Mahara artefact file blocktype jmol/jsmol plugin', which provides the interactive 3D display of chemical structure files, uploaded to Mahara, using Jmol/JSmol.

WordPress

For open source content management system WordPress there is a jsmol2wp plugin, that has been closed as of January 7, 2019 and is not available for download for security issue.


Others

...?