Difference between revisions of "Jmol Processor"

From Jmol
Jump to navigation Jump to search
(Initialization from JmolWiki)
 
(DokuWiki plugin)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Running_Jmol_Sections}}
 
== Jmol in Wiki's ==
 
== Jmol in Wiki's ==
  
 
The [[Jmol Applet]] can be embedded in Wiki pages, like in HTML pages. Below are four processors for four different Wiki engines ([[MediaWiki]], MoinMoin, MoniWiki and UniWakka).
 
The [[Jmol Applet]] can be embedded in Wiki pages, like in HTML pages. Below are four processors for four different Wiki engines ([[MediaWiki]], MoinMoin, MoniWiki and UniWakka).
  
A separate mechanism for MoinMoin is described in [[MoinMoin Macros]].
+
=== Jmol in DokuWiki ===
  
=== Jmol in MediaWiki ===
+
A [http://wiki.symplus.co.jp/doku.php/computer/en/jmol_plugin DokuWiki plugin] allows to display Jmol applets with files from the 'pdb' namespace.
  
A small JmolProcessor for [[MediaWiki]] is currently under development. The development version can be tested at [http://fahwiki.fahstats.com/index.php?title=Jmol_MediaWiki_Extension Jmol MediaWiki Extension]. I have only tested it with molecular models coming from [http://folding.stanford.edu/ Folding@Home], under Windows.
+
Once the wiki is properly configured, the code for inserting Jmol looks like this:
 +
<nowiki><jmol (filename) (width) (height) (button)>
 +
  ... Jmol scripts ...
 +
</jmol></nowiki>
  
To add a Jmol applet to a [[MediaWiki]] page, just add the following:
+
It is possible to put a button so the model is loaded later, as well as to use <tt>Jmol.js</tt> functions.
  
<jmolDevelop>
+
=== Jmol in MediaWiki ===
  <contents>contents of the current.xyz file</contents>
 
  <script>script to execute</script>
 
  <name>applet name</name>
 
  <size>applet size</size>
 
  <color>applet background color</color>
 
</jmolDevelop>
 
 
 
To add buttons to send scripts to the applet, just add the following:
 
  
<jmolButton>
+
A fully functional JmolProcessor has been written for MediaWiki. Check the [[MediaWiki]] page.
  <script>script to execute</script>
+
It has been installed on this Wiki.
  <text>text of the button<text>
 
  <name>applet name</name>
 
</jmolButton>
 
  
 
=== Jmol in MoinMoin ===
 
=== Jmol in MoinMoin ===
  
 
Now we have a small JmolProcessor for MoinMoin, which works similar the JmolProcessor for MoniWiki.
 
Now we have a small JmolProcessor for MoinMoin, which works similar the JmolProcessor for MoniWiki.
# open a source-code section with three curly braces (<tt>{{{</tt>) followed by <tt>#!Jmol</tt> (note the capital J).
+
# open a source-code section with three curly braces <tt>(<nowiki>{{{</nowiki>)</tt> followed by <tt>#!Jmol</tt> (note the capital J).
 
# this and all following lines beginning with a "#" character may include the following options:
 
# this and all following lines beginning with a "#" character may include the following options:
 
:: <tt>height="pixel", width="pixel", frank="on|off", script="JmolScript"</tt>
 
:: <tt>height="pixel", width="pixel", frank="on|off", script="JmolScript"</tt>
Line 49: Line 42:
 
  ATOM      6  H  UNK    1      3.568  0.000  -0.753  1.00  0.00
 
  ATOM      6  H  UNK    1      3.568  0.000  -0.753  1.00  0.00
 
  END
 
  END
  } } }  
+
  } } }
 +
 
 +
A separate mechanism for MoinMoin is described in [[MoinMoin Macros]].
  
 
=== Jmol in MoniWiki ===
 
=== Jmol in MoniWiki ===

Latest revision as of 10:40, 26 January 2009

Running Jmol / JSmol

Jmol in Wiki's

The Jmol Applet can be embedded in Wiki pages, like in HTML pages. Below are four processors for four different Wiki engines (MediaWiki, MoinMoin, MoniWiki and UniWakka).

Jmol in DokuWiki

A DokuWiki plugin allows to display Jmol applets with files from the 'pdb' namespace.

Once the wiki is properly configured, the code for inserting Jmol looks like this:

<jmol (filename) (width) (height) (button)>
  ... Jmol scripts ...
</jmol>

It is possible to put a button so the model is loaded later, as well as to use Jmol.js functions.

Jmol in MediaWiki

A fully functional JmolProcessor has been written for MediaWiki. Check the MediaWiki page. It has been installed on this Wiki.

Jmol in MoinMoin

Now we have a small JmolProcessor for MoinMoin, which works similar the JmolProcessor for MoniWiki.

  1. open a source-code section with three curly braces ({{{) followed by #!Jmol (note the capital J).
  2. this and all following lines beginning with a "#" character may include the following options:
height="pixel", width="pixel", frank="on|off", script="JmolScript"
other options are not supported
  1. insert the source-code of the molecule
  2. close the section with three curly braces (}}})

Example:

{ { {#!Jmol frank='on'
# height="150" width="150"  
# script='cpk 0.3; wireframe 0.1'
ATOM      1  O   UNK     1       0.000   0.000   0.000  1.00  0.00
ATOM      2  H   UNK     1       0.943   0.000   0.000  1.00  0.00
ATOM      3  H   UNK     1      -0.259   0.907   0.000  1.00  0.00
ATOM      4  O   UNK     1       3.000   0.000   0.000  1.00  0.00
ATOM      5  H   UNK     1       3.568   0.000   0.753  1.00  0.00
ATOM      6  H   UNK     1       3.568   0.000  -0.753  1.00  0.00
END
} } }

A separate mechanism for MoinMoin is described in MoinMoin Macros.

Jmol in MoniWiki

A processor has been written for MoniWiki (MoniWiki is a PHP clone of the MoinMoin) to embed the JmolPlugin. It use the Processor feature of MoinMoin.

A demo is online: http://chemie.skku.ac.kr/wiki/wiki.php/JmolPlugin

Note that the Jmol Applet is slightly modified to enable Clipboard feature. You can grab a image with a 'Y' key on the applet : type 'y' on the applet and type 'D' to toggle the rendering method. --WkPark

The code that can be embedded in Wiki pages in MoniWiki looks like:

#!jmol (-)
ATOM      1  O   UNK     1       0.000   0.000   0.000  1.00  0.00
ATOM      2  H   UNK     1       0.943   0.000   0.000  1.00  0.00
ATOM      3  H   UNK     1      -0.259   0.907   0.000  1.00  0.00
ATOM      4  O   UNK     1       3.000   0.000   0.000  1.00  0.00
ATOM      5  H   UNK     1       3.568   0.000   0.753  1.00  0.00
ATOM      6  H   UNK     1       3.568   0.000  -0.753  1.00  0.00
END

Jmol in UniWakka

A processor has been written for UniWakka, a PHP-powered wiki, to embed the Jmol applet. It uses a customised actions/ feature of UniWakka and accesses data files (.mol, .pdb, whatever) stored within the UniWakka database. The demo is known to work on Mac OSX (Safari, FireFox, Camino, Explorer) and Windoze (Explorer, Opera, FireFox)

A demo is online: http://www.shef.ac.uk/chemistry/uniwakka/

See also Help On Parsers.