[E0002]
MarvinSketch and MarvinView:
Molecule Applets for the World Wide Web
Péter Csizmadia
ChemAxon Ltd., V�lyog u. 7, Budapest, H-1032 Hungary
Tel: (+36)-20-9570988, Fax: (+36)-1-3875944, E-mail: [email protected]
Received: 15 August 1999 / Uploaded: 21 August 1999
Marvin is an applet package for drawing and visualizing chemical structures and substructures. Anyone with a web browser can use Marvin, no special programs or plugins are required. MarvinSketch/AWT and MarvinView/AWT are written in Java 1.0, so they even work in older web browsers. Furthermore, Marvin has special support for future browsers that will implement Java 2. MarvinSketch/Swing and MarvinView/Swing are the modern versions of the applets, Java 2 or Java 1.1 plus Swing are required for them to work. (Swing is a library of new style GUI components.)
Marvin is loaded from the net faster than similar applets. The explanation is that Marvin is the only chemistry applet package that is modularized, extra features are external modules that are downloaded only when needed. Import/export in various file formats is an example of modularization in Marvin.
Marvin can handle molecule files in many formats including MDL mol, Compressed mol, unique SMILES, SMARTS, Sybyl mol, CML, XYZ, POV-Ray. Support for more than one file format is uncommon from applets used on the Internet, because it usually increases the time needed to download the program code. It is usually not practical to make an applet "too intelligent". In Marvin, modularization eliminates this restriction. File formats are implemented as external modules, so they do not increase the initial download time.
The Marvin applets are highly configurable and controllable via applet parameters and Java/JavaScript method calls. The appearence of structures can be controlled with parameters like magnification, atom size, bond length, and colors. The way the applets display implicit and explicit Hydrogen labels can be controlled with applet parameters and from runtime, both from JavaScript and by the user from menu. The molecule(s) the applet displays can also be set or retrieved from JavaScript, at runtime.
MarvinSketch
MarvinSketch is a tool for drawing chemical structures. It supports valence checking, query atoms and bonds, stereochemistry, and user-defined templates. On the example below, the user can select templates from four sets: "Generic", "Rings", "Amino acids", and "Polycyclics". Template sets are stored in standard SDfiles.(YOU CANNOT SEE A JAVA APPLET HERE)
A few special features are multi-level undo/redo, "visual fragment placement", easy chain drawing, branching at a single click. The applet can be displayed in a separate window that has a menu bar. It can also be used like a viewer, the viewing area can be maximized by hiding the buttons. These two features can be controlled with applet parameters, and also at runtime (try the top left buttons).A chemist can configure MarvinSketch in such a way that it will allow the users to draw structures containing only a subset of all available atom and bond types. For example, one might have an online program that predicts a chemical property for molecules that contain only C, N, and O atoms. The rest of the atoms can be disallowed by setting applet parameters. "Extra" bond types like the aromatic or the stereo bonds can also be enabled or disabled.
MarvinSketch is the ideal tool also for drawing the query structure for a database search. It supports many query atom types like "atom list", "NOT list", SMARTS query properties like H (number of hydrogens), v (valence), X (number of connections), R (rings), r (smallest ring size), A (aromatic), and a (aliphatic). It is also possible to enter any SMARTS expression to describe an atom. The web developer can decide which functions are needed to be enabled, according to the capabilities of his search engine.
MarvinView
MarvinView is a 2D/3D viewer that can display a molecule, or many molecules in a table. A molecule table may also contain GUI components: text labels, buttons, checkboxes. Checkboxes and buttons can trigger JavaScript calls from the Java applet, buttons may also trigger CGI script loading. The applet has a pop-up menu, but the user can also view a molecule in a separate window that has an ordinary menu bar. 3D structures can be rotated automatically. It can be individually specified for each molecule in the table whether it should start rotating when the applet has been loaded.(YOU CANNOT SEE A JAVA APPLET HERE)
Since Marvin can read molecule files embedded in HTML pages that has been generated by scripts, showing query results in a structure table is supported. Embedding molecule files in the HTML page is important because molecules in a database usually do not have an URL. It is also faster to download the molecule files this way because no extra network connections are needed.
An example application of MarvinSketch and MarvinView is the web interface of JChem, our chemical database engine.
References
All comments on this poster should be sent by e-mail to (mailto:[email protected]) [email protected] with E0002 as the message subject of your e-mail.