Download this article in PDF: JavaMol.pdf / JavaMolTab1.pdf

Java Applets for Displaying 3D Molecule Structures – an Overview

 

Andreas Bohne-Lang1*, Elke Lang2                                                                            12/2004

 

1) German Cancer Research Center, Molecular Modeling, Im Neuenheimer Feld 280, D-69120 Heidelberg, Germany, a.bohne@dkfz.de

2) University of Applied Sciences Darmstadt, Information and Knowledge Management, Campus Dieburg, Max-Planck-Strasse 2, D-64807 Dieburg, Germany, lang@iuw.fh-darmstadt.de

 

 

Abstract: Nowadays, the Web is one of the most intensively used information sources for scientific and educational purposes. Unfortunately, standard web browsers are not capable of displaying 3D molecular structures embedded in web pages. Other techniques like plug-ins (e.g. Chime plug-in) show the disadvantage of being dependent on operating systems and web browsers. Java applets do not show this disadvantage - they can be run on either operating systems and web browsers. Thus they are predestinated for visualization of 3D molecular structures in web pages. This article will put a small spotlight on 14 of the most used Java applets used in Web-based applications and will stress special features of the discussed applets.

 

 

 

Key words: General Chemistry / Internet & Web-based Materials, Drugs & Pharmaceuticals, Distance Learning, Writing in Chemistry


 

 

Introduction

Visualization of three-dimensional (3D) molecular structures and their related properties is a key feature for understanding the dynamics of molecules, of chemical reactions, and the expression of macroscopic behavior determined by microscopic properties. Thus, there is a long tradition of 3D model building and 3D visualization by means of wooden or plastic models and by symbolizing 3D structures using 2D means. Especially for educational purposes, simplification and reduction are essential methods in order to get rid of complexity and of properties that do not lie within the current focus. Hence, all aspects dealing with the 3D structure have one fact in common: understanding the structure is facilitated by selectively putting the emphasis on certain structural components. Tools used for visualization should offer a broad range of structure representation features, thus offering selective perspectives on certain features.

The term ‘visualization of molecules’ can be understood in different aspects [1,2,3]. On one hand it can deal the question how a molecule is displayed: It can either be represented using a two-dimensional structure graph composed of lines on a plane layout ground, or it can be displayed by a three-dimensional model giving the user the impression of space, relationships and even interaction of structural components [4,5]. On the other hand, the focus of visualization can be put on the molecular properties that should be highlighted according to relevance. Relevant content or features could be structural components of a protein as well as interaction of a protein and its ligand, or the style of coloring the surface according to aspects like physico-chemical behavior, lipophilic or hydrophobic properties or electrostatic potential [6].

Eric Martz, a pioneer of using 3D software for teaching students, outlines in his ‘BioMolecules in the Classroom: Educational Molecular Visualization with Chime & RasMol’ [W32] how visualization of molecules can help to understand complex biochemical reactions.

Within the last years, ‘standard hardware’ has become well-suited for visualization purposes, and visualization software is no longer expensive and cumbersome to install and maintain. This opens a broad application field in realms where visualization is valuable and desired, but cannot be maintained using expensive resources.

This article shows a series of 14 visualization tools that are well-suited for educational purposes in three aspects: comfortable handling of technical aspects (no difficult software installation needed), user surfaces are suitable but simple, free access. The article mainly covers three technical aspects. The fist concerns the efforts that are needed before being able to run a certain applet for the first time. The second aspect deals with the display styles and functions offered by the tools. The third aspects is related to the features of using the mentioned applets within web pages that are programmed and/or maintained by the users themselves.  

 

 

A brief introduction to Java technology

Modern Web Browsers like Internet Explorer, Mozilla, and Opera cannot display chemical structures without using additional software. They confine themselves to layout of HTML (Hypertext Markup Language) and other text elements. Thus the user has to install additional software components for visualizing 3D molecular structures [W5]. In order to achieve graphical display of a molecule, the browser has to retrieve a MIME (Multipurpose Internet Mail Extensions) type indication [W4] from the web server together with the molecule description data. The MIME type indicates the kind of data transmitted and how data should be treated. There is a special MIME type for molecule description data as well as for movies or sounds.

 

