What's new in v2.0?
Version 2.0 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 output 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 v2.0, 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 v2.0 compared with
v1.4.
The memory footprint of the new v2.0 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 v2.0 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.
There are a few cases where v2.0 is incompatible with
previous versions, and where input files which work for v1.4 (and
older) are no longer valid.
The EPS format of the previous versions (v1.4 and older) was
fundamentally problematic. It was nearly identical in form with the
proper PostScript output. Although formally valid according to the
PostScript Reference Manual,
it apparently did not satisfy almost any available software.
The new EPS output mode has therefore
been completely redesigned to produce a pixel-based image file format,
containing a pixmap of the image rendered via
OpenGL.
In the current version, only PDB coordinate files are
supported.
The reason for this was that no examples of the other input
file formats could be easily obtained for testing during the
reimplementation of MolScript.
The other coordinate file formats supported in the previous versions
(v1.4 and older) have become even less important since 1993, and the
PDB format (with all its limitations and problems) is the undisputed
de facto interchange standard for biomacromolecules.
The colourdepthcue parameter in the graphics state has been
removed. Its functionality has been replaced in v2.0 by the
fog header command.
The reasons for this change were partly that the function of the old
parameter was badly designed, partly that it was difficult to
implement it in output modes other than PostScript.
In previous versions of MolScript (v1.4 and older) it was possible to
specify the output format produced by MolScript directly in the input
file, by giving a keyword encapsulated
or
raster3d
before the first plot. This possibility has been
removed. The output format must now be specified as a
command-line option.
The reason for removing this feature was that it was messy (both for
the user and for the developer of MolScript) to have two different
ways of specifying output format. Also, it was unclear how to resolve
conflicts between an explicit setting in the input file and a given
command-line option.
A new parameter bondcross has been
introduced in v2.0, which controls the size of crosses drawn for
non-bonded atoms in the bonds
command. The same behaviour as in previous versions of MolScript (v1.4
and older) can be obtained by setting the value of this parameter to 0.0.
The development of MolScript progresses at a very uneven speed. New
versions containing novel features and/or bug fixes are planned, but
the implementation of these take place whenever there is time. No
commitment as to release dates can be given.
However, the author gives the following statement of intent:
No new features will conflict with previously available
features. Later versions of MolScript will be proper supersets of
earlier versions, i.e. everything that works with one version
of MolScript will work with a later version.
Erroneous behaviour (i.e. bugs) may be changed between
versions. In version 2.0, this applies especially to the
implementation of lighting in the
Raster3D output mode, which
is suboptimal, and should be improved
in future versions.
Only in extremely well-founded cases will there be exceptions to this
(but see above). However, if any such
exceptions are introduced, these will be high-lighted in the
documentation.
The reason for giving this statement is to make it possible for other
programmers to produce software that automatically generates MolScript
input files, which will be valid also for later versions of MolScript.
Note that this policy statement does
not refer to the internal implementation details of
MolScript, nor to the details of the output file formats. For
instance, the procedure definitions in the
PostScript output file, or the
PROTO's in the VRML 2.0 output file may
very well change from one version to the next.
The MolScript software is not an API (Application
Programming Interface). The internal features of the MolScript source
code are not intended to be used as library routines in other
software.
You may modify the MolScript software, or use parts of the code for
your own programs. However, all such software is covered by the
license agreement, and so cannot be distributed to others without
express agreement with Avatar Software
AB.
Note also that there is no guarantee that the organisation of the
source code will be stable in future versions of MolScript. Any
modifications you make will very likely break in future versions of
MolScript.
- version 2.0.2:
- Per-vertex colour triangles in object files implemented for
Raster3D (v2.4b).
- Orthographic projection for Raster3D (v2.4b).
- version 2.0.1: None. Internal bug fixes only.
- version 2.0:
- Many changes; see the above lists.
- Complete source code re-write.
- version 1.4:
- An interface to Raster3D written by Ethan A. Merritt.
- Added input stream file change facility using '@'.
- Added macro facility using '$'.
- Added command-line options -s, -e and -r (for UNIX).
- Added inline-PDB feature, allowing self-contained MolScript input files.
- Added the keywords
store-matrix
and
recall-matrix
, which are used to define and use a
specific transformation matrix without having to specify it fully each time.
- Flag noframe to omit the frame around a plot.
- Zero atoms in a selection no longer gives an error, except for
position
.
- version 1.3: None. Bug fixes only.
- version 1.2:
- The keyword encapsulated now requires a specification of the
maximum extent paper area to be drawn into by the subsequent plot(s).
- The wildcards '#' (any number) and '+' (any digit) have been
added for string comparisons.
- version 1.1: None.
- 23 Jan 1998: version 2.0.2, fixes for some minor bugs: PDB file
without END record allowed (Ingo Koerndorfer), macro calls bug (Brian
Smith), 'copy... from... to' bug (Ezra Peisach), Raster3D label
problem with colourparts (Ezra Peisach), real values with leading
decimal point allowed (Joe Krahn), PostScript line crash danger (Ezra
Peisach), Raster3D object init problem (Ezra Peisach), OpenGL parse
error crash, added per-vertex triangle colours for Raster3D,
orthographic projection for Raster3D.
- 23 Dec 1997: version 2.0.1, fixes for a few minor bugs related to
memory-handling, discovered with Purify.
- Nov 1997 (started Dec 1996): version 2.0, complete rewrite in C,
use
bison
(=yacc), added external object interface, added
VRML 2.0 output, OpenGL interactive graphics, SGI, EPS, JPEG, PNG,
image file output, and numerous other additions.
- 21 Dec 1993: version 1.4, modifications for Raster3D v2.0 (by
Ethan Merritt), added store matrix commands, inline PDB feature,
noframe, input stream files, macros
- 3 Nov 1992: bug fix: ABORT changed to MABORT, problem in PCCURV
with + signs (Arne Elofsson)
- 11 Sep 1992: version 1.3, bug fix: selection in
atomradius/atomcolour (Leo Caves)
- 8 Jul 1992: added wildcards '#' (any number) and '+' (any digit)
in string comparisons to conform fully with X-PLOR
- 24 Apr 1992: version 1.2, bug fixes: aspect ratio and segment
pruning (Eric Fauman), Encapsulated Postscript (Paul McLaughlin,
Michael Sutcliffe)
- 11 Nov 1991: bug fix: output transformation matrix transposed
- 19 Apr 1991: conforms to PostScript Document Structuring
Conventions version 3.0
- 7 Apr 1991: changed wildcard character '#' to '%' (as in X-PLOR)
- 28 Feb 1991: version 1.1, first exportable version
- 30 Jan 1991: version 1.0, first decently executable version
- 6 Dec 1990: first attempts
Top page