The purpose of this review is to both stimulate an interest in linux  and to serve as a quick guide for the installation and use of 7 programs we have chosen to review: O, XtalView, Gl_Render, MolScript (and BobScript), Raster3D, X-PLOR and CCP4. Our emphasis is on the graphical aspect of crystallographic computing, but we have included short descriptions of X-PLOR and CCP4 for completeness (unfortunately we have not had time to install and use other programs that run well on linux such as SHELX and the HKL Package, but have made a list of crystallographic programs not reviewed here below). Indeed, the non-graphical programs are well established on the linux operating system. For the most part, the authors have successfully ported the graphical programs to linux and so differences between how the program runs on linux and how it runs on an SGI will be minor. As stated above, the enthusiasm of the authors seems to ensure that bugs will be worked out. Indeed, the increasing popularity of programs distributed for linux seems to also be an assurance of their stability. XtalView for linux downloads increased 3-fold in 1998 compared to 1997, surpassing the number of SGI downloads.
While some crystallographers may find installing linux and becoming a part-time system administrator daunting, the current linux distributions (e.g., RedHat ) include step-by-step installation documentation, and vendors such as RedHat offer free email installation support (providing the software was purchased rather than downloaded). Most distributions offer installer software which lead a user through the process, and can cope with the some of the more commonly encountered problems. Installation is probably the most daunting task for a new user, but also potentially one of the most informative: most linux users would probably agree that they learned a few things during their installation of linux that they carried over into their everyday unix usage. Users looking for the minimum amount of installation time and the most user support should probably choose the RedHat distribution, since it is one of the most commonly used distributions, ensuring a wealth of pre-compiled software and a very large user base across the internet. One of the major strengths of linux is that wide user base, and one can easily tap into the very considerable experience of general users across the world. Usenet news groups are an excellent starting point: it is almost certain that someone, somewhere has encountered the same problems as you, and equally likely that someone else has a solution.
Probably the most stable and most widely used platform for linux is an Intel-processor based PC. Linux has been ported to practically every possible platform, but the PC platform has been around the longest and is therefore the most bug-free and well supported. RedHat does offer and support versions of their distribution for sun and DEC alpha, it is unlikely that most crystallographers will want to convert machines running OSF, for example, into linux machines. More usefully, an increasingly important branch of the linux community is making linux a reality on Mac/PowerPC machines. With the advent of the new Apple G3, it is eminently possibly to use macs for high power computing applications, while even lower-end macs can be turned into fully functional X-windows terminals without too much effort. However, while support for the PowerPC distributions (linuxppc ) is building, we still suggest that Pentium-based machines be utilized for crystallography, in order to ensure the most functionality and support. Despite this warning, we are currently running a PowerPC mac under linuxppc and have found it extremely stable with exceptional graphics.
Although using rpm's greatly simplifies the installation of large software packages, is can also mask some of the significant problems with the installation procedure. Installing new versions of libraries, for example, can generate numerous error messages, about broken dependencies and requirements. Some may be safely ignored, while others mean that you are about to severely damage some other component of your system. Many linux system administrators are learning that trade on-the-fly, and simply do not have the time to learn all the intricacies of a very complete system: bitter experience has shown that even using a system like RPM (or perhaps because of using it) serious damage can be done to the operating system itself. That said, by careful use of rpm's (using options which query or which produce copious logging messages) the chances of removing or overwriting something important can be minimized. For help with using rpm, view the rpm man page or type:
The particularly useful rpm options are the query options, which will list the dependencies of a package, the files it contains, and any information that came with the package:
rpm -ql gimp
rpm -qi gimp
Would give the files installed using the gimp rpm and any information distributed with the rpm, respectively. As an alternative to using the pre-packaged software, more "traditional" methods of installation are usually possible, so called 'tgz' files (a .tar file, gzipped), which contain the executables or the source code and the Makefiles to compile them. This allows a more controlled, but potentially more difficult, installation.
We have found that taking a few simple steps during the installation of new software can prevent conflicts later. During the installation, keep notes on what files were created or linked, and try to summarize what files, libraries, links, and additions to the .cshrc (or equivalent) were needed to get the program running. Always make a copy of files which are edited to make a new addition work, such as your .cshrc file. Nothing is more frustrating than getting a program to work only to find that another does not with the current .cshrc file. Adding the offending lines into a short script that is executed when the "new" program is envoked is a way around this. For example, installing the correct fonts for gimp can often be a headache, and I have precluded the possible problems the fonts may cause with other programs by envoking a short cshell script when the program is run (This is just an example, please do not email me with a solution to this problem):
xset +fp /usr/lib/X11/fonts/Type1
xset fp rehash
It may be a good idea to take a day or two to install all of the current versions of the software. This "luxury" has only been made possible very recently, since a large number of crystallography programs are currently available for linux. The advantage here is that possible conflicts will be more evident, and each program can be tested after every program has been installed. In addition, down time should be limited to the day (or two) that the programs are installed, without intermittent problems spread over weeks. This type of planned installation should also inspire you to take notes on the dependencies of each program, so that as new versions of software are available you will be prepared to safely install them.
Installing O was relatively straightforward.
Kjeldgaard offers rpms for O installation on Intel (i386) and PowerPC (ppc)
architectures running RedHat or SuSE, as well as .tgz files for Intel machines.
In addition, he provides the proper Mesa and Glut (GL Utility Toolkit)
libraries needed for Intel machines. Mesa and Glut rpms for the PowerPC
architecture are available as well. The current
version of O for Linux will run "naturally" with the Mesa 2.6 library,
and optionally with the Mesa 3.0 library provided the proper links are
made by the system administrator. If you would
like to run MolScript as well, you should use the Mesa 3.0 library and
make the links. This linking shouldn't be necessary in the future
O for Linux releases (but check the documentation!). The O installation
files are distributed via a web interface which creates a database of O
for Linux users and facilitates downloading.
Figure 1. A 2Fo-Fc map displayed using O for Linux, using Mesa 2.6 (Kjeldgaard reports that using the Mesa 3.0 libraries smoother lines can be obtained). A larger version of this image, showing the full window, can be found here. This figure, along with all other figures, were snapshot from a standard Intel-based PC running linux.
|The performance and appearance of O for Linux are both pleasantly surprising. I had been monitoring Alwyn Jones' O for Linux progress page for quite some time, and the predictions seemed gloomy for a high performance O under Linux. Presumably, hard work on Kjeldgaard's part has been a key factor in this advancement, as it seems he has been working towards this end for at least a year. It seems as though everything works as well as it would on an SGI--the pull-down menus, the fake dials, the molecule movement. Map drawing and contouring (using the quick map functions) was done quickly as well. Kjeldgaard claims that the map contouring may still have some problems.|
In concluding, there is not much to say about O for Linux, except that it is spectacular! Of course, we were not able to do a rigorous testing of all of O's features, and anyone considering serious modelling should be prepared for possible bugs. Kjeldgaard welcomes and encourages bug reports, and has fixed several in his newest release, O-6.3A-2.
XtalView [17,18] is a program suite that has been running on linux for quite some time. It offers a complete package for crystallography, from MIR and MAD structure determination to model building to refinement. There are several subprograms in Xtalview, and probably the most useful are xtalmgr, which manages and starts XtalView programs concerned with data manipulation and structure determination, and xfit, which is used to build and display molecular models using maps that are generated within the program. Documentation and tutorials for XtalView can be found in several places [17,18,19,20], including a new version of McRee's book Practical Protein Crystallography coming in May, with tutorials and examples, some of which will be available on-line . A complete manual for the program suite is being planned. The program depends heavily on a GUI (Graphical User Interface), and new users can get up and running with the current documentation.
XtalView was written by Duncan McRee at Scripps,
and is maintained in his lab and distributed by the Computational Center
for Macromolecular Structures (CCMS). Version 3.2 can be obtained
, with optionally a newer version of xfit (3.7)
which may not be compatible with the older XtalView programs. Installation
of XtalView is very straightforward.
| XtalView interfaces with X-PLOR, TNT, and CCP4
programs, and the CCP4 graphical interface will soon support a "view in
XtalView" feature. In addition, XtalView interfaces with Raster3D
in order to quickly produce ball-and-stick renderings of the chosen view
(shown in Figure 2, lower middle.) The performance of the graphics
in Xfit is good, and seems slightly faster than O for Linux. The
only problem is the long windows which do not always fit onto one virtual
terminal. This can be fixed by increasing the size of your virtual
terminal by inserting a line such as this to the Display subsection of
your XF86Config file:
Virtual 1100 900
McRee has had good results using a PC stereo system similar to CrystalEyes for the SGI but much more reasonably priced, and this should be available to users in the near future.
Figure 2. A screenshot of Xfit, the model building program in XtalView. The programs are mostly menu driven, and straightforward, but there are many time saving features of the program that are not obvious to the new user. A larger version of this screenshot can be seen here, and a view of the xtalmgr window is also available.
Molscript2 and the accompanying molauto program,
are distributed as source code and can be easily compiled under linux in
their most basic form. The simplest compilation procedure builds a version
of molscript2 which can produce postscript, VRML and Raster3D output formats.
In order to produce images directly, molscript2 must be compiled with various
external libraries, some of which are likely to be pre-installed on any
linux system (e.g. JPEG and TIFF libraries) as well as others which are
not (e.g. GLut and Mesa). These libraries themselves can be tricky to compile
and install, but most are available in RPM format for the most common flavors
of linux. The molscript webpage lists the library requirements for building
a version of molscript2 which can output images and has the GL interface,
and also gives links to where these libraries  (or
the source code for them) can be obtained.
Figure 3. Molscript, with its -gl option, produces real-time movement of nicely rendered molecules under linux. The -gl option will work on linux boxes with the help of the Mesa libraries, but there are mixed reviews on how easy this is to install. A larger version of this image is here.
|Although building a version of molscript2 with all of the bells and whistles can be tricky, it is possible to build one which can interactively display a scene using the GL interface. Indeed, the quality of the image and the performance of the interface are surprisingly good, even on relatively low powered linux machines. MolScript with an interactive interface can be built on linux using a Makefile from the molscript website which was contributed by a user. This version of the Makefile uses Mesa version 3.0, and one needs to keep this in mind if both O and MolScript are installed on the same system. As noted earlier, O should work with this version of Mesa provided the correct links are made. Kjeldgaard has noted that future versions of O will be fully compatible with the Mesa 3.0 libraries, which will obviate the step of making the links.|
Although not specifically supported under linux, BobScript requires no unusual libraries or environments to compile or run. Both bobscript and its ancilliary programs can be very easily built from source without modification. Contact the author of bobscript, Robert Esnouf, for details on obtaining the program and licence agreements. (We do not have his email address at this moment).
| The GL_Render 
program is a nicely
constructed front end and interactive viewer for BobScript/Raster3D images written by Lothar Esser. Taking either a BobScript (or MolScript) input file, or the Raster3D format output from either program, it produces a rendered image in a window. As in molscript2, this image can be interactively manipulated (and views can be outputted), but can also be sent for rendering by povray. POV-Ray(the Persistence of Vision ray-tracer)  is a freeware general rendering program, widely available and used across the internet. Since it is completely general, it has far more flexibility than the more limited render. With this flexibility comes an extra level of complexity, but if you're willing to learn how to use it, some very nice results can be obtained with POV-Ray.
GL_Render is very useful even if one isn't interested in
using POV-Ray. It largely automates the procedure of running and
re-running bobscript/molscript, and adds additional functionality by way
of extra clipping planes, or the interactive addition of labels to a pre-existing
scene. The interactive display rivals that of molscript gl, and could
be used for this purpose if molscript gl installation proves difficult.
Figure 4. GL_Render interactively displays and renders any object that can be rendered by molscript or bobscript (including maps). Settings such as light and depthcueing can also be interactively changed. A larger version of this screenshot exists here.
For information and advice on compiling CCP4 under linux, the CCP4 website has a linux page . This site goes into the specifics of compiling the package and gives some comments on the problems which you might reasonably expect to have when building CCP4. With the exception of the X-windows programs, most of the suite should compile and run well under linux. Indeed, given some of the problems which we have had in the past while compiling CCP4 even for the SGI, compilation under linux seemed no more difficult.
Linux may well be one of the more useful platforms from which to use CNSsolve, since this program makes considerable use of an HTML interface for the construction of scripts. Installation of the HTML interface on a local machine requires the use of a locally accessible webserver, of which linux boasts several. The most widely used webserver on the internet is currently Apache, the free HTTP server based on the NCSA server.
The challenge of porting the major crystallographic programs, including those with cpu intensive graphics, to linux has been met in earnest by the authors of the programs reviewed here. As users, it is our responsibility to faithfully report any problems with the installation or operation of these programs. If a problem seems to be a true bug of the program, and not just a problem with your individual installation or settings, you should contact the program author, but in order to prevent the authors from being overwhelmed with tedious questions perhaps mailing lists should first be used in order to ensure that the problem is a true bug.
It is indeed an exciting time for crystallographic computing, since it seems as though affordable, versatile PC based workstations are finally possible. The reliance on the more expensive Silicon Graphics computers, with the accompanying expense of dial boxes and CrystalEyes, meant a shortage of resources for many crystallography labs. Linux systems, while they may require more time to set up, can be a stably running alternative to the SGI, with the added advantage that work at home can be easily transferrable to work in the lab (zip disks can facilitate this). The individual crystallographer may need to be a bit more in tune with the operating system, in order to troubleshoot possible problems, but the benefit of a fully functioning workstation on one's desk is surely worth this effort. The fact that stereo will probably be available at a reasonable cost and the graphics performance is good makes one believe if there is such a thing as a free lunch! To our knowledge, however, there will probably not be dials for the linux workstations in the near future. Buying a high quality (linux compatible) mouse should help in this area.
There are certainly other crystallographic programs that run under linux (see Klas Andersson's Linux Applications in Crystallography  page). Interest in linux for crystallography is increasing, and while we have not covered every program, we hope that this review will help to encourage others to install, use, and review (!) the programs running under linux. We realize that a review such as this is bound to have its shortcomings, and encourage any errors to be reported to the appropriate mailing list.
1. O for linux URL: http://origo.imsb.au.dk/~mok/o-linux/
2. Wordperfect for Linux URL: http://linux.corel.com/linux8/index.htm
3. Applixware, fully featured office suite software URL:http://www.applix.com/appware/linux/
4. Gimp, The Gnu Image Manipulation Program URL: http://www.gimp.org
5. Linux master site URL: http://www.linux.org
6. RedHat Software URL: http://www.redhat.com
7. LinuxPPC URL: http://www.linuxppc.org
8. RedHat Package Manager URL: http://www.rpm.org
9. Debian GNU/Linux URL: http://www.debian.org
10. Jones, T.A. and Kjeldgaard, M. (1997) Electron-density map interpretation. Meth Enzymol 277, 173-208.
11. O program URL: http://imsb.au.dk/~mok/o/
12. Uppsala Software Factory (X-Utils) URL: http://alpha2.bmc.uu.se/~gerard/manuals/gerard_manuals.html
13. OpenGL: http://reality.sgi.com/opengl/
14. Mesa : http://www.mesa3d.org/
15. O for linux performance comments URL: http://origo.imsb.au.dk/~mok/o-linux/platforms.php3
16. LinuxPPC Mesa/Glut rpm URL: http://ftp.linuxppc.org/RPMS/MByName.html
17. McRee, D. E. Practical Protein Crystallography, (1993). Academic Press, San Diego, CA.
18. XtalView URL:http://www.scripps.edu/pub/dem-web/index.html
19. XtalView Documentation URL: http://www.sdsc.edu/CCMS/Packages/XTALVIEW/XV1TOC.html
20. Practical Protein Crystallography, Second Edition URL:http://ppcII.scripps.edu
21. XtalView Download URL: http://www.sdsc.edu/CCMS/Packages/XTALVIEW/xtalview.html
22. Kraulis, P.J. (1991). MOLSCRIPT: a program to produces detailed and schematic plots of protein structure. Journal of Applied Crystallography 24, 946-950.
23. Molscript URL: http://www.avatar.se/molscript
24. Raster3D URL : http://www.bmsc.washington.edu/raster3d/raster3d.html
25. Molscript - additional libraries URL: http://www.avatar.se/molscript/doc/links.html
26. Merritt, E.A. & Bacon, D.J. (1997). Raster3D Photorealistic Molecular Graphics. Methods in Enzymology 277, 505-524.
27. Esnouf, R.M. (1997). An extensively modified version of MolScript that includes greatly enhanced coloring capabilities. J Mol Graph Model 15, 132-4, 112-3.
28. GL_Render (Lothar Esser) URL: ftp://www.hhmi.swmed.edu/pub/gl_render/
29. POV-Ray URL: http://www.povray.org
30. Collaborative Computational Project, N. (1994). The CCP4 Suite: Programs for Protein Crystallography. Acta Crystallographica D50, 760-763.
31. CCP4 URL:http://www.dl.ac.uk/CCP/CCP4/main.html
32. CCP4 on LINUX URL: http://www.dl.ac.uk/CCP/CCP4/ccp4onLINUX.html
33. Brunger, A.T. (1996). Recent developments for crystallographic refinement of macromolecules. [Review] [81 refs]. Methods in Molecular Biology 56, 245-66.
34. X-PLOR homepage URL: http://xplor.csb.yale.edu/xplor-info/
35. Brunger A.T., Adams P.D., Clore G.M., DeLano
W.L., Gros P., Grosse-Kunstleve R.W., Jiang J.S., Kuszewski J., Nilges
M., Pannu N.S., Read R.J., Rice L.M., Simonson T., Warren G.L. (1998) Crystallography
& NMR system: A new software suite for macromolecular structure determination.
Acta Crystallographica D54 905-921.
36. CNSsolve homepage URL: http://xplor.csb.yale.edu/cns_solve/
37. Linux Applications in Crystallography URL: http://www.fos.su.se/struc/linux/linuxtal.html
Crystallographic Software for Linux Not Reviewed (our apologies!):
1. SHELX URL: http://shelx.uni-ac.gwdg.de/SHELX/
2. HKL Package URL: http://www.hkl-xray.com/
3. Rasmol URL: ftp://ftp.dcs.ed.ac.uk/pub/rasmol/
(New version--2.6.4 (December 1998)--seems to be easier to compile with 16bit and 32bit graphics)
Other Useful Links:
1. Corel Linux Users Network: http://linux.corel.com/index.htm
2. Google, a good search engine for linux: http://www.google.com
3. Metalab (formerly Sunsite), a warehouse of downloadable software: http://www.metalab.org
4. Linux HOWTOs: http://metalab.unc.edu/LDP/HOWTO/
5. Slashdot.org, Linux news: http://slashdot.org/
6. SAL, Scientific Applications Under Linux: http://SAL.KachinaTech.COM/Z/2/index.shtml
7 Choosing a Window Manager:http://www.PLiG.org/xwinman/
8. Fortran Compiler rpm (fort77-1.14a-4.i386.rpm): http://metalab.unc.edu/pub/Linux/distributions/redhat/redhat-5.2/i386/RedHat/RPMS/