Difference between revisions of "Files Description/Jmol 14"

From Jmol
Jump to navigation Jump to search
(tips to location of applet files and Jmol.js in new distributions)
(separate this legacy info from current one for Jmol 16)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''''Starting in Jmol 13.2, the file set has changed; see [[Files_Description/New]]'''''
+
'''''This is valid up to some Jmol version 14.x; for later versions, see [[Files_Description]]'''''
  
 +
'''''For Jmol versions previous to 13.2, see [[Files_Description/Jmol_12]]'''''
  
 
+
<!--This information is also included in Jmol distribution {{File|README}} file.-->
This information is also included in Jmol distribution {{File|README}} file.
 
  
 
The Jmol distribution is available for download as 3 different files:
 
The Jmol distribution is available for download as 3 different files:
Line 30: Line 30:
 
=== CHANGES.txt ===
 
=== CHANGES.txt ===
 
A list with a history of the feature additions in each version of Jmol.
 
A list with a history of the feature additions in each version of Jmol.
 
=== README-CHEMDOODLE.txt ===
 
Instructions about using the ChemDoodle alternative together with Jmol applets,
 
and about the [[License#JmolCD.js|license for ChemDoodle]] (which is different from the Jmol license).
 
  
 
<br>
 
<br>
Line 76: Line 72:
 
  jmol.sh                          // start Jmol from anywhere
 
  jmol.sh                          // start Jmol from anywhere
  
 +
<br>
 
== Files of Jmol application ==
 
== Files of Jmol application ==
 
This is used as a standalone program.
 
This is used as a standalone program.
Line 87: Line 84:
 
It operates only from the command line, designed for extracting data from a model or set of models. You are limited to commands that don't have to do with visualization: there are bonds but no "sticks", atoms but no "dots", helices but no "cartoons".
 
It operates only from the command line, designed for extracting data from a model or set of models. You are limited to commands that don't have to do with visualization: there are bonds but no "sticks", atoms but no "dots", helices but no "cartoons".
  
<br>
+
=== JmolLib.jar ===
== Files of Jmol applet ==
+
This is a library, meant to make Jmol a module or part of a bigger project, that is, to integrate Jmol viewer inside another software.
These are used inside web pages, and include:
 
* Applet files
 
* Core Javascript libraries
 
* Optional Javascript libraries
 
 
 
=== Applet files ===
 
 
 
:''Note:'' if you have downloaded Jmol version 13.2 or later, the applet files will be located in a different subfolder. See [[Files_Description/New]].
 
 
 
==== JmolApplet0.jar, JmolApplet0''(severalSuffixes)''.jar ====
 
The applet, i.e. a version of the program that will only run when embedded in a web page.
 
 
 
The applet is divided up into several pieces according to their
 
function, so that if a page does not require a component, that
 
component is not downloaded from the server.
 
It is still recommended that you put all JmolApplet0*.jar
 
files on your server even if your page does not use the capabilities
 
provided by some of the files, because the pop-up menu and Jmol console
 
both allow users to access parts of Jmol you might not have considered.
 
 
 
This split version is the one that will be used by default if you use {{File|Jmol.js}} (which is the recommended method).
 
For that, use the simplest form of jmolInitialize(), just
 
indicating the directory or folder containing the set of jar files:
 
jmolInitialize("directory-containing-jar-files")
 
for example,
 
jmolInitialize(".")  // jar files are in the same folder as the web page
 
jmolInitialize("../jmol") // jar files are in a parallel folder, named 'jmol'.
 
 
 
==== JmolAppletSigned0.jar, JmolAppletSigned0''(severalSuffixes)''.jar ====
 
An equivalent version of the applet, but this is a "signed" applet (a term in Java security language). This means it must be authorized by the web page visitor for it to run, but then it will have less security restrictions for file access. For example, it can access files on any part of the user's hard disk or from any other web server.
 
 
 
Typically users get a message asking if they want to accept the
 
"certificate" or if they "trust" the applet (''see notes below'').
 
JmolAppletSigned.jar should be used with this in mind. Other than reading
 
files, Jmol does not currently use other capabilities of signed
 
applets, such as accessing the system clipboard or writing files. Use only
 
if you know what you are doing and have considered the security issues.
 
 
 
To use this with Jmol.js, use the form:
 
jmolInitialize("directory-containing-jar-files", true)
 
or
 
jmolInitialize("directory-containing-jar-files", "JmolAppletSigned0.jar")
 
 
 
:''Notes:''
 
* The security feature requesting to trust the applet may not always be enabled on users' systems.
 
* The message requesting permission will be displayed for '''each''' of the 14 (or more) loadable files.
 
* The user may have the option to trust the applet permanently and so avoid having to give permission every time (s)he visits a page that uses Jmol.
 
 
 
==== JmolApplet.jar ====
 
This is an all-in-one or monolithic file, kept mainly for compatibility with old pages that call it explicitly.
 
This single file is equivalent to the whole set of {{File|JmolApplet0*.jar}} files, explained above.
 
The recommended procedure is not to use this monolithic file, but the split version ({{File|JmolApplet0.jar}} etc.). In particular, {{File|Jmol.js}} uses the split version by default.
 
 
 
You may wish to use this if you want to keep your website simple or you just want to upload a single jar file whenever new versions are released.
 
However, this will load Jmol slower than the split versions (described above), as all the modules (adding up to 2.4 MB), needed or not, must get loaded onto a user's machine before any structure is displayed.
 
 
 
To invoke JmolApplet.jar from Jmol.js, either:
 
 
 
a) put it in the directory containing the HTML page requiring it and
 
do not use jmolInitialize(),
 
 
 
or
 
 
 
b) identify it explicitly in jmolInitialize(), for example:
 
