molscript
) should be directly
available as a command, that is, it should be located in your path. To
test this, try the command:
% molscript -h
If the program does not seem available, ask your system administrator or
whoever installed it.
By default, MolScript reads from the stdin
(standard
input) and writes to stdout
(standard output), while
execution messages and error messages are output to
stdout
(standard output). For example, to produce a
PostScript file, give the
command:
% molscript -ps < input.file > output.ps
The interactive OpenGL graphics output mode produces no output, so there is no need specify an output file:
% molscript -gl < input.file
The best way to use the
interactive OpenGL graphics output
mode is to use an explicitly named input file (using the
-in
command-line option). This
allows re-reading the input file after the user has modified it with a
text editor, which speeds up preparation of input files. See the
documentation on the mouse button
functions.
% molscript -gl -in input.file
If you have no input file to begin with, use the MolAuto program to make a good first-approximation input file directly from the PDB coordinate file. This program can also be used in a pipe with MolScript itself for quick visualization of PDB files using the interactive OpenGL graphics mode:
% molauto protein.pdb | molscript -gl
A VRML 2.0 file can be created quickly with MolAuto:
% molauto protein.pdb | molscript -vrml
The MolScript program currently does not use any environment variables.
Note that in previous versions of MolScript (v1.4 and older) it was possible to specify the output format by giving a keyword in the input file. This is no longer possible.
command-line option | action |
---|---|
-ps
-postscript
|
Chooses the PostScript output mode. This is the default mode, so these options are actually rather useless. |
-r [alias]
-raster3d [alias]
|
Choose the
Raster3D output mode. The optional
aliasing parameter controls the aliasing scheme: 1 = no antialiasing,
2 = compute 2x2 pixels for each pixel output, 3 = compute 3x3 pixels
for 2x2 pixels output. The default value is 3. The file produced is
suitable as input for the render program in the
Raster3D package.
|
-vrml |
Choose the VRML 2.0 output mode. |
-gl
-opengl
|
Choose the OpenGL interactive graphics output mode. This may or may not be available in your executable, depending on whether your installation includes the OpenGL implementation or not. |
-eps [scale] |
Choose the Encapsulated PostScript (EPS) image file output mode. The optional scaling parameter value affects the conversion of the OpenGL rendering image size in pixels to to the PostScript default units. The default value is 1.0. Any positive, non-zero value is valid. This mode is available only if the OpenGL mode is. |
-epsbw [scale] |
The same as the -eps option, except that a
black-and-white image is produced, by interpreting the pixel colour
values in the OpenGL rendering image as luminance values. This mode is
available only if the OpenGL mode is.
|
-sgi
-rgb
|
Choose the SGI (aka RGB) image file output mode. This mode is available only if the OpenGL mode is. |
-jpeg [quality] |
Choose the JPEG image file output mode. The optional quality parameter can be any integer in the range 1-100 inclusive, and controls the degree of compression used for the image: lower values use more compression, giving lower image quality. The default value is 90. This mode is available only if the OpenGL mode is. |
-png [compress] |
Choose the
PNG image file output mode. The optional
compression parameter can be one of the literal values
default , speed , size or
none . This controls the compression algorithm used by the
PNG library routines when creating the image file. The default value
is default (surprise!). This mode is available only if
the OpenGL mode is.
|
-accum number |
Use the accumulation buffer for OpenGL rendering, i.e. for the OpenGL interactive graphics mode and all image file output modes. The image is rendered multiple times (with a slight shift each time), summed and averaged, thus producing an antialiased image. The quality improves with the number, but so does the execution time. The parameter value can be any positive, non-zero integer, but is actually always set to the immediately higher value in this list: 2, 3, 4, 8, 15, 24 or 66. |
-pretty |
The output file is formatted (indented) to increase the readability. This is useful when the file is to be modified manually. Currently this affects only the VRML 2.0 output mode. |
-s
-silent
|
Do not produce any run-time diagnostic messages. This may be useful when no output except the graphics is wanted, and the input file needs no debugging. |
-out filename |
The output from the program is written to a file with the given name,
instead of to stdout (standard output).
|
-in filename |
The input file (script) is read from the file with the given name,
instead of from stdin (standard input). This is
particularly useful with the interactive
OpenGL output mode.
|
-log filename |
The run-time diagnostics are written to a file with the given name,
instead of to stderr (standard error output).
|
-tmp filename |
Use a temporary scratch file with the given name. The execution
process must be allowed to create, write to, read from, and delete the
file. The default is a temporary file determined by the system, as
defined by the ANSI C library standard for the tmpfile
routine. Currently, this is relevant only for the
Raster3D output mode.
|
-h |
Output a listing of the available command-line options to
stderr (standard error output). No other output is
produced.
|
! --- This is a minimal MolScript input file; this line is a comment. plot read mol "protein.pdb"; ! Read the coordinate file. transform atom * ! Xform all atoms so that the centre- by centre position atom *; ! of-gravity is placed at the origin. trace amino-acids; ! Output a CA trace of the chain. end_plot ! --- Here the minimal input file ends.
To prepare a good image of a molecule, the main problem is to find a good view. It is usually not a good idea to work on details such as label positions or colours unless at least an approximate view has been found. With the interactive OpenGL output mode, it is fairly easy to find a good view, which is output from the program, and then incorporated into the input file by the user.
If you do not have the OpenGL implementation available, you must adopt
an iterative method instead: Use a
PostScript display program such
as xpsview
or ghostview
to view the output
from the MolScript program. Then edit the input file with an ordinary
text file editor, changing the transformation by adding rotations
and/or translations. Note that any number of rotations or translations
may be used in the transform
command. Re-run MolScript, and view the results. Continue until a good
view has been found.
Jane Richardson has listed some general points on the design of schematic images of proteins (Richardson 1985). These guidelines are still perfectly valid, although they were formulated for hand-drawn images. Look at her drawings for inspiration and guidance (Richardson 1981, 1985).
An important point to make is that 90 degree views of a structure, if carefully selected, can be very instructive. In fact, such views can often bring home the message better than stereo plots. With MolScript, 90 degree views are ridiculously easy to prepare. Stereo plots, however, are trickier to make.
When displaying superpositions of structures (for instance, sets of structures derived from NMR data), then the store-matrix and recall-matrix commands must be used, rather than the ordinary ways of getting a good view. The reason is that if the position command is used, this will give a slightly different transformation for different coordinate sets, thus destroying the least-squares fit that (almost certainly) has been done previously using some other program. In the display of superimposed NMR structures, this will give plots where it looks as if the structures superimpose better at the center of the plot than they actually do. By using the command store-matrix after the first coordinate set has been transformed, and then recall-matrix for the other coordinate sets, you ensure that the original least-squares fit is kept intact.
The reason is that the sulfur atoms in disulfide bonds typically have a covalent bond distance of about 2.0-2.1 Ångström, while the default value for the bonddistance parameter is only 1.9 Ångström. So in order to get a bond between two sulfur atoms, this parameter has to be increased to, say, 2.5. Note that this may cause spurious bonds in other parts of your structure, so reset the parameter back to its lower value once the disulfide bonds have been created.
bonds in amino-acids; set bonddistance 2.5; bonds atom SG; set bonddistance 1.9;Why is the default value of the bonddistance parameter so low? It is a compromise value intended to avoid problems of spurious bonds in e.g.the five-membered rings of heme groups, while giving reasonable results for other moieties.
helix
and
strand
) will be
coloured according to the current residue colours. These are all white
by default. They can be changed with the
residuecolour
parameter.
Solution 1:
set residuecolour
amino-acids
rainbow,
colourparts on;
helix from 1 to 10; ! or whatever
Solution 2:
Use the MolAuto program to create the commands for the schematic residue graphics objects. By default, these will be coloured in a rainbow fashion, but on an object-to-object basis, not residue-by-residue.
As an example, to draw bonds for all atoms in all residues having an atom within 5.0 Ångström of a residue of type RTL, use the following:
bonds in contains close in type RTL 5.0;
Alternatively, in PostScript output it is possible to make two plots on the same paper (position them with the area command) and draw the same objects in both, adding a small rotation to one of them.
"Error: parse error"
-ss_hb
command-line option in the
MolAuto program is usually good, while the
command-line option -ss_ca
may occasionally be too
generous.
The algorithm for helix graphical object generation assumes reasonably good alpha-helical geometry, but can usually handle deviations like proline bends gracefully. Of course, it cannot take care of all kinds of irregularities.
Sometimes, a beta-strand may flip over on its back. This is most often due to prolines or cross-over in the strand, and is difficult to do anything about. Sometimes it may be best to split the strand up to handle the problem.
"from 4 to 7"
,
not "from 5 to 6"
. The graphical objects
begin and end at the given residues.