MolScript is a program for creating molecular graphics in the form of interactive OPENGL, Postscript or Raster3D input files. Possible representations are simple Jane Richardson-type schematic drawings of proteins, CPK spheres, ball-and-stick models, and text labels.
MolScript runs on all the DEC-ALPHAs.
Also check the online MolScript manual
MolScript is a good tool to create rendered 3-D models with the aid of Raster3D and ImageMagick package.
Using your old Molscript and Raster3D input files:
Because of the significant changes between the old versions of these programs and the new ones, you may want to use the old versions to run your old input files. The old versions can be accessed by running:
molscript_v1.4 (old molscript) render_v2.1 (old Raster3D)Features in the new programs
A complete list of the new features can be found at this link
Here is a short list of the highlights:
1) MolAuto. 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.
2) OpenGL interactive graphics. This output mode displays an image which is rotatable, scalable, and slabable 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.
It is a very good way to interactively view a model.
3) Raster3D. Labels can now be output, and the transparency of surfaces can now be changed. There is a nice case of transparency in the example files. Note that the use of transparency causes "render" to take several times as long to run.
Using the new versions:
1) MolAuto. MolAuto is invoked with the coordinate file (in PDB format) as the single required argument on the command line. The program reads the coordinate file, analyses it, and outputs the MolScript input file to stdout (standard output):
% molauto pdb1rbp.ent > 1rbp.in
MolAuto can be part of a UNIX pipe with MolScript, for example when producing a quick display of a PDB structure using the OpenGL implementation in MolScript:
% molauto pdb1rbp.ent | molscript -gl
Note that it is a good idea to pass your PDB file through the program al_moleman to clean it up prior to use in MolScript. Simply read your PDB file into al_moleman, run the "CORRect_nomenclature" option, and write out a new copy. If the MolAuto program will not read your PDB file, this procedure will probably solve the problem.
2) OpenGL. Once an image has been displayed using the -gl option of MolScript, the mouse can be used to interactively control the view. The mouse functions as follows:
left button rotate shift + left button (up-down) scale shift + middle button (up-down) change slab right button menu choice
The menu choices include: Full screen, normal window, output view, reset view, re-read input file, and quit. A full description is at this link
The "output view" menu choice is very useful for obtaining a viewing matrix for use with other display modes such as Raster3D. The slab thickness and viewing matrix are written to the terminal window where MolScript was started. These can be cut and pasted into the MolScript input file. Remember to put only one viewing matrix into the input file, or unintended results may occur.
Below is an example of the "output view" text:
window 63.51; slab 53.61; by rotation 0.629271 0.114119 -0.768762 -0.190745 0.981584 -0.0104233 0.753415 0.153197 0.63945
This output needs to be divided into two sections.
1) The "window" and "slab" lines should be inserted after the "plot" command of the input file, and before the "read mol" command.
2) The last 4 lines should be inserted just after the "transform" line of the input file. The semicolon at the end of the "transform" line should be removed, and a semicolon should be added at the end of the 4 newly inserted lines.
Note that the OpenGL option is only available on the newer "Powerstorm" DEC Alpha computers.
3) Raster3D. Please note that MolScript v2.0 requires the new version of "render", which is v2.4. This function operates in the same way as for the previous version of MolScript.
To output a Raster3D file:
% molscript -r < 1rbp.in > 1rbp.r3d % render < 1rbp.r3d | display avs:-
To pipe the output directly to "render":
% molscript -r < 1rbp.in | render | display avs:-
From the Display window, the file can be saved in a wide range of formats. The BMP format is a good choice for compatibility with a wide range of graphics programs, including Adobe Photoshop.
Note that there is sometimes a problem with "render" where vertical pinstripes appear in the image. To fix this, the "+matte" option must be involked in "display". For example:
% molscript -r < rbp-transp.in | render | display +matte avs:-
Ethan Merritt (author of "render") suggests placing the line: alias display 'display +matte' in your .cshrc file to permanently avoid this problem.
MolAuto: The standard output creates helices which look OK in the OpenGL format, but which are very "boxy" when rendered through Raster3D. The helices can be smoothed by changing the "segments" parameter from the default value of 2, to 10.
Raster3D: The standard output is a 500 x 500 pixel image with a black background. You can change the standard by having a "header.r3d" file in the directory where you are running MolScript. For example, the following "header.r3d" file will create a 1536 x 1536 pixel image with a white background. When reduced to 300 dots per inch for printing (as opposed to 72 dots per inch on the screen), the image will be 5.12 inches on each side.
render (Raster3D) input file, MolScript v2 64 64 tiles in x,y 36 36 pixels (x,y) per tile 3 antialiasing level (1,2,3) 1 1 1 background colour (1 1 1 = white) F no shadows cast (T = shadows cast) 25.6 Phong power (specular highlights) 0.25 secondary light contribution 0.05 ambient light contribution 0.25 specular reflection component 20 eye position (large value: very little perspective) 1 1 1 main light source position 1 0 0 0 view matrix: input coordinate transformation 0 1 0 0 0 0 1 0
A variety of examples which use some of the new features in MolScript v2.0 can be found in:
Once you are in this directory, you can execute them by typing something like:
%molscript -gl < rbp-transp.in