Compilation on VAX/VMS systems
$ FOR SHELXL,SHELXLV,SHELXL1,SHELXL2,SHELXL3,SHELXL4 $ LINK SHELXL,SHELXLV,SHELXL1,SHELXL2,SHELXL3,SHELXL4 $ SET PROT=(W:E) SHELXL.EXE(b) VAX 9000 (vector processor) etc.
$ FORT SHELXL,SHELXL1,SHELXL2,SHELXL3,SHELXL4 $ FORT/VECTOR/ASSUME=(NOACCU,NODUMM)/MATH=FAST/SHOW=ALL SHELXLV $ LINK SHELXL,SHELXLV,SHELXL1,SHELXL2,SHELXL3,SHELXL4 $ SET PROT=(W:E) SHELXL.EXEIn both cases the following symbol should also be defined for each session in which the program is used:
$ SHELXL :== $ DISK:[USER]SHELXLwhere DISK and USER define where the file SHELXL.EXE is located, and will need to be replaced by the appropriate names for your system. This line may be included in the LOGIN.COM file for individual users, or - better - a global symbol SHELXL can be defined in the file which is executed when the system is started.
Compilation on IRIS (and many other UNIX) systems
# f77 shelxlv.f -c -O2 # f77 shelxl.f shelxl1.f shelxl2.f shelxl3.f shelxl4.f shelxlv.o -o shelxlThe executable program shelxl may then be copied into a directory such as /usr/bin/ for general use (which will require superuser privileges). The UNIX version of SHELXL-93 is able to read the '.ins' and '.hkl' files in either UNIX or DOS format, and may be set up to write the '.res', '.cif' and '.fcf' files in DOS format, so that PC's can access such files via a shared disk without the need for conversion programs such as DOS2UNIX etc. To compile the program with this option the first executable statement in shelxl.f should be KD=CHAR(13) (see the comments in the source). For reasons of efficiency the '.lst' file is always in the local format (it can still be printed directly from a PC using SPRINT - see below).
Compilation on IBM RS/6000 series
# xlc tyme.c -cThe rest of the program is then compiled and linked as follows:
# xlf shelxlv.f -c -O # xlf shelxl1.f -c -NT50000 -NQ50000 # xlf shelxl2.f -c -NT50000 -NQ50000 # xlf shelxl3.f -c -NT50000 -NQ50000 # xlf shelxl4.f -c -NT50000 -NQ50000 # xlf shelxl.f shelxlv.o shelxl1.o shelxl2.o shelxl3.o shelxl4.o tyme.o -o shelxlWhere shelxl.f is a special version in which all the calls to TIME have been changed to TYME; the file 'shelxl.ibm' in which this change has been made may be copied to 'shelxl.f'. Note that the file 'shelxl.ibm' also specifically closes all files before terminating to work around a known system problem.
Compilation on Convex computers
T=ETIME(TX)where TX has been declared as a REAL array of dimension 2, i.e. the statement REAL TX(2) is included after the first statement of the subroutine.
Compilation on Sun Sparcstations running SUNOS
T=SECOND()It is simpler (and safe) to vectorize all routines:
# cf77 -l nag -Zp -o shelxl shelxl.f shelxlv.f shelxl1.f shelxl2.f shelxl3.f shelxl4.fCompilation on other computers
TIME and DATE - these subroutines should return the current time and date as strings 'HH:MM:SS' and 'DD-MON-YY' (where HH is the hours part of the time as two digits, and MON is a three character abbreviation for the month, etc.). It does not matter which characters are used as separators.
MCLOCK - this function should return the current time as a INTEGER number of 1/100 seconds from an arbitrary starting time. The function ETIME (see above) (which returns the number of seconds as a REAL) is a common alternative.
IARGC and GETARG - the INTEGER function IARGC should return the number of command line parameters, and the subroutine call GETARG(IARGC(),string) is then used by SHELXL-93 to extract the last of these (it is used to set up all the file names by adding the appropriate extensions). This avoids the confusion over where to start counting parameters!
Two precompiled PC versions are provided. 'SHELXL.EXE' is a 32-bit version which runs in 'protected mode' on 80386SX, 80486SX, 80386DX, 80486DX and Pentium processors. For the first three a numeric coprocessor must also be present. The program contains a built-in (Phar Lap) protected mode loader and so runs as a stand-alone program. It runs as a virtual memory program if the available extended memory is less than about 5MB, which means that about 10MB disk space should be free for scratch files. Since the program is particularly efficient as regards disk input/ouput, it is usually better to leave extended memory free for the program rather than to install a disk cache. On systems with limited physical memory it may be necessary to remove other resident programs and protected mode drivers (in 'AUTOEXEC.BAT' and 'CONFIG.SYS', then reboot). If the program fails to load properly it usually means that either not enough memory is available, or that a memory manager or other resident user of extended memory conflicts and has to be removed first. The Lahey / Phar Lap banner which appears when the program is started gives the amount of extended memory available to the program; it may be suppressed by the statement:
SET DOS=-NOSIGNONwhich can be included in 'AUTOEXEC.BAT'. MSDOS version 5.0 or later is recommended but not absolutely essential.
For older personal computers and systems with too little extended memory the 16-bit 'real mode' version 'PCSHELXL.EXE' is also provided. It contains all facilities of 'SHELXL.EXE' but is somewhat slower and has limited memory, so for example is restricted to 300 full-matrix parameters. BLOC or CGLS may be used to refine larger structures, provided that there is room for all atoms, restraints etc.; since the memory allocation is dynamic, there are no individual limits except on the number of least-squares parameters. This version should run on ANY personal computer with an 8088 or compatible CPU and the corresponding coprocessor (not required for 80486DX etc.) and 640 kB of memory. The scratch disk space required depends on the size of the structure; at least 2MB is recommended (a RAM-disk may be used - the scratch files are set up in the current directory). If there is not enough memory to run the program it may be necessary to remove resident drivers (network software is particularly greedy). Although this program should be compatible with MSDOS 2.10 and all subsequent versions, version 5.0 or later is recommended.
Although both PC versions are tolerated by MS-WINDOWS and other multitasking interfaces, there is usually a considerable price to pay in terms of performance degradation. If PC's and RISC machines are linked by a NFS network, they may be run using the same files provided that these are in DOS format, because the UNIX version of SHELXL-93 can read DOS format .ins and .hkl files and can be set up to write DOS format .res, .cif and .fcf files (by setting KD=CHAR(13) as the first executable statement in shelxl.f - see comments in the source). If this has been done, all editing may be performed on the PC's; any text editor may be used.
For PC's which are connected to a HP Laserjet or compatible printer, a special program SPRINT is provided for printing the documentation and listing files. SPRINT can print both DOS and UNIX format text files (the latter facility is useful for NFS networks). If no filename extension is specified, .lst is assumed. If .lst is given or assumed, the output is compressed; otherwise a margin is left on the left hand side. SPRINT should be able to handle read-only files and printers running out of paper. Examples:
SPRINT SHELXL.HLP (to print this manual; similarly READ.ME and REFEREE.MSG)
SPRINT AGS4 (to print AGS4.LST in compressed mode after running the test job)
Memory requirements, paging etc.
The program uses two large arrays A and B dynamically, so the limits on the size of structure which can be handled are determined by the dimensions of these two arrays and also of the array C; A, B and C are defined as separate COMMON blocks. The standard version of the program is dimensioned for up to 1500 parameters in each full-matrix block and roughly 5000 atoms (assuming a generous number of restraints etc.), and is suitable for a typical (UNIX) workstation (or mainframe) with 8MB or more physical memory; the precompiled (protected mode) PC version 'SHELXL.EXE' is similarly dimensioned.
It may be necessary to redimension A, B and C and recompile the program for specific installations, e.g. to fit within a given job category on a mainframe. The highest elements of A and B actually used for the various calculations are printed out by the program (after 'Memory required ='). The program will try to use all available physical (and virtual) memory rather than performing its own disk I/O, thereby achieving longer vector 'runs', which enhances performance on vector and pipelined systems. In some cases, e.g. when a large structure is refined on a MicroVAX or PC with limited physical memory (or allocation of physical memory to a given process in the case of the VAX) this strategy may cause excessive 'paging' and disk I/O. If this happens, the maximum vector run length can be reduced by setting the 4th parameter on the L.S. instruction or by reducing the value of the variable IV in the main program and recompiling; it may also be more efficient to 'block' the refinement or use CGLS (except in the final refinement).
Back to D - Example of an Acta Cryst. Paper in '.cif' Format
Back to Appendices
Back to Table of Contents