Jmol Developer's Guide


Table of Contents

1. Building Jmol
Compiling with different JVM's
Compiling with Java 1.2
Compiling with Java 1.3/1.4
2. Running Jmol
3. Coding Standard
4. Making a release
Testing before release
5. Packaging

Chapter 1. Building Jmol

Prerequisites:

The Jmol source code can be either downloaded (see SourceForge project files) or checked out from the CVS repository (see SourceForge CVS access).

Once you have all the prerequisites, Jmol can be built from the top source directory with the following command:

On Unix,

        /home/user/programming/Jmol> ant -Ddocbook.dir=/home/user/programming/docbook-xsl
      

On Windows,

        h:\programming\Jmol> ant -Ddocbook.dir=h:\programming\docbook-xsl
      

where docbook.dir is set equal to the absolute path of the DocBook XSL.

Compiling with different JVM's

Compiling with Java 1.2

The applet needs to be compiled with javac 1.2, to be compatible with most browsers. This can be done by doing:

            h:\programming\Jmol> setenv JAVA_HOME /path/to/java1.2
            h:\programming\Jmol> ant -Dbuild.compiler=classic
          

Compiling with Java 1.3/1.4

The application can best be compiled with javac 1.3/1.4. This can be done by doing:

            h:\programming\Jmol> setenv JAVA_HOME /path/to/java1.4
            h:\programming\Jmol> ant -Dbuild.compiler=javac1.4
          

And similar for javac1.3.

Chapter 2. Running Jmol

On Unix, the development version of Jmol is run by simply executing the jmol script in the Jmol development directory.

On Windows, the environment variable JMOL_HOME must be set to the development directory, and then the jmol.bat script can be executed. For example:

        H:\programming\Jmol> set JMOL_HOME=h:\programming\Jmol
        H:\programming\Jmol> jmol.bat
      

Chapter 3. Coding Standard

Jmol source code should be written in a style which adheres to "The Elements of Java Style" by Vermeulen, et al.

Chapter 4. Making a release

Table of Contents

Testing before release

Making releases is currently one of the core responsibilities of the project leader. A release primarily consists of the .zip and .tar.gz distributions. Binary packages are not part of the Jmol release, but the release manager will inform the packagers in time to make binary packages.

A Jmol release consists of both the application and the applet. Both must work as expected.

Testing before release

In the samples/ directory a number of test files are located for the input filters. All files in that directory must be checked to be readable before every release.

The following table names all files, the reader classes which should read it, and the Extra windows that should be available.

filename

reader

extra

1crn.pdb

PDBReader

4-cyanopheylnitrene-Benzazirine-TS.g94.out

Gaussian94Reader

Vibrate

ammonia.adf.out

ADFReader

Animate, Vibrate

azt.xyz

XYZReader

bulk_Si.in

ABINITReader

Crystal

caffeine.xyz

XYZReader

CdSe_nanocrystal.xyz

XYZReader

ch3oh_ace.out

Aces2Reader

Vibrate

ch3oh_g94.out

Gaussian94Reader

Animate, Vibrate

ch3oh_gam.out

GamessReader

Vibrate

ch4-opt.out

JaguarReader

Animate

cholesterol.xyz

XYZReader

Cl2O.log

GamessReader

Animate

conformeren.cml

CMLReader

Animate, Graph

cs2.xyz

XYZReader

cyclohexane_chair.xyz

XYZReader

cyclohexane_movie.xyz

XYZReader

Animate

ddt.xyz

XYZReader

diels-alder_movie.xyz

XYZReader

Animate

dna.xyz

XYZReader

estron.cml

CMLReader

Crystal

ethanol.xyz

XYZReader

ethene.mm1gp

ChemicalMMReader

frame_1.res

ShelXReader

Crystal

g98.out

Gaussian98Reader

Animate, Vibrate

glycine-crystal.cml

CMLReader

HfO2_mol_opt.in

ABINITReader

Crystal

HfO2_on_Si_relax.in

ABINITReader

Crystal

met-enkaphalin_movie.xyz

XYZReader

Animate

methanol1.cml

CMLReader

methanol2.cml

CMLReader

pdhch3.in

Jaguar Input is not yet supported

phenol-without-para-G.g98.out

Gaussian98Reader

Animate, Vibrate

phenylnitrene.g92.out

Gaussian92Reader

Vibrate

phenylnitrene.g94.out

Gaussian94Reader

slab_7Si_3Vac_2x.in

ABINITReader

Crystal

slab_7Si_3Vac_2x_relax_2x1.out

ABINITReader

Crystal, Animate, Graph

SN1_reaction.cml

CMLReader

Animate

SN1_reaction.xyz

XYZReader

Animate

SN2_reaction.xyz

XYZReader

Animate

t54.in

ABINITReader

Crystal

taxol.xyz

XYZReader

test.mol

MdlReader

tms.log

Gaussian94Reader

Animate, Chemical Shift

toluene.pdb

PDBReader

viagra.xyz

XYZReader

zeolite_AFl.out

ABINITReader

Crystal, Graph, Animate

zoloft.xyz

XYZReader

Chapter 5. Packaging

Distribution packages will be made for any platform for which a developer promises to provide support. File used to create packages should be commited to CVS under the Jmol/packaging directory. Currently the following packages are available:

  • RPM (by Bradley Smith)

  • Debian (by Egon Willighagen)

  • MacOS (by Dan Gezelter)