jmolInitialize("directory-containing-jar-files", "JmolApplet.jar")
 
 
 
==== JmolAppletSigned.jar ====
 
An equivalent version of the monolithic applet, but this is a "signed" applet (a term in Java security language). This means it must be authorized by the web page visitor for it to run, but then it will have less security restrictions for file access. For example, it can access files on any part of the user's hard disk or from any other web server.
 
 
 
Typically users get a message asking if they want to accept the
 
"certificate" or if they "trust" the applet, but this security feature is not always enabled.
 
JmolAppletSigned.jar should be used with this in mind. Other than reading
 
files, Jmol does not currently utilize other capabilities of signed
 
applets, such as accessing the System clipboard or writing files. Use only
 
if you know what you are doing and have considered the security issues.
 
 
 
To invoke JmolAppletSigned.jar from Jmol.js, use:
 
jmolInitialize("directory-containing-jar-files", "JmolAppletSigned.jar")
 
 
 
<br>
 
==== Notes ====
 
# Given the descriptions, you will realize that the distribution package contains 4 full copies of the applet (signed or unsigned, split or not).
 
  
 
<br>
 
<br>
=== Core Javascript libraries ===
+
== Files of the Jmol object ==
==== Jmol.js ====
+
=== jsmol.zip ===
The classic library, written in JavaScript language, that assists in the programming of web pages that use Jmol applet, without the need to know and write detailed JmolApplet code.
+
This file includes in compressed form all the files for using J(S)mol inside web pages, such as:
 
+
* Applet files (for the Java modality of Jmol object)
:''Note:'' if you have downloaded Jmol version 13.2 or later, this file is not included. You can either copy it from a former Jmol version or get it from the [{{SVN Trunk}}Jmol/appletweb/old/Jmol.js Jmol repository].
+
* Javascript libraries (for the definition of the Jmol object in all cases, and specifically for the HTML5 modality of Jmol object)
 
 
This library uses by default the split version of the applet (unsigned or signed).
 
 
 
Fully documented at http://jmol.org/jslibrary/
 
 
 
{{file|Jmol.js}} is phased out in Jmol v.13, in favour of the new set of object-oriented
 
JavaScript method and {{file|.js}} files (described next).
 
 
 
==== JmolApplet.js ====
 