In general, there are two different techniques with different advantages and disadvantages (Tab. 1): External helper applications and plug-ins. The group of plug-ins should be divided up into native plug-ins like Chime and the Java plug-in that is capable of executing the byte code of Java applets. In contrast to external helper applications, the byte code of Java applets and programs is independent of the operation system.

 

MDL`s Chime [W3] is one of the most often used plug-ins for web-based display of chemical structures, but Chime is not an open source project and the latest version only supports Windows. Linux users can use Windows Chime by means of the CodeWeaver cross-over plug-in[1].

 

Some words in general concerning Java: In 1995 the Internet was becoming popular as a way of moving media content - text, graphics, video - throughout a network of heterogeneous devices using HTML. Java technology had been designed for parallel applications, e.g. to move media content across networks of heterogeneous devices, but it also offered the capability to move ‘behavior’ in the form of applets along with the content. Sun’s molecule visualization applet [W20] dates of this time. When Gosling, one of Sun’s first Java developers, used this applet in a presentation for the first time, he impressed the audience as they saw a molecule rotating in the middle of a static web page. The initial idea of Java was writing programs in a programming language that can be executed on each computer – independently from the operating system. A program (compiler) translates the program code to a smaller representation, the byte code. This byte code is transmitted over the Internet and executed locally by the virtual machine that is part of the runtime environment of Java. The Java plug-in provides web browsers with the virtual machine for execution of the applet code. There are special Web security features: E.g. generally, an applet is not allowed to access data from the local hard disk of the user’s computer – it is running in a restricted environment called sandbox. Later a mechanism was developed that enables applets writing data to the local hard disk. In this case the applet needs a security certificate that ensures the trustability of the data source. MolVie uses this mechanism. Only the virtual machine that interprets the code is highly system-dependent, but meanwhile Java virtual machines are available for almost every computer system.

 

Java3D

Unfortunately, the Java3D extension [W23a] abandons independency of the operating system. This means the code cannot be executed on every computer as with normal Java classes. At the moment, these special Java3D classes are only available for Windows and Linux. A Mac version is in the beta phase. The Java3D extension has to be installed on the client computer together with the Java runtime environment. The 3D extension provides an interface to the DirectX or OpenGL graphic layer of graphics cards in order to have fast access to the graphical primitives. For a long time the main processor of a computer itself had to calculate and render 3D objects. Today a dedicated graphics processor on the graphics card does this job very fast. An extra layer (DirectX or OpenGL) has been designed and implemented as an interface to this special processor. Thus the main processor passes the description of an object to the graphics processor which renders this object. The Java3D classes offer the advantage that the programmer can easily use powerful functions to generate surfaces or other complex objects.

One of the most recent projects is JOGL (Java bindings for OpenGL) [W23b] that needs at least Java 1.4.2 and provides full access to the APIs (Application Programming Interface) in the OpenGL 1.5 specification as well as for nearly all vendor extensions.

 


 

Table 1: Advantages of different software techniques

 

Java Applet

Plug-in

External Helper Applications

Installation by user

(no)1

yes

yes

Simpleness of installation

(-)1

easy

medium

Operating system dependencies

low

high

high

Browser dependencies

low

high

no

Interaction with other software components

yes

yes

no

Execution speed

low-medium

high

high

Data to transfer

Applet code and molecule structure data

only molecule structure data

only molecule structure data

Parameter

several

several

one

Layout

Browser window

Browser window

External window

User interaction

possible

possible

possible

Typical Implementation

See Table 2

Chime[W3], canDo [W29],

Flash [W30,W31]

RasMol[7,8,W1], PyMol[W2], Swiss-PDB Viewer[9,W4]

1) Windows XP is delivered without Java, and the Java plug-in must be downloaded separately from Sun’s Java page. The installation is done just by a click.

 

A brief explanation to the criteria listed in Table 1.

‘Installation’ and ‘Simpleness of installation’ describe if the user needs to install software components separately on his computer. For a long time, web browsers were delivered with Java and later with the Java plug-in. Due to a dissent between the two companies Microsoft and Sun Inc, Microsoft’s web browser Explorer is no longer delivered including Java. ‘Operating system dependencies’ and ‘Browser dependencies’ indicate if the program can be used in all environments or not. Unfortunately the native plug-ins like Chime are highly operating-system and browser dependent. ‘Interaction with other software components’ means that data transfer to e.g. a second applet or plug-in could be established. Plug-ins can be interfaced by JavaScript from the HTML code of the web page. Animated GIF images [W6] could not be controlled by other software components. ‘Execution speed’ shows the difference in speed between two principles: As well plug-ins as external helper tools are fast as they are compiled into native code that can be directly executed. Java applets, in contrast, have to interpret the Java byte code. ‘Data to transfer’ lists the types of data needed. In contrast to plug-ins and helper tools, the execution of a Java applet requires its byte code in addition to the molecule structure file. Java applets and plug-ins accept more than one parameter, thus it is possible to set parameters in web pages or pass both a script and the molecule file to the applet. ‘Layout’ means the location where the molecule is displayed. ‘User interaction’ stresses that the user can interact with the molecule. Alternatively, animated molecules can be shown in rotation without any interaction.

 

 


A spotlight focus on the most important applets

 

Table 2 lists different properties and features of the different applets. ChemSymphony Lite and DistMol are not listed in Table 2, as ChemSymphony Lite is commercial and not longer available and DistMol is too simple.

 

Figure 1: Jmol [W13]

Jmol (Fig. 1) provides the maximum number of features. It can run Chime scripts and in general is one of the most powerful developments. Jmol supports small molecules as well as large ones. It can be divided up into one or more menu applets and one visualization applet. This feature helps in placing menu functions on suitable locations on the website.

 

 

 

 

 

Figure 2: Chemis3D [W12]

Chemis3D (Fig. 2) has a menu which is quite similar to RasMol and thus users who are used to work with RasMol will feel quite fast familiar with this tool.

 

 

 

 

 Figure 3: WebMol-Applet in stereo mode [W14]

WebMol [10,W14] (Fig 3) is primarily designed for proteins but can also display medium and small molecules. Stereo view mode is a nice feature of this applet. It runs on every Java virtual machine because it provides an interface to Java version 1.0.

 

 

 

Figure 4: Eric Harlow’s 3D Java Molecule Viewer [W16]

 

Eric’s 3D Java molecule viewer [W16] (Fig 4) is only useful for small molecules. Its advantage is its simplicity, and it runs on every Java machine. It displays only atoms by their atom symbols and the linkages between atoms.

 

 

 

Figure 5: Anton Zamov’s Java 3D Molecule Viewer [W19]

Anton Zamov’s Java 3D Molecule Viewer [W19] (Fig 5) just offers basic functions like measuring angles and distances.

 

 

 

 

Figure 6: Sun’s simple molecule viewer [W20]

Sun’s xyz applet [W20] (Fig 6) was one of the first applets displaying molecular structures. It uses an interesting trick to display the molecules: pseudo-3-dimensionality is achieved by placing only balls in z-direction from back to front one over the other. This simple trick is only useful for molecules of maximally medium size.

 

 

Figure 7: ChemSymphony

The old ChemSymphony Lite applet can still be seen on the Internet. ChemSymphony is a commercial chemistry modeling application business unit. ChemSymphony products have been sold to and used successfully by several large pharmaceutical companies. ChemSymphony was sold to Netgenics, Inc., now part of Lion Bioscience since summer 2000. A working example of ChemSymphony Lite applet can be found at [W22]. ChemSymphony Lite is restricted to displaying small molecules. Its only functionality is molecule rotation. It is only mentioned for the sake of completeness.

 

 

Figure 8: DistMol

DistMol (Fig. 8) [W21] is only suitable to display small molecules, its main function is molecule rotation. It is only mentioned for the sake of completeness.

 


 

 

Figure 9: ChemApplet [W15]

ChemApplet [W15] (Fig 9) This applet is only mentioned for the sake of completeness. Unfortunately the applet can only load the very specific csf format. It seems that the applet is not longer enhanced – the main developer page is lost.

 

 

Figure 10: JaMM [W18]

The JaMM applet [W18] (Fig 10) has the nice feature of stereo view but it is restrained by its non-standard input format.

 

 

Figure 11: MolVie[W17]

Molvie [11,W17,W25] (Fig 11) is mainly designed for protein structure display. It is available without Java3D support (Fig. 11) or, as Molvie3D (Fig 12), with Java3D support. Molvie needs Java plug-in 1.3 or newer versions. It can handle and display the protein sequence. If the applet has permission it can save molecule structures locally.

Figure 12 : MolVie3D [W25]

 

 

 

Figure 13: JMV [W24]

JMV [W24] (Fig 13) is the abbreviation for Java Molecular Viewer. It can display small molecules as well as proteins and it has all of the basic functions a molecule viewer needs.

 

 

Figure 14: PDBjViewer [W26]

PDBjViewer [12,W26] (Fig 14) is one of the most powerful resources in the field of Java3D molecule viewers.Unfortunately, this applet needs at least the Java 1.4.2 plug-in and thus it runs on very few machines. The advantage is that it can handle Rasmol scripts and the texture mapping of surfaces is quite beautiful.

 

Combining applets and plug-ins: Sting Millennium [W27] and Protein Explorer [W28] should be mentioned at this point. Both applets cannot display a molecule structure on their own (they use Chime for display purposes), but they perform powerful preprocessing of protein data. These tools could potentially be used to convert molecular data to Jmol for displaying the molecule structure; this would avoid the disadvantages of Chime or plug-ins in common.

 

Conclusion and Discussion

In general, developers of web pages should prefer Java applets rather than native browser plug-ins as Java applets are independent of the operation system of the computer. Which of the numerous Java applets should be preferred, however, is depending on the intention of the web page. Generally, Jmol can be recommended as an open-source project that includes a lot of nice features and supports many load routines for different molecular structure representation formats. Furthermore, Jmol is characterized by its closeness to Chime, as Chime scripts can be used in Jmol without any problems. Using Chime scripts, complex molecule views or animations can be programmed in Jmol. Especially for education purposes, it is important to have not only a static view of a molecule, but to be able instead to provide a dynamic animation of chemical reactions. If special features are needed, it is advisable to offer more than one applet type, like the stereo view mode of WebMol. Java3D applets have a brilliant graphical quality (see Fig 14), but at the moment applets using the Java3D extension should be classified as experimental. Incorporating this type of applets on a Web page should therefore involve the availability of an alternative standard applet.

 

Acknowledgement: We want to thank the DFG (Deutsche Forschungsgemeinschaft [German Research Society]) for funding the project: Konzeption und Entwicklung einer Web-basierten Arbeitsumgebung für glykowissenschaftliche Fragestellungen und Bereitstellung von fachbasierten Informationsangeboten. [Concept and development of a web-based workbench for glycoscience research and information services.]

 

 

References:

  1. Bohne A., Lang E., von der Lieth CW. Drugs of the Future 2000, 25, 489-500
  2. Martz E; 3D Molecular Visualization with Protein Explorer in Introduction to Bioinformatics Krawetz SA, Womble DD Eds.; Humana, 2003; chapter 32, 565-586
  3. Gasteiger J., Sadowski J, Schuur J, et al. J. Chem. Inf. Comput. Sci. 1996, 36, 1000-8
  4. Vollhardt H., Brickmann J.  Pac. Symp. Biocomput. 1995, 663-73
  5. Ihlenfeld W. J. Mol. Model. 1997, 3, 386-402
  6. Tate J Methods Biochem Anal 2003, 44, 135-158
  7. Sayle R A, Milner-White EJ Trends Biochem Sci, 1995, 20, 374
  8. Bernstein HJ Trends Biochem Sci. 2000, 25, 453-5
  9. Kaplan W, Littlejohn TG Brief Bioinform. 2001, 2, 195-7
  10. Walther D Trends Biochem. Sci. 1997, 2, 274-5
  11. Sun H, Li M, Xu Y. Comput Methods Programs Biomed. 2003, 71, 85-90.
  12. Kinoshita K, Nakamura H. Bioinformatics, 2004, 20, 1329-1330

 

 

 


Apendix A1: Further reading URLs (referenced in text with [Wxx])

 

1

Rasmol derivatives

Original

http://www.openrasmol.org/

http://www.umass.edu/microbio/Rasmol/

2

PyMol

http://pymol.sourceforge.net/

3

CHIME

http://www.mdlchime.com/chime/

4

SwissPDB Viewer

http://www.expasy.org/spdbv/

4

MIME types in chemistry

http://www.ch.ic.ac.uk/chemime/

5

List of free molecule visu-

alization programs

http://molvis.sdsc.edu/visres/molvisfw/titles.jsp

6

PDB2Multigif

http://www.dkfz-heidelberg.de/spec/pdb2mgif/

7

PDB2VRML (ex.)

http://www.pc.chemie.tu-darmstadt.de/research/vrml/pdb2vrml.html

http://www.geocities.com/gnubioq/pdb2vrml/

8

Protein Data Base

http://www.rcsb.org/pdb/

9

CML (Chemical Markup Language)

http://www.xml-cml.org

10

X3D

http://www.web3d.org/x3d/

11

Open Babel project

http://openbabel.sourceforge.net/

 

Java

12

Chemis3D

http://chemis.free.fr/mol3d/

13

Jmol

http://Jmol.sourceforge.net/

14

WebMol

http://www.cmpharm.ucsf.edu/~walther/webmol.html

15

ChemApplet

 

http://www.dkfz-heidelberg.de/spec/mol_view_java/ChemApplet/

16

3d Java Molecule Viewer

(Eric Harlow)

http://www.netbrain.com/~brain/molecule/

17

MolVie

http://www.cs.ucsb.edu/~mli/Bioinf/software/index.html

mailto:sunhd@hotmail.com

18

JaMM

http://www.iumsc.indiana.edu/JaMM_inst/JaMM_inst.html

http://www.reciprocalnet.org/common/index.html

19

Java 3D Molecule Viewer v2.0 (Anton Zamov)

http://zamov.online.fr/java.html

20

Sun’s molecule viewer (xyzApp)

http://java.sun.com/applets/jdk/1.1/demo/MoleculeViewer/example1.html

21

DisMol

http://www.openchem.org/dismol/DisMol.html

22

Chemsymphony Lite

http://java.sun.com/features/1998/05/birthday.html

http://www.chm.bris.ac.uk/chemsymphony/start_here.html

 

Java3D

23a

Java 3D API

http://java.sun.com/products/java-media/3D/demos/

23b

Java bindings for OpenGL (JOGL)

https://jogl.dev.java.net/

24

JMV

http://freshmeat.net/projects/jmv/

http://www.ks.uiuc.edu/Development/jmv/

25

MolVie3D

mailto:sunhd@hotmail.com

26

PDBjViewer

http://www.pdbj.org/PDBjViewer/

http://ef-site.protein.osaka-u.ac.jp/eF-site/

 

Preprocessing Applets (using Chime for displaying)

27

Sting Millennium

http://mirrors.rcsb.org/SMS/index_m_mirror.html

28

Protein Explorer

http://molvis.sdsc.edu/protexpl/frntdoor.htm

 

Shockwave / Flash - Viewer

29

canDo

http://www.canDomultimedia.com/medical/

30

Ebook 3D Modler

http://javalab.chem.virginia.edu/biochemebook/modeler/

31

Flash CML-Reader / CML: [W9]

http://www.galaxygoo.org/chemistry/CML_reader.htm

 

BioMolecules in the Classroom

32

Eric Martz

http://www.umass.edu/microbio/rasmol/rasclass.htm

 

 

 

 


 

Table 2 : Java Applets for displaying 3D molecular structures

 

Jmol

Chemis3D

ChemApplet

Eric

Antonc

xyzApplet

JaMM

WebMol

MoVie

MoVie3D

JMV

PDBjViewer

Runtime

Environment

1.1

 

?

?

1.0

1.1

1.1

1.2

1.0

1.3

1.3

1.3

1.4.2

Java3D (OpenGL)

no

no

no

no

no

no

no

no

no

yes

yes

yes

JavaScript

yes

?

?

no

yes

no

no

?

yes

yes

no

yes

Scripts by parameter

yes

yes

yes

no

no

no

no

yes

yes

yes

no

yes

Chime/Rasmol Scripts

Chime

no

no

no

no

no

no

no

no

no

no

Rasmol

Load formats

pdb, xyz, mol, cml, mopac, CIF and mmCIF, dalton, gammess and jaguar, and more

PDB (zipped)

csf

pdb

pdb,xyz

xyz

Own defined

(pdb planned)

pdb

pdb,cif

pdb,cif

pdb,

own defined

pdb, pdb-ml (XML version of pdb file), polygon object

Usable molecule size

small/large

small/large

small

small

small/large

small

small

small/large

large

large

small

small/large

Set background

yes

no

yes

no

no

no

yes

yes

yes

yes

planed

yes

Focus region of interest

yes

yes

yes

no

yes

no

yes

no

yes

yes

no

yes

Display modes

 

Wires, sticks,

balls & sticks, spheres, backbone

Wires, sticks, balls & Sticks,

spheres

Ball & sticks

Balls & sticks

Balls

Wires, sticks, balls & Sticks,

spheres

Lines, backbone

surface

Wires, spheres, backbone, tubes, ribbons

Wires, spheres, backbone, tubes, ribbons

Sticks, backbone,

Wires, spheres, backbone, ribbons, surface

Stereo

no

no

no

no

no

no

red/green left/right

left/right

no

no

yes

no

Surfaces

Conolly, van der Waals

no

no

no

no

no

no

Dots Conolly, van der Waals

no

no

no

yes

Measurement

Distance, angles

-

-

-

Distance, angles

-

?

Distance, angles

-

-

?

?

Special features

Multiframe archive, multiframe CML,

Open source,

 

Spining

Simple

 

 

 

Stereo view

Save molecule,

structural alignment

Save molecule,

structural alignment

Save state

Content based Surface Texturing

Can be run as standalone

yes

no

no

no

no

no

no

yes

?

?

yes

yes

Publication

 

 

 

 

 

 

 

[10]

[11]

[11]

 

[12]

Web URLs

[W13]

[W12]

[W14]

[W15]

[W20]

[W21]

[W18]

[W14]

[W17]

[W14]

[W23]

[W25]

A question mark means that no information about this point is provided.

 

 A brief explanation to Table 2: ‘Runtime environment’ indicates the version. Indication of old version numbers means the chance of running without problems. The newer the version number is, the more powerful is the functionality. ‘Java3D’ indicates if the applets use the 3D interface of modern graphics cards. ‘JavaScript’ indicates if the applet is able to import parameters from JavaScript. ‘Scripts by parameter’ means that the applet can handle scripts, and if yes, if is it possible to pass a script to the applet in addition to other parameters. ‘Chime/Rasmol Scripts’ means if the applet can interpret Chime or Rasmol scripts. As these scripts are very widespread, it is favourable if an applet can do this. Thus the webmaster can avoid reprogramming scripts if he changes from Chime to a Java applet. ‘Load formats’ describes the data formats the applet can load. The openBabel [W11] project allows to convert between the different molecule formats. Normally most applications can load PDB files. ‘Usable molecule sizes’ indicates if the applet is better for small molecules like caffeine or for proteins. ‘Set background’ indicates if the user can set the color of the background. Sometimes this is important if the user wants to take screenshots for publications. ‘Focus region of interest’ means that the user can interactively select atoms and maybe color them later. ‘Display modes’ lists the different ways an applet can display the molecules. ‘Stereo viewing’ and ‘surfaces’ are special features of applets that are only provided by few. ‘Measurement’ means if the user can measure e.g. distances of atoms or angles. ‘Special features’ lists all features that are not part of the mentioned menus. 

 

 

 

 



[1] http://www.codeweavers.com/site/products/