Installation

This description assumes that you have a UNIX computer system. The installation procedure has been tested (so far) only on an SGI IRIX system, but should work on other UNIX systems as well.

Information on other computer systems is currently not available, but it shouldn't be too difficult to install MolScript if you know how to compile programs on your computer system. If you port MolScript to another system, you would help others by sending a description of your porting procedure to pjk@avatar.se. The description will be incorporated into this documentation.

Unfortunately, the installation procedure is more complex for v2.0 of MolScript compared to previous versions. This is due to those output modes that require external software. However, the basic implementation of MolScript (with the PostScript, Raster3D and VRML 2.0 output modes) is easy to compile.


The distribution

The MolScript distribution contains the following directories:

You will have obtained the MolScript distribution in one of two possible ways, and in one of two possible compression modes:

The .Z file was compressed with the UNIX utility compress, while the .gz file was compressed with gzip.


Save previous MolScript versions

The previous versions of MolScript must not be mixed with the current distribution.

Before unpacking the distribution, move your previous MolScript distribution (if you have one) to some safe location. This applies to the molscript and forlib directories, as well as the previous molscript executable file.


Handling uuencoded e-mail

If your distribution arrived as a uuencoded e-mail message, do the following:
  1. Save the e-mail message as a separate file called molscript.uuencode.

  2. Use your favourite text editor (vi, emacs, jot,...) to remove any garbage added by your e-mail program to the beginning and/or to the end of the file: The file should begin with the line
    begin 644 molscript.tar.gz
    or
    begin 644 molscript.tar.Z
    It should end with the line
    end
    Between the first and last lines, the file will consist of many lines, most of which are of of length 61 bytes with the character 'M' in the first column.

  3. Decode the file using the uudecode program. Use the following command:
    % uudecode molscript.uuencode
    This should create the gzipped (molscript.tar.gz) or compressed (molscript.tar.Z) distribution file.

Unpacking the compressed tar distribution file

The MolScript tar distribution file has been compressed with either the gzip or the compress program. Use one of the following commands to un-compress the file:
% gunzip molscript.tar.gz
or
% uncompress molscript.tar.Z
This should produce a molscript.tar file. This file should be moved to the directory where you wish to have the clib and molscript directories located. For example, the /usr/local directory is often used for software of this kind. You probably need root privileges (or the equivalent) to write anything in the /usr/local directory.
% mv molscript.tar /usr/local
% cd /usr/local
Then use the tar program to unpack the distribution:
% tar xvof molscript.tar
This creates the clib and molscript directories and their sub-directories.


The Makefiles

There are two different Makefiles in each of the clib and molscript directories for compiling the software.

You must choose which of these Makefiles to use. In each directory, you can either make a symbolic link to the appropriate Makefile variant (the basic one in this example):

% ln -s Makefile.basic Makefile
or you can make a proper copy of the chosen Makefile variant:
% cp Makefile.basic Makefile

The Makefiles contain various symbols which may need to be modified for your system. The current values for the symbols have been tested on SGI IRIX 6.2/6.3 systems, using the native SGI IRIX cc compiler for the complete installation, and GNU's gcc compiler (v2.6.3) for the basic installation.

The clib directory

The molscript directory

Notes

  1. It should be possible to compile the OpenGL implementation on a Windows 95 or a Windows NT system, since the GLUT library has been implemented for these systems. However, this has not yet been tested.

  2. All image output formats require the OpenGL implementation. Currently, they also require the X window system having the GLX extension required for OpenGL. This implies that the computer system must be a UNIX machine. Currently, the image output formats cannot be compiled on Win95 or WinNT. If you do not have the OpenGL libraries, or your system does not have the X window system with the GLX extension, then it is not possible to compile any of the image file format output implementations.

  3. It is possible to compile a subset of the image file format implementations: You may omit either the JPEG or the PNG output formats (or both) from the Makefile.complete file by commenting out the relevant symbols. It is therefore not necessary to obtain and install the JPEG and PNG libraries.

  4. The SGI and EPS image formats require OpenGL and the X window system, but no other external libraries.


Compiling the C code

If you made a copy of, or linked to (see above) the appropriate Makefile variant and modified it (if needed) and installed the various external libraries (if any), then you should be ready to compile the MolScript program.

First, go to the clib directory, and create the clib.a file:

% cd /usr/local/clib
% make
Next, go to the molscript directory and create the molscript and molauto executables:
% cd /usr/local/molscript
% make
You may wish to copy the executables to an appropriate directory on your system (such as /usr/local/bin):
% cp molscript molauto /usr/local/bin
or make links from this directory to the executables:
% cd /usr/local/bin
% ln -s /usr/local/molscript/molscript molscript
% ln -s /usr/local/molscript/molauto molauto
You and any other users need to have this directory in their path if the executable is to be invoked simply by giving the program name as a command. Check that the PATH environment variable contains the /usr/local/bin value:
% echo $PATH


Top page