Moviemol input

The necessary input to the program is a file (default file name extension ".xyz") which contains frames with atomic coordinates and atomic numbers Z, arranged as follows (free format):
        Number of frames
            Number of atoms in frame no. 1.
                x, y, z, Z      for atom no. 1
                x, y, z, Z      for atom no. 2
                     ...
                x, y, z, Z      for the last atom
            Number of atoms in frame no. 2.
                x, y, z, Z      for atom no. 1
                x, y, z, Z      for atom no. 2
                     ...
                x, y, z, Z      for the last atom
etc. for all the frames. Different input formats (among them Gaussian output files) are allowed if signalled by the user in a (optional) control file (default file extension ".ctl") or by a command-line option. See the manual for more information.

How to run moviemol

The program runs on Silicon Graphics or IBM RISC/6000 workstations with the GL graphics library installed. In the anonymous-ftp directory you can find the moviemol executable program module, named "moviemol.xxx". (After ftp:ing the SGI or RISC versions to your workstation you must change the name of the executable to "moviemol" and type chmod +x moviemol to make it possible to execute.) There are also 6 input examples and a manual.

To start the program, type moviemol (return). The program will then ask you: Enter coordinate file name: . You can answer, for example: ex1 (return) - and you're in business, looking at the movie of the "ex1.xyz" file! Alternatively, you can specify the coordinate file name as a command-line argument. That is, type instead: moviemol ex1 (return).

You can now start studying the trajectories in detail by rotating the molecules, zooming in the picture, making a hardcopy now and then, or whatever you might fancy to do - just by pressing the appropriate keys on your PC or workstation keyboard. The action of the keys is described in the next section. Note that only if you care to change the program's default settings do you need to read the manual.

You can obtain some help by supplying the command-line option "-h " when starting moviemol: moviemol -h

Help on the key stroke actions can be obtained in moviemol by pressing the "?" key (when the cursor is located in the moviemol-display window).

Summary of key stroke actions

Summary of command-line options

 Usage:
         moviemol [ options ] coordinate-file [ control-file ]

 Options:
         -help        Display this help text.                     
         -nohbond     Do not display hydrogen bonds.             
         -hbond       Display hydrogen bonds (the default).      
         -g94         The coordinate file is a "Gaussian94" output file.
                      This is the same as -inputformat 21 (see below).
         -Zxyz        The coordinate file format is Z,x,y,z instead of x,y,z,Z.
                      This is the same as -inputformat 3 (see below).
         -nZxyz       The coordinate file format is name,Z,x,y,z (name=char*4).
                      This is the same as -inputformat 4 (see below).
         -Xmol        The coordinate file format is similar to that for "Xmol":
                      number of atoms in frame 1/line of text 1/name,x,y,z of
                      atom 1 in frame 1/...  Same as -inputformat 31
         -crystal     The coord file contains cell data a,b,c,alfa,beta,gamma
                      (on the line above #atoms) and fractional coordinates.
         -frameno     Display the frame number.                   
         -stdinp      Read coordinate data from standard input.   
         -monochrome  Monochrome display.                         
         -masterctl   Use file  as default control file.

         The following flag options require an integer parameter. Please see
         the manual for a description of each variable.
         -icloseopen     where  = 0 (default) or 1      
         -icolorps       where  = 0 or 1 (default)      
         -idisplaycell   where  = 0 (default) or 1      
         -idumpscreen    where  = 0 (default), 1 or 2   
         -iframetext     where  = 0 (default) or 1      
         -ifixsymbol     where  = 0 or 1 (default)      
         -ikeepbonds     where  = 0 (default) or 1      
         -imonochrome    where  = 0 (default) or 1      
         -inputformat    where  = 0 (default), 1-4, 10, 11, 21 or 31
         -ipersp         where  = 0 or 1 (default)      
         -iportrait      where  = 0 or 1 (default)      
         -iusedirect     where  = 0, 1 (default) or 2   
         -iunit          where  = 0, 1 (default), 2 or 5
         -nframein       where  = nframes (default) or new #frames
         -npixwinx /-npixwiny   where  = X-window width/height
         -nshow          where  = 1 (default) or new frame interval

How to create the MPEG movies

In the version of moviemol for workstations, mpeg files can be generated "automatically" if certain (see below) public-domain software have been installed on the workstation.

To create these movies, you will need a shell script named 'XtoPPM' (which must be executable!) in your current directory. This shell script should contain the lines:

# Shell script to make screen dumps and ppm files in moviemol
xwd -nobdrs -name moviemol -out $1
cp $1 moviscrdump.xwd
xwdtopnm moviscrdump.xwd > $1
rm moviscrdump.xwd
You will also need to add a line in your moviemol control file ("name.ctl"):
 $CNTRL
        idumpscreen = 1,
 $END
This tells the moviemol program to call the XtoPPM shell script for each frame. The XtoPPM shell script makes a screen dump of the moviemol X-window, and transforms the screen dump file into a portable pixmap ("ppm") file. This transformation requires that the 'xwdtopnm' program from the "pbmplus" or the "netpbm" image-conversion toolkits has been installed on the computer (I only got it to work using pbmplus, not netpbm, when I tried it on an IBM Risc workstation - no idea why).

After moviemol has been run using the control file above, a set of ppm files will have been created. These ppm files can then be strung together with the help of the mpeg_encode program (which needs the input file "name.param" in which one has to edit the output file name and the number of frames). The resulting mpeg movies can now be displayed with the mpeg_play program (and can for example be included in your WWW home page).

Some example files can be found in ifm.liu.se/pub/Compchem/moviemol/mpeg_dir.

Additional note: you may also want to add some more lines to your moviemol control file:

 $CNTRL
        idumpscreen = 1,
        npixwinx = 320, npixwiny = 226,
        idumpstart =  5, idumpstop = 100, idumpdelta = 5,
 $END
The second line in the cntrl namelist makes the X-window smaller (and so the mpeg files). The third line says that moviemol should start making screen dumps on frame 5 and stop on frame 100, with an interval of 5 frames. If idumpscreen=2 screen dumps will occur when the key P is pressed.


How to run moviemol, moviemol@kemi.uu.se

Back to the moviemol home page