Subject: CCL:Java molecule viewer

From: Eugene Leitl <[email-masked]>
Date: Wed, 7 Jul 1999 13:08:45 -0700 (PDT)

Mackey, Mark writes:

 > So, does anyone know if there is source code available for even a simple
 > molecule viewer? For portability reasons I would prefer code that works with
 > Java 1.1 or older: I've found a few molecule viewers (such as the
 > publically-released viewer from Tripos) but these all seem to require the
 > JDK 1.2 and Java3D extension.

http://www.rahul.net/pcm/dismol/DisMol.html

A freeware molecule display applet including source code 

If you have a Java-capable web browser, the DisMol applet should appear below.
If you don't, you may find this page rather boring. This is a big applet, so it may
take one or two minutes to load into your browser (sorry for the delay).
If you see a molecule below, you can try rotating the molecule in various
directions by dragging your mouse on the black background (be sure to hold down
the mouse button while you do that). See the text window for other tricks.
There are currently 2 molecules to choose from in the pulldown menu; the
second one (from the IMM web site) can be pretty slow to download (240k) and
display (several seconds to draw the entire molecule on a 300 mhz Pentium 2). If
you install this on your own server, you will need to change the urls of the files to
point to chemical files on your own server. 
I originally had an input window that allowed you to enter an arbitrary URL of a
.pdb or .xyz to display. It wasn't usefull due to security restrictions on Java
Applets. You get a security violation if you try to read a url that's not on the
server that launched the applet. 

Send suggestions, comments or questions to Peter McCluskey. or post on the
NanoCAD mailing list (send mail to [email-masked] with "subscribe
nanocad" in the body to subscribe).

DisMol evolved from Will Ware's NanoCAD code and from Roger Sayle's
RasMol code.
If you're willing to do a little work installing RasMol, you can get much better
control over how you see molecules with RasMol than with DisMol. 

Archives and precompiled executables

     Source file archives, these contain all the source files and compiled class
     files: 
         DisMol.tar.gz 
     Java source files. Most of the ones I've listed here are largely ported from
     RasMol's C code. (See also Will Ware's NanoCAD home page for other
     source files on which these depend): 
         DisMol.java - the applet 
         Element.java - standard atoms 
         PDBAtom.java - generic subclass of class atom 
         GenericGroup.java - adds some file-reading abilities to class group 
         PDBGroup.java - some code for reading .pdb files 
         XYZGroup.java - some code for reading .xyz files 
         pdbreader.java - some code for reading .pdb files 
         xyzreader.java - some code for reading .xyz files 
         MaskDesc.java 
         ResSynonym.java 
         ShadeRef.java - code borrowed from RasMol for shading, fast
         rendering of atoms, bonds