What was new in version 2?
Version 2 of MolScript is a major new release. There are several new
output formats and several new features. In fact, it is an entirely
new program, with much expanded functionality compared to previous
versions (v1.4 and older). It is almost completely
backwards-compatible with the previous versions.
A new interactive OpenGL mode is
available on computer systems that support OpenGL. The implementation
uses the GLUT library by Mark Kilgard
for the window system interface.
The rendering is based on the same graphics objects as the other
output formats. The 3D OpenGL image is rotatable and scalable using
the mouse, and the current rotation matrix can be output for the user
to cut-and-paste into the MolScript input file. This considerably
simplifies the process of defining a good view of a molecule,
previously a cumbersome iterative process.
When an error in the input file is encountered, the OpenGL output mode
does not abort the program. Instead, the graphics objects created so
far in the script are rendered, so that the user can correct the input
file, and re-read it within the same running MolScript process. This
speeds up debugging of input scripts, and also makes it easy to test
different modifications to the graphics state parameters.
The VRML 2.0 output mode is entirely
new. VRML 2.0 is a standard for
distribution of 3D objects on the Web. It is a very good option for
publishing protein 3D structural data in carefully crafted models with
accompanying annotation. In the current version, there is support for
all graphical objects, and for making anchors (Web links) from the
graphical objects.
The VRML 2.0 specification supports dynamic behaviour, and features
based on this may be included in future versions of
MolScript. Currently, investigations are being made to test support
for dynamic behaviour in the models, such as molecular dynamics,
illustrations of enzymatic reactions, or depiction of changes in
quaternary structure.
It is now possible to create image files in the
JPEG,
PNG,
Encapsulated PostScript (EPS) and
SGI (aka RGB) formats directly from an
input file. It is no longer necessary to use screen-capture programs
or similar software to make JPEG files or other image files for use in
Web sites.
The Raster3D implementation has three major new features:
- Labels can now be output,
provided that the
GLUT library has been
installed.
- Transparency has now been
implemented.
- MolScript now gives a much higher degree of control over the
contents in the header section of the Raster3D input file. For
example, the size of the image is now determined through the
command-line option -size.
The MolAuto program is a stand-alone
program which reads a coordinate file, and produces a MolScript input
file based on what is found there. Features such as secondary
structure and ligands are identified and commands to render these are
output.
The MolAuto program considerably simplifies the process of creating
new MolScript images. The behaviour of MolAuto can be controlled to
some degree by command-line options.
An interface to graphics objects created by external programs has
been added to MolScript. The object
command reads an object file containing the specification of the
objects. The format of the object file is
straightforward, and allows points, lines, triangles and triangle
strips to be specified. This can be used for e.g. molecular
surfaces or electron density representations generated by other
software.
The appearance of the objects is determined by the same parameters as
the ordinary graphical objects in MolScript. It is also possible to
specify explicit colours in the object file. The object coordinates
may be transformed by the
view matrix specified by the most recent
transform command.
- cylinder, a new
representation for helices.
- double-helix, a
schematic representation for nucleotide chains.
- object, importing graphical
objects (lines, points, triangles) from external files.
- anchor, Web links for VRML.
- viewpoint for VRML.
- header commands, for better control of
global properties.
- residue selections:
- The options
-in
, -out
and
-log
have been added for better control of input, output
and message log files.
- The option
-raster3d
as a synonym for
-r
, and -silent
for -s
, have
been added, as more comprehensible synonyms.
- The option
-e
for the
Encapsulated PostScript (EPS) output
mode has been removed, and replaced by -eps
. This
reflects the completely new implementation of this format.
- Input lines may now be any length. The previous versions had a
limit of 80 characters, due to the limitations of standard Fortran 77
i/o.
- A single lexical item (loosely: word or string) may now be up to
2047 characters long.
- The commands in the header such as
slab and
window may now be given in any
order. Previously, there was a strict and not completely logical
ordering of these commands.
- Numerical floating-point values
(for example: 1.0) may now be given as integers also (now: 1). The
decimal point is no longer necessary.
- Double-quotes '"' are not necessary for
strings which have no blank
characters or special characters. This is useful for file names
(coordinate files, object files,...) or identifiers (atom names,
residue names, types, etc).
- Macros may now be defined in the
places in the input script file specified by the syntax. The previous
version contained a bug in this respect.
- A warning is given if the last residue in a
residue sequence
selection (
from... to...
) is not found in the
coordinate data.
The MolScript program has been completely rewritten in the C
programming language. The MolScript C source code is strict ANSI C,
and should therefore compile with any ANSI-C compliant compiler. The
previous versions (1.4 and older) were written in Fortran 77.
No static memory limits
There were many static limits on the size of molecules and the
complexity of graphical objects that could be handled in MolScript
v1.4. The cause of these limits was the lack of a dynamic-memory
mechanism in standard Fortran 77. The values of the limits could
be changed only by modifying the source code and recompiling the
program.
In version 2, there are no such limits; all memory usage is dynamic,
and the size of the application is now limited only by the physical or
virtual memory of your computer. This means that there will be no need
to recompile the program when the applications increase in size and
complexity.
Increased computational efficiency
The reimplementation has resulted in a considerably more efficient
program. Tests on an SGI machine indicate that execution of equivalent
input scripts are often more than 50 % faster with version 2 compared
with v1.4.
The memory footprint of the new version 2 is almost always much
smaller than in v1.4, since memory is dynamically allocated
only when it is actually needed by the program. In v1.4, memory
allocation had to be statically determined at compile time, and
therefore set to the maximum expected application size. This could
pose a problem on certain computer systems.
Organisation of the source code
The source code for version 2 has been organised to facilitate
implementation of new output formats. The set of routines that need to
be written for a new output format are well-defined. The routines that
create the graphics objects have been made independent of the output
routines.
Top page