Creates the object for a Jmol applet.
 
 
==== JmolCore.js ====
 
Contains functions that make the Jmol applets work but are not to be
 
used by the webpage author (private functions).
 
 
 
==== JmolControls.js ====
 
Support for user-interface controls like buttons, links, checkboxes, etc.
 
 
 
==== JmolApi.js ====
 
Contains the Application Programming Interface, that is, functions that may be
 
used by the webpage author to interface with the Jmol applets.
 
 
 
=== Optional Javascript libraries ===
 
 
 
==== JmolCD.js ====
 
The ChemDoodle extension: provides the means for using [http://web.chemdoodle.com/ ChemDoodle Web Components] (that uses JavaScript + HTML5 canvas or WebGL) instead of the
 
Jmol applets, for systems where Java is not available.
 
 
 
==== JmolGLmol.js ====
 
The GLmol extension: provides the means for using [http://webglmol.sourceforge.jp/index-en.html GLmol]  (that uses WebGL + JavaScript) instead of the
 
Jmol applets, for systems where Java is not available.
 
 
 
==== JmolJME.js ====
 
Provides the means for adding a [[File_formats/Chemical_Structure#JME|JME applet]] in the webpage (drawing of 2D chemical
 
formulas) and communicate with Jmol applets.
 
 
 
==== JmolJSV.js ====
 
Provides the means for adding a [http://jspecview.sourceforge.net/ JSpecView applet] (viewer for spectral data) in the webpage and communicate
 
with Jmol applets.
 
 
 
<br>
 
 
 
=== Files specific to older versions ===
 
Versions before Jmol 11.1.30 had a different setup for the split applet files:
 
 
 
==== JmolApplet(number).jar, JmolApplet_i18n.jar ====
 
The applet divided up into several pieces, hopefully for faster loading. The set of these files is equivalent to the single {{File|JmolApplet.jar}}. This split version is used by default by {{File|Jmol.js}}.
 
 
 
{{File|JmolApplet_i18n.jar}} is the localization module of the applet (i.e., translation of the interface into several languages).
 
This must accompany the {{File|JmolApplet#.jar}} set if you want the interface in a language different from English. (The language shown will depend on the operating system's language.)
 
 
 
==== JmolAppletSigned(number).jar, JmolAppletSigned_i18n.jar ====
 
The signed version of the above split applet. (See JmolAppletSigned0.jar above for description of what a "signed" applet is.)
 
 
 
<br>
 
 
 
== Accessory apps and applets ==
 
=== ChimeToJmol.jar ===
 
''Undocumented and experimental.''
 
 
 
An application to convert Chime-using html pages into pages with JmolApplets.
 
 
 
=== JSpecViewApplet, JSpecViewAppletSigned ===
 
Unsigned and signed versions of the [http://jspecview.sourceforge.net/ JSpecView applet], a viewer for spectral data that may be intercommunicated with Jmol applets.
 
(see supporting {{file|.js}} file above)
 
 
 
=== JmolSmilesApplet.jar ===
 
''This is currently not included in the distribution, but may be obtained from the development site.''
 
 
 
This is a lightweight applet, with no visible interface, that allows
 
to check SMILES strings. This is particularly useful for comparison of stereochemistry, for example from structures drawn using the [[File_formats/Coordinates#JME|JME applet]].
 
  
The same functionality is included in the regular JmolApplet.
+
For details on the files contained, their purpose and how to use them, please see [[Jmol_JavaScript_Object#Installation]]

Latest revision as of 15:14, 18 April 2024

This is valid up to some Jmol version 14.x; for later versions, see Files_Description

For Jmol versions previous to 13.2, see Files_Description/Jmol_12


The Jmol distribution is available for download as 3 different files:

  • File icon.gifjmol-x.x.x-binary.zip contains all files needed for using Jmol, compressed using the zip format.
  • File icon.gifjmol-x.x.x-binary.tar.gz contains the same files, in a tar structure and compressed using the gzip format.
  • File icon.gifjmol-x.x.x-full.tar.gz contains the full source code. This will only be useful to developers and programmers wanting to study Jmol programming design or to modify Jmol.

Following is a description of the files contained in any of the first two downloadable files.

Jmol + JSmol Documentation

Files with information

COPYRIGHT.txt

The copyright explanations regarding Jmol and its 3rd-party components.

LICENSE.txt

The GNU Lesser General Public License, under which Jmol is released.

README.txt

A general description of Jmol package and sources of information, including this file list documentation.

LEAME.txt

The Spanish version of README.txt

CHANGES.txt

A list with a history of the feature additions in each version of Jmol.


Batch and shell files

These can be used to start Jmol application from a command line and, particularly, to impose a certain combination of parameters (see command line options).

jmol

???? (Some kind of batch file)

jmol.bat

A batch file to start Jmol application under Windows.

jmol.mac

??? (Some kind of batch file)

jmol.sh

A shell script to start Jmol application under Unix-like systems, like Linux, BSD, Solaris and Cygwin for Windows.

Under Linux, there are a number of ways to start Jmol as a standalone program using the File icon.gifjmol.sh script:
(1)

sh jmol.sh                      // start Jmol under the jmol-xxx folder 
sh yourpath/jmol-xxx/jmol.sh    // start Jmol from anywhere 

(2)

chmod +x jmol.sh                // make the jmol.sh script executable 
jmol.sh                         // start Jmol inside the jmol-xxx directory, or  
yourpath/jmol-xxx/jmol.sh       // start Jmol anywhere

(3)

chmod +x jmol.sh                // make the jmol.sh script executable  
ln -s yourpath/jmol-xxx/jmol.sh /usr/local/bin/jmol.sh //create a symbolic link under /usr/local/bin

Add the following shell variable in the shell script File icon.gif$HOME/.bash_profile

export JMOL_HOME="/yourpath/jmol-xxx/"

Reboot your computer or execute

source $HOME/.bash_profile 

Then

jmol.sh                          // start Jmol anywhere 

(4) Move the File icon.gifjmol-xxx folder to File icon.gif/usr/bin/ or File icon.gif/usr/local/bin/

chmod +x jmol.sh                  // make the jmol.sh script executable 
ln -s /usr/bin/jmol-xxx/jmol.sh /usr/bin/jmol.sh          // or
ln -s /usr/bin/jmol-xxx/jmol.sh /usr/local/bin/jmol.sh    // or
ln -s /usr/local/bin/jmol-xxx/jmol.sh /usr/bin/jmol.sh    //or
ln -s /usr/local/bin/jmol-xxx/jmol.sh /usr/local/bin/jmol.sh
jmol.sh                          // start Jmol from anywhere


Files of Jmol application

This is used as a standalone program.

Jmol.jar

The application executable file (a program written in Java). This works as any other program: opens in its own window, can be resized or minimized, admits drag-and-drop of files over it, has a top menu bar, can open and save files, etc. It can be open from the command line (particulary, using the shell or batch files described above), but if Java is properly configured in your system, it's usually enough to double-click on the file (see Starting Jmol Application for more details).

JmolData.jar

This is a slimmed down version of Jmol.jar that lacks all visualization capabilities. So, it betrays the whole (classic) concept of what Jmol is, but with JmolData and some clever scripting you can get just about any information you want out of a model and output it any way you want.

It operates only from the command line, designed for extracting data from a model or set of models. You are limited to commands that don't have to do with visualization: there are bonds but no "sticks", atoms but no "dots", helices but no "cartoons".

JmolLib.jar

This is a library, meant to make Jmol a module or part of a bigger project, that is, to integrate Jmol viewer inside another software.


Files of the Jmol object

jsmol.zip

This file includes in compressed form all the files for using J(S)mol inside web pages, such as:

  • Applet files (for the Java modality of Jmol object)
  • Javascript libraries (for the definition of the Jmol object in all cases, and specifically for the HTML5 modality of Jmol object)

For details on the files contained, their purpose and how to use them, please see Jmol_JavaScript_Object#Installation