Getting Started with ChemSymphony Lite


Installing ChemSymphony

Installation requires nothing more than copying the ChemSymphony files (the java classes) to a folder which can be accessed by your web server.

You may also use the software on your own PC if you have a web browser installed. On a stand-alone machine HTML, documents are opened using a File|Open or File|Open Page option in the File menu of the browser.

Java Classes and Image Files

ChemSymphony Lite is supplied as a number of java classes (with file extension '.class') and a number of gif images. These image files are essential for the display of the applets and should be kept in the same folder as your java classes.


Writing ChemSymphony applets

Full details of using ChemSymphony are given in the ChemSymphony web site which inlcudes an on-line manual. This Quick-Start guide will show you how to begin using ChemSymphony.

An applet used in an HTML document simply makes a call to one of the Java classes in your ChemSymphony Lite folder.This controls the display in your browser. Browsers recognize the <applet></applet> tag as an instruction to make this call. In ChemSymphony this must include the path of the ChemSymphony folder and the path to the chemical structure file which is to be displayed. To display the sample structure supplied with ChemSymphony Lite copy the following code in the body of your HTML document:

<applet code=RenderBasic.class width=300 height=300 name=mod1>
<param name=model value=models/spiro.mol>
</applet>

and save the HTML document in your ChemSymphony folder.

The opening < APPLET> tag MUST include the arguments

code = AppletName.class, width = 300 and name=mod1

Parameters

The line enclosed by the applet tag is a declaration of a parameter. It is given a name ('name=.....') and a value ('value = ....'). The name specifies which parameter is being used and the value refers to the way the parameter operates. The value may be a boolean variable (on-off etc), a number coded for a specific purpose or, as in this case, a path to a file.

The parameter name is the only mandatory parameter and its value specifies the path of the structure file to be displayed.

Additional Parameters

A number of additional parameters may be used to define the appearance of the applet. Some of these are:

Parameter name Values Comment
DisplayType 0, 1, 2, 3, 4 , 5, 6 type of rendering used - balls, wireframe, ball and stick, backbone, ribbons, strands and cartoons respectively.
AtomType 0, 1, 2 labeling of atoms: name, number or both.
Hydrogen on, off (boolean) hide, show hydrogen atoms.
Bonds 0.1, 0.2,..., 1 thickness of bonds (Angstroms).
AtomsRadius 0.1, 0.2,.... 3.9, 4.0 radius of atom relative to standard covalent radius
BgColor standard colors,.("red", "blue"), standard hex RGB code (#c0c0ff) or triplet decimal value ("222 0 255") sets background color of applet.
LogoBgColor as for BgColor parameter color of ChemSymphony Lite logo ribbon.
Framed on, off (boolean) when set to "yes" sets applet in an independent frame in web page.
Menu on, off (boolean) when Framed parameter used this is used to allow drop down menus in the frames - replaces RenderControl applet.

Parameter names are cAsE inSenSitive.

The full list of parameters and their values is included in the on-line manual on the ChemSymphony home page.

The Control or Display Applet

In addition to RenderBasic you can use RenderControl to make your web page more interactive. RenderControl is an applet used in conjunction with RenderBasic and in using it you allow a user browsing your page to change rendering options and color schemes. You can also use it as a link to a document used as a help page. To add RenderControl copy the following applet text to your HTML document.

<applet code=RenderControl.class width=320 height=400 name=panel>
</applet>

Additional parameters may also be used for this applet. The most common are:

Parameter name Values Comment
bgColor As for RenderBasic applet Sets the background color. Set this to the same color as your page to make the tabbed panels stand out.
ImportMessages From e.g., value="example1" Identifies applet from which RenderControl will receive messages or data. In this example example1 is the argument name in the Renderbasic applet (above).
ExportMessagesTo e.g., value="example1" identifies the applet which will receive messages or data from RenderControl).

Using compressed java files to speed download

Included in this folder is an additional .zip file and a .cab (cabinet) file. You should leave these in compressed form in the same folder as your chemsymphony java classes. To allow (enabled) browsers to use compressed java you need to add the following to each applet:

.zip file

Add the argument archive=chemsymphony.lite.zip to the aplet tag. e.g.

<:applet code=Renderbasic.class archive=chemsymphony.lite.zip width=300 nme="model1>:

.cab file

To use this add an extra parameter to the applet, e.g.

<:param name=cabbase value=chemsymphony.lite.cab>


New developments and the ChemSymphony user group

Please consult the Cherwell Scientific web site for details of new releases and upgrades and examples

Subscribe to the ChemSymphony user group mailing list by mailing

majordomo@cherwell.com

with the message

subscribe chemsymphony-user

To purchase ChemSymphony Pro, the fully functional version of ChemSymphony then please contact us.