**** DIRDIF EXECOM ====> DIRDIF-94 <==== **** ==> for the local expert <== Release: 14 Dec. 1994 **** EXEC and COM files Update: 5 Jan. 1995 **** **** WARNING : this file contains outdated information only !!!!!!!!!!!! **** new versions are stored in individual files: **** DDMAKE.* and IMPLEM.* and others. Update: 12 Mar. 1996 +----------------------------------------------------------------------+ | DIRDIF-94 ======== A Computer Program System for | | Crystal Structure Determination by Patterson Methods and | | Direct Methods applied to Difference Structure Factors | +----------------------------------------------------------------------+ Contents ======== Approximate line nr. Section 01. Introduction -----------------------------------------> 52 Section 02. Calling procedure, FORTRAN simulation 78 Section 03. Compound characterization and calling parameters 134 Section 04. Filename conventions and files for printing 180 Section 11. DIRDIF EXEC simple IBM cms EXEC Section 12. DIRDIF EXEC IBM EXEC with full file definitions Section 20. VAX IMPLEM VAX/VMS implementation instructions Section 21. DDMAKE.COM initiation VAX Section 22. DIRDIF.COM VAX command procedure Section 23. DDASSIGN.COM VAX command proc. to set assignments Section 30. UNIX / AIX / ULTRIX introduction Section 31. Simple Script for COMPILING DIRDIF on RISC / AIX Section 32. Simple Script for COMPILING DIRDIF on DEC / ULTRIX Section 33. Simple Script for COMPILING DIRDIF on SUN / UNIX Section 34. Simple Script for EXECUTING DIRDIF C-shell Section 35. Advanced Script K-Sh for COMPILING DIRDIF on RISC/ AIX Section 36. Advanced Script K-Sh COMPILING DIRDIF on DEC / ULTRIX Section 37. ----> Script for EXECUTING DIRDIF. K+B-shell Section 38. ----> Script for EXECUTING DIRDIF. C-shell Section 41. PC-DOS and MS-DOS on IBM or IBM-compatible PC's Section 51. CYBER PROCEDURE (A.Meetsma, Groningen) Section 01. Introduction ======================== | Welcome to DIRDIF Wonderland ! | To enjoy and to profit from the full power of the DIRDIF system, | the various programs must be linked by computer-dependent procedures. | It is hoped, that this file shows you how to do so for your computer. | Please let us know if you have any problems. ========= Thank you. The present file DIRDIF.EXECOM gives computer specific information about the calling procedure, file handling, etc., and EXEC or COMMAND files for intiating and executing the DIRDIF system. Implementation instructions of the DIRDIF system and suggestions for switching between your local files and DIRDIF files are given in file DIRDIF.IMPLEM which is part of the distribution package of the DIRDIF system. The contents of the various DIRDIF files, what to do with them, and how to test whether or not the DIRDIF programs are running properly, and what to do in case of problems, also is described in DIRFIF.IMPLEM. Section 02. Calling procedure, FORTRAN simulation ================================================= The programs which are part of the DIRDIF system are DDSTART, CRYSDA, MERBIN, DDMAIN, PATTY, ORIENT, TRACOR, PHASEX, FOUR, various utility programs collected in NUTS (AT2X, X2AT, SHAT, SHELIN, BIJVOET, ...), and the NIJX (= NIJX1 + NIJX2) package of subroutines. 1996: + TRAVEC These programs and routines are executed in the order as given by a con- trol file (DDSYST) which is automatically prepared when calling DIRDIF. The actual call for the execution of one program is usually done by the computer-dependent control file, command procedure, EXEC, or -COM file . This section shows (in FORTRAN language) what is to be done..... The procedure is published by Smits et al., J.Appl.Cryst.(1994) 27, 661, which is reproduced in the DIRDIF USER'S GUIDE. Suppose all programs are compiled as subroutines (e.g. the first record of the program DDSTART, now being 'PROGRAM DDSTART' , is replaced by the the statement 'SUBROUTINE DDSTART'), then the following program DIRDIF simulates the DIRDIF calling procedure: PROGRAM DIRDIF C Simulates the DIRDIF command procedure CHARACTER*80 DDPARM CHARACTER*8 EXPROG C Read calling parameters (CCODE etc.) from terminal (unit = 5): READ (5, A) DDPARM C Write calling parameters to the DDJOB file (unit = 2): WRITE (2, A) DDPARM C First call will be DDSTART, which reads this DDJOB file C and writes program names to the DDSYST file (unit = 3). EXPROG = 'DDSTART' GOTO 224 C Read next program name from file DDSYST (unit = 3) 222 READ (3, A) EXPROG 224 IF (EXPROG .EQ. 'DDSTART') CALL DDSTART IF (EXPROG .EQ. 'STOP') STOP IF (EXPROG .EQ. 'CRYSDA') CALL CRYSDA IF (EXPROG .EQ. 'MERBIN') CALL MERBIN IF (EXPROG .EQ. 'DDMAIN') CALL DDMAIN IF (EXPROG .EQ. 'PATTY') CALL PATTY C etcetera C Note: if symbolic program names can be used then all C individual calls can be replaced by one: CALL EXPROG GOTO 222 END WARNING: this big DIRDIF program won't work ............. ........ DIRDIF is a collection of programs working in unison for you ! What is usually done in the command file is presented in the following sections, for different computers (main frame, unix, PC, ...). 1996: see files: DDMAKE.* and IMPLEM.* and others. Section 03. Compound characterization and calling parameters ============================================================ A compound is characterized by a code name CCODE which is restricted to at most six characters of which the first must be a letter. Note: in the following CCODE refers to a variable name which designates the compound under investigation. The DIRDIF system is activated by entering at the keyboard / terminal: ====> DIRDIF PARM1 PARM2 PARM3 PARM4 in which PARM1, PARM2, .... are the calling parameters. Some examples: enter: ====> DIRDIF H Invokes the help. ====> DIRDIF CCODE Starts an interactive terminal session to solve the structure of your compound 'CCODE' (at every prompt dur- ing execution the option H (for help) is available); at the end of the session you get the possibility to send the job to a batch queue. ====> DIRDIF CCODE PARM2 (where PARM2 = 'PATTY', 'ORIENT', 'TRACOR', 'PHASEX' or 'DIRP1') Starts an automatic run of the chosen program to solve the structure of your compound CCODE. No questions asked. ====> DIRDIF CCODE PARM2 (where PARM2 is either 'NUTS' or any of its subprograms 'AT2X', 'X2AT', etc.) Starts the chosen utility program for your compound CCODE (may be interactive). ====> DIRDIF CCODE BATCH USERID PARM2 = 'BATCH' signals that the job is being executed in batch mode. Note: the preparation of the batch job and the creation of the batch control file has been done (by program DDSTART at your request!) at a preceding terminal session. The calling parameters are sent to the file DDJOB to be read, tested and/or executed by the FORTRAN supervisor program DDSTART. A summary of the major options is given in the DIRDIF.HANDOUT . Section 04. Filename conventions and files for printing ======================================================== The names of the files depend on your machine and on the command proce- dure you use. For example the reflection data file of the test structure MONOS is denoted FILE FREF A in the IBM EXEC; simple (see Section 11.) MONOS FREF X in the IBM EXEC; full file definitions (Section 12.) FREF.DAT in the VAX COM file; simple (see 21.) ? MONOS.FREF ?? in the VAX COM file; full file definitions (??) FREF in the UNIX procedure (see Section 30.) 1996: ccode.crysin etcetera for unix The system produces a short file for printing (IPR2=LISTING, 1996: LIS1) with the most important information on the results of the programs. It is up to the local expert who prepares the command procedure to decide whether or not the file IPR2 is sent to the printer. In addition a longer file for printing (LIS2) is produced, which gives information on the input data, the execution of the various programs and their results. Inspect the file IPR3 only if you are interested, or when the structure did not come out as you hoped or expected. With the aid of the detailed information you might be able to detect where things went wrong and start DIRDIF, or part of it, again. The file IPR3 should not be printed routinely. After successful implementation (and testing) it may be useful to modify the DIRDIF.HANDOUT, adding information about the local file names. Section 11. DIRDIF EXEC simple IBM cms EXEC =============================================== In Section 11. and Section 12. we refer to the IBM cms language. For IBM versions of unix or IBM compatible PC's, see section 30. and Section 41. FILENAMES in this EXEC. Within the FORTRAN programs the files are named according to their func- tion or type, e.g. filetype = CRYSDA, ATOMS, FREF, DDLOG, ...... The operating system translates this into FILE filetype A ! It is assumed that all files relating to the compound CCODE are stored this way in one minidisk with filemode = A, and file assignment is not necessary. As scratch files and temporary files are automatically put in the A-disk as well, the A-disk should not be too small. In contrast, the LISTING files (CCODE LISTING on unit IPR2 and IPR3 LISTING on unit IPR3) are assigned individually for various reasons. Being part of the system the DIRDIF help file (DIRDIF HELP *) and the DIRDIF databases (DIRDIF ORBASE * and DIRDIF ORUSER * ) should easily be recognizable as permanent files and are assigned as well. Example. To run the MONOS test case, the appropriate data files are FILE FREF A reflection data file FILE CRYSIN A crystal data file FILE ATMOD A model parameter file for ORIENT FILE ATOMS A output parameter file Here follows a commented exec. &TRACE ALL ***** DIRDIF EXEC ***** File: DIRDIF EXECOM Section 11. ***** IBM EXEC simple * +--------------------------------------------------------------------+ * | DIRDIF EXEC | * | | * | Command procedure to execute the DIRDIF program system | * | | * | Paul T. Beurskens, G. Admiraal, Gezina Beurskens, W.P. Bosman, | * | Rene de Gelder, Randy Israel, and Jan M.M. Smits. | * | | * | Crystallography Laboratory, University if Nijmegen, | * | Toernooiveld, 6525 ED Nijmegen, The Netherlands | * +--------------------------------------------------------------------+ * | DIRDIF-94 Version 14 Dec. 1994. Operating system IBM: VM/CMS | * | This EXEC is the most simple DIRDIF command procedure file for IBM | * +--------------------------------------------------------------------+ * * SYNTAX DIRDIF &1, &2, &3, &4 to choose certain options of DIRDIF * where &1, &2, &3 and &4 are parameters for the desired execution: * &1 the compound code CCODE, or H * &2 = program name if online; in batch &2 = BATCH * &3 online usually not needed; in batch &3 = USER-ID * &4 usually not needed * If no parameters are given (&INDEX=0 and &1 = blank) * or if &1 equals ? or H or HELP or CCODE * (the literal string 'CCODE' is not a suitable compound name). * the DIRDIF HELP file is invoked. * * Some IBM cms features for non-IBM-users -----------------------------* * IBM VM cms : '*' in column 1 = comment line * * IBM: '&' as first character = dummy variable or command language * * IBM: LRECL : logical record length (number of bytes per record) * * IBM: -XXXX means: statement label with name XXXX * * IBM: CONWAIT : wait untill all messages to screen have been finished* * IBM: DESBUF : clear buffer for stack and terminal input/output * * IBM: &RETCODE : return code: if not = 0 : error in forgoing line * * ---------------------------------------------------------------------* * * START ---------------------------------------------------------------- * Set dummy 'END' for first calling parameter if there are none &FIRST = &1 * &INDEX is the number of parameters given with the present call &IF &INDEX EQ 0 &FIRST = END * Set CCODE (or dummy CCODE in case we have a help request) &CCODE = &FIRST * Erase a possibly existing DDJOB file (of a preceding DIRDIF run) ERASE FILE DDJOB * CONWAIT DESBUF * Write calling parameters in FILE DDJOB &STACK &FIRST &2 &3 &4 EXECIO 1 DISKW FILE DDJOB A 1 F 80 (FINIS * A possible existing DDSYST file must be erased ERASE FILE DDSYST * * What to do with old/existing LISTING files?? Erase ! ERASE &CCODE LISTING A ERASE IPR3 LISTING A * Necessary file assignments FILEDEF * CLEAR FILEDEF HELP DISK DIRDIF HELP * FILEDEF ORBASE DISK DIRDIF ORBASE * FILEDEF IPR2 DISK &CCODE LISTING A (RECFM F LRECL 132 FILEDEF IPR3 DISK IPR3 LISTING A (RECFM F LRECL 132 * Iniatiation of the cyclic calling procedure. Start with program * DDSTART which produces an initial control file FILE DDSYST. &EXPROG = DDSTART &GOTO -DDSTART -DDLOOP CONWAIT DESBUF * Read one line from the DDSYST file. The first word is a program - * name. In the course of the execution of the various programs the * control file DDSYST will be modified according to the outcome of * the various calculations. EXECIO 1 DISKR FILE DDSYST A &READ VARS &EXPROG &IF &EXPROG EQ STOP &GOTO -STOP -DDSTART * Execute program &EXPROG with NIJX subroutines appended. LOAD &EXPROG NIJX (START NOMAP CLEAR &GOTO -DDLOOP -STOP ERASE FILE DDJOB * ERASE FILE DDSYST * * The following print instruction has been blanked out: * PRINT &CCODE LISTING A (DEST ..... &TYPE The most important output has been written in file &CCODE LISTING &TYPE In case of problems, inspect IPR3 LISTING for more information. &TYPE Byebye from DIRDIF FILEDEF * CLEAR CONWAIT DESBUF &EXIT *END------------------------------------------------ end of DIRDIF EXEC Section 12. DIRDIF EXEC IBM EXEC with full file definitions =============================================================== &TRACE OFF ***** DIRDIF EXEC ***** DIRDIF EXECOM Section 12. ***** Nijmegen version ***** Update PTB: 5 Jan. 1995 *Recent modifications DIRDIF EXEC: * PTB: 5 Jan 95: tbv EXECOM * +--------------------------------------------------------------------+ * | DIRDIF EXEC | * | | * | Command procedure to execute the DIRDIF program system | * | | * | Paul T. Beurskens, G. Admiraal, Gezina Beurskens, W.P. Bosman, | * | Rene de Gelder, Randy Israel, and Jan M.M. Smits. | * | | * | Crystallography Laboratory, University if Nijmegen, | * | Toernooiveld, 6525 ED Nijmegen, The Netherlands | * +--------------------------------------------------------------------+ * | DIRDIF-94 Version 14 Dec. 1994. Operating system IBM: VM/CMS | * | This EXEC is the second DIRDIF command procedure file for IBM: cms| * +--------------------------------------------------------------------+ * * This EXEC is more sophisticated in that it * saves preceding print files and has variable disk storage options * * Filenames in this EXEC. * Within the FORTRAN programs the files are named according to their * function or type, e.g. filetype = CRYSDA, ATOMS, FREF, DDLOG, ....... * The default system translation is: FILE filetype A ! * We prefer to explicitely associate the CCODE with the filename, and * also to assign different minidisks for permanent files and scratch * files, therefor all data files are explicitely assigned below. * It is assumed that that all files relating to the compound CCODE are * stored in a minidisk denoted X-disk (filemode = X), except temporary * files which are stored in the T-disk (filemode = T). These file modes * are easily changed by changing &X and &T, see below. * Nevertheless, scratch files are automatically put in the A-disk, and * therefor the A-disk should not be too small. * The DIRDIF help file (DIRDIF HELP *) should also easily be recognized * as a permanent file (fixed format, LRECL 80), see below. * * Example: to run the MONOS test case, the appropriate data files are * MONOS FREF * reflection data * MONOS CRYSIN X crystal data input * MONOS ATMOD X model for ORIENT * MONOS ATOMS X one output file * where filemode '*' is used for read only, 'X' for mixed read/write. * * DISK definitions (filemodes): * temporary files: T permanent files: X * for binary data: temporary files: T4 permanent files: X4 * (for some permanent data files wild filemodes * are used) * It is assumed that the X-disk and T-disk have been accessed * by the user. The file modes X and T are easily changed, * see below: 'set file modes'. * ---------------------------------------------------------------------- * ---> tempry. files: ONLINE: T , BATCH: D , permanent files: X * ---> idem for binary data: T4 , BATCH: D4 , permanent files: X4 * (for test data files: X and X4 are replaced by T and T4 ) * (for some permanent data files wild filemodes * are used) * ---------------------------------------------------------------------- * Programs to be called are defined in the supervisor program DDSTART * All programs need the NIJX subroutine package (files NIJX1 + NIJX2) * Local command routines (EXEC's): LINKX, VMBATCH (see below) * ---------------------------------------------------------------------- * START ---------------------------------------------------------------- * See if we are in BATCH mode (&2 = 'BATCH' , &3 = USERID) &IF &INDEX LE 1 &GOTO -ONLINE &IF &2 NE BATCH &GOTO -ONLINE * Initiation BATCH * We are now in BATCH mode / No interactive action possible * Set &BATCH, file modes for tempry files, USERID (third parm.) &BATCH = YES * We have different conventions for file modes in BATCH .... so: &T = D &T4 = D4 * Get user-indentification USERID = third parameter &USERID = &3 &IF &INDEX GE 3 &GOTO -GOGO &TYPE There is no USERID : BATCH not allowed. &GOTO -BYEBYE -ONLINE * Initiation ONLINE / set switch &BATCH and set tempry file modes &BATCH = NO &T = T &T4 = T4 -GOGO * set dummy 'END' for first parameter in case there are no parameters &FIRST = &1 &IF &INDEX EQ 0 &FIRST = END * We now distinguish between the HELP request (without X-ray data) and * a proper call with a true compound code for crystallogr. calculations * Do we have a help request? If so, we don't need the X-disk &IF &FIRST EQ END &GOTO -HELP &IF &FIRST EQ ? &GOTO -HELP &IF &FIRST EQ H &GOTO -HELP &IF &FIRST EQ HELP &GOTO -HELP &IF &FIRST EQ CCODE &GOTO -HELP &IF &FIRST EQ BATCH &GOTO -HELP * We do have a proper call: the first parameter is the CCODE &CCODE = &1 * Here comes a local IBM feature: the permanent data files are stored * on the X-disk, special reserved for compound &CCODE. EXEC LINKX &CCODE * -------------- note: this IBM command causes in our LOCAL situation: * -------------- LINK and ACCESS a mini disk (X) with structural data. * -------------- We now set &X = X = file mode = disk address for CCODE &IF &RETCODE EQ 0 &GOTO -XDISKOK * In case the X-disk could not be linked (typing error?/ no X-disk?) -XNOTOK &TYPE LINKX &CCODE did not work: wrong compound code? * Alternatively, use the T-disk for tempry storage of permanent files * (this feature is only used for test runs) DESBUF &TYPE Enter Q to quit or enter T for test run (data on T-disk) &READ VARS &QORT &IF .&QORT EQ . &GOTO -XNOTOK &IF &QORT EQ Q &GOTO -STOP &IF &QORT EQ T &GOTO -TESTDISK &TYPE Answer incorrect: enter Q or T: we repeat: &GOTO -XNOTOK -XDISKOK &X = X &X4 = X4 &GOTO -WRITEDDJOB -TESTDISK &X = &T &X4 = &T4 &GOTO -WRITEDDJOB -HELP * Set dummy CCODE in case we have a help request &CCODE = CCODE * No X-ray data needed for HELP at a first meeting with DIRDIF. * Set dummy X-disk mode as T (&T and &T4 are defined above) &X = &T &X4 = &T4 -WRITEDDJOB * A possible existing DDJOB file must be erased ERASE &CCODE DDJOB &T CONWAIT DESBUF * write all parameters to file DDJOB / Unused params are blanks, * and the one record is filled with tailing blanks up to 80 columns &STACK &FIRST &2 &3 &4 EXECIO 1 DISKW &CCODE DDJOB &T 1 F 80 (FINIS * A possible existing DDSYST file must be erased ERASE &CCODE DDSYST &T * What to do with old/existing LISTING files?? Erase? Store? * The main printer output (IPR2 in FORTRAN) is named &CCODE LISTING * We wish to save the output listing of the last job: STATE &CCODE LISTING &T &IF &RETCODE GT 0 &GOTO -NOLIST ERASE &CCODE LISOLD &T RENAME &CCODE LISTING &T &CCODE LISOLD &T &TYPE File &CCODE LISTING &T has been renamed to &CCODE LISOLD &T -NOLIST * What to do with old/existing LISTING files?? Erase? Store? * The aux. printer output (IPR3 in FORTRAN) is named IPR3 LISTING STATE IPR3 LISTING &T &IF &RETCODE GT 0 &GOTO -START ERASE IPR3 LISOLD &T RENAME IPR3 LISTING &T IPR3 LISOLD &T &TYPE File IPR3 LISTING &T has been renamed to IPR3 LISOLD &T -START * here follow all possible file definitions (default LRECL 80 FILEDEF * CLEAR * input refl. data files (input file mode wild / never output) FILEDEF FREFA DISK &CCODE FREFA * (RECFM F LRECL 28 FILEDEF FREFB DISK &CCODE FREFB * (RECFM F LRECL 28 FILEDEF FREFC DISK &CCODE FREFC * (RECFM F LRECL 28 FILEDEF SHELX DISK &CCODE SHELX * (RECFM F LRECL 28 FILEDEF HKL DISK &CCODE HKL * FILEDEF CIF DISK &CCODE CIF * * refl. data files (maybe input from, or output to the X-disk) FILEDEF FREF DISK &CCODE FREF &X (RECFM F LRECL 28 * input refl. data file (XFO for incommensurate) ** FILEDEF XFO DISK &CCODE XFO * (RECFM F LRECL 32 **** TEMP sini LAS : FILEDEF XFO DISK &CCODE XFO * * other standard (?) file names in alphabetical order FILEDEF ATMOD DISK &CCODE ATMOD &X FILEDEF ATOLD DISK &CCODE ATOLD &X FILEDEF ATOMS DISK &CCODE ATOMS &X FILEDEF ATOUT DISK &CCODE ATOUT &X FILEDEF BINBIG DISK &CCODE BINBIG &T4 (RECFM VS BLKSIZE 32000 FILEDEF BINDOP DISK &CCODE BINDOP &T4 (RECFM V FILEDEF BINDIF DISK &CCODE BINDIF &T4 (RECFM V FILEDEF BINDUA DISK &CCODE BINDUA &T4 (RECFM V FILEDEF BINFC DISK &CCODE BINFC &T4 (RECFM V FILEDEF BINFC2 DISK &CCODE BINFC2 &T4 (RECFM V FILEDEF BINFFT DISK &CCODE BINFFT &T4 (RECFM V FILEDEF BINFO DISK &CCODE BINFO &X4 (RECFM V FILEDEF BINS DISK &CCODE BINS &T4 (RECFM V FILEDEF CAD4 DISK &CCODE CAD4 * FILEDEF CONDA DISK &CCODE CONDA &X FILEDEF CONDA2 DISK &CCODE CONDA2 &X FILEDEF CRYSDA DISK &CCODE CRYSDA &X FILEDEF CRYSIN DISK &CCODE CRYSIN &X FILEDEF HELP DISK DIRDIF HELP * FILEDEF ORBASE DISK DIRDIF ORBASE * FILEDEF ORUSER DISK DIRDIF ORUSER * FILEDEF DDJOB DISK &CCODE DDJOB &T FILEDEF DDLOG DISK &CCODE DDLOG &X FILEDEF DDSYST DISK &CCODE DDSYST &T FILEDEF E100 DISK &CCODE E100 &T FILEDEF FMAP DISK &CCODE FMAP &T4 (RECFM VS BLKSIZE 1024 FILEDEF FMAPT DISK &CCODE FMAPT &T4 (RECFM VS BLKSIZE 1024 1996: LIS1 and LIS2 : FILEDEF IPR2 DISK &CCODE LISTING &T (RECFM F LRECL 132 FILEDEF IPR3 DISK IPR3 LISTING &T (RECFM F LRECL 132 FILEDEF MFUN DISK &CCODE MFUN &T4 (RECFM V FILEDEF PDEK DISK &CCODE PDEK &T4 (RECFM V FILEDEF 5 TERM (LOWCASE FILEDEF 6 TERM &IF &BATCH EQ YES FILEDEF 6 DISP BATCH CONSOLE &T * Some special atomic parameter files FILEDEF ATMET DISK &CCODE ATMET &X FILEDEF ATTEST DISK ATTEST ATOUT &T FILEDEF XYZMET DISK &CCODE XYZMET &X FILEDEF XYZN DISK &CCODE XYZN &X FILEDEF XYZO DISK &CCODE XYZO &X FILEDEF SHELIN DISK &CCODE SHELIN &X FILEDEF RES DISK &CCODE RES &X FILEDEF INS DISK &CCODE INS &X * some local file definitions / not relevant for export FILEDEF BINA DISK &CCODE BINA &T4 (RECFM V FILEDEF BINB DISK &CCODE BINB &T4 (RECFM V FILEDEF BINC DISK &CCODE BINC &T4 (RECFM V FILEDEF FREFLP DISK &CCODE FREFLP * (RECFM F LRECL 28 FILEDEF BINLP DISK &CCODE BINLP &T4 (RECFM V * Iniatiation of the cyclic calling procedure. Always start with: &EXPROG = DDSTART &GOTO -DDSTART -DDLOOP CONWAIT DESBUF * read one line from the DDSYST file: first word is program-name: EXECIO 1 DISKR &CCODE DDSYST &T &READ VARS &EXPROG * so first word is program-name is &EXPROG .... is it? &IF &EXPROG EQ SENDBA &GOTO -SENDBA &IF &EXPROG EQ STOP &GOTO -STOP * so program-name indeed is &EXPROG: -DDSTART LOAD &EXPROG NIJX (START NOMAP CLEAR * The following test for FORTRAN statement STOP 1 is not needed * &IF &RETCODE NE 0 &GOTO -STOP &GOTO -DDLOOP -SENDBA * SEND job to BATCH / DDSTART did write SENDBA to the DDSYST file: &TYPE The JOB will be sent to BATCH. When the JOB has ended, the &TYPE LISTING file will not be printed! It is sent to your reader. CONWAIT * Get user-indentification USERID (needed to send a JOB to BATCH) DESBUF IDENTIFY (STACK &READ VARS &USERID ERASE DDBATCH EXEC &T DESBUF &STACK EXEC DIRDIF &CCODE BATCH &USERID EXECIO 1 DISKW DDBATCH EXEC &T DESBUF * VMBATCH is a procedure to schedule a batch job. EXEC VMBATCH SUBMIT DDBATCH EXEC &T (TIME (1800) DISKDUMP (YES) PRT(25) P &TYPE Note: the X-disk will be released and detached now because the &TYPE X-disk must be available for the execution of DIRDIF in BATCH. &BATCH = SENT -STOP ERASE &CCODE DDJOB &T ERASE &CCODE DDSYST &T STATE &CCODE LISTING &T &IF &RETCODE GT 0 &GOTO -BYEBYE &TYPE The most important output has been written in file &CCODE LISTING &TYPE In case of problems, inspect IPR3 LISTING for more information. -DUPOK * special care for BATCH &IF &BATCH EQ NO &GOTO -BYEBYE * REL X-disk if in BATCH or if sent to BATCH REL &X (DET * in BATCH, send file to your READER (CP SPOOL PUN) &IF &BATCH EQ SENT &GOTO -BYEBYE CP SPOOL PUN &USERID CLASS A DISK DUMP &CCODE LISTING &T CP SPOOL PUN CLOSE &TYPE File &CCODE LISTING &FM sent to the reader of &USERID CP SPOOL PUN &USERID CLASS A DISK DUMP BATCH CONSOLE &T CP SPOOL PUN CLOSE -BYEBYE &TYPE Bye bye from DIRDIF FILEDEF * CLEAR CONWAIT DESBUF &EXIT *END------------------------------------------------- end of DIRDIF EXEC Section 20. VAX IMPLEM VAX/VMS implementation instructions =============================================================== VAX IMPLEM ***** File: DIRDIF EXECOM Section 20. implementation instructions ***** Source: J.M.M. Smits Instructions to implement the DIRDIF program system on a VAX computer using the VAX/VMS operating system These implementation instructions consist of two parts: I. D I R D I F: Background information and important assumptions II. D I R D I F: Steps to take We strongly recommend that you first read the 'Background information and important assumptions' in Part I, especially about the directory in which the DIRDIF system is going to be stored (A1), before you proceed with the 'Steps to take' in Part II. The person responsible for the implementation should understand the reasons behind the following instructions and adapt them to the local situation. I. D I R D I F: Background information and important assumptions The complexity of the installation environment can range from very simple: one single user who has complete control over the system, e.g. a MicroVAX 2000 or II, to very complex: a multi-user mainframe shared by a number of departments and managed by some distant computing center. We distinguish two possible different situations: 1 You are the sole user of the system or you are the system manager of a multi-user system which belongs to the Crystallography Department. In VAX/VMS terminology you are the owner of the DIRDIF system: all other users are members of the same group. You can make DIRDIF available to all users but protect it from accidental deletion. You *can* create a first-level directory to store DIRDIF. 2 You have access to a multi-user mainframe using the VAX/VMS operating system. Either you are the only user of the DIRDIF program system or, in VAX/VMS terminology, all belonging to the same group, are going to use the DIRDIF program system. You are the one responsible for the implementation and management of the DIRDIF system. You are the owner of the DIRDIF program system: you can make this system available to all users but protect it from accidental deletion. You *cannot* create a first-level directory to store DIRDIF. The implementation instructions given here are generally applicable. Other implementations, and probably even more elegant implementations, are possible. Here follow our basic assumptions: A1 All files related to the DIRDIF program system will be stored in a (sub)directory called DIRDIF. If possible, this directory will be a first-level directory (situation 1), denoted [DIRDIF], or some subdirectory of the owner (situation 2), denoted [xxxxx.DIRDIF] where xxxxx can be anything. The file DIRDIF.ORUSER must not be stored in this directory: every user must get his or her private copy. A2 We assume that fairly common default priviledges have been granted to all users belonging to the group, i.e. they can read and execute files from other members of the group, but they cannot write the contents of these files. A3 The files belonging to the DIRDIF program system must be protected from accidental deletion by setting appropriate protection codes (normal default protection will take care of this as far as group members are concerned). This applies to all executables and command procedures. However, two files which must be available for listing, DIRDIF.HELP and DIRDIF.ORBASE, must get their own special -less strict- protection codes (see A2). A4 The user has the possibility to build and maintain his/her own small database of structural fragments, called DIRDIF.ORUSER. This file is an extension of the larger database called DIRDIF.ORBASE which is supplied with the system. When retrieving a fragment the system first searches the DIRDIF.ORUSER file and then, if unsuccessfull, the DIRDIF.ORBASE file. The ORUSER file is OPTIONAL, it need not be present or defined. Such an ORUSER file is a private, write-enabled file which should NOT be located in the [DIRDIF] directory and therefore the location is uncertain. IF the user wants to use an ORUSER file, an appropriate ASSIGNment must be made and it is the user's own responsibility to supply this ASSIGNment (or to ask the system manager to do so). The best place to do that is the user's private LOGIN.COM in his/her own default directory. A5 All data belonging to any particular structure to which the DIRDIF program system is applied must be stored in a (sub)directory dedicated to that particular structure. It is assumed that a compound is characterised by its codename (CCODE, restricted to at most six characters) and that all files relating to such a compound are stored in a directory of which the name has a meaningful relation to the compound code CCODE, e.g. [MONOS] or [xxxxxx.MONOS] for a compound with compound code MONOS. A6 Before using DIRDIF on a particular structure, the user MUST set the default directory to the (sub)directory belonging to that structure. Failing to do so will result in applying DIRDIF to a different compound or error stops because files cannot be found. Inside the FORTRAN programs all file-handling operations (INQUIRE, OPEN, CLOSE) refer to files in the default directory. The file-definitions used inside the programs are such that they are suitable for IBM computers as well as VAX computers or PC's, i.e. no directory-information is included. File-definitions reflect the function or contents of the file, not the compound to which they pertain. The VAX/VMS operating system automatically adds the extension .DAT to the files. For instance: [ABCDEF]ATOMS.DAT is a file with atomic parameters belonging to compound ABCDEF. [PQRST]CRYSDA.DAT is a file with pertinent crystal data belonging to compound PQRST. [IJKLMN]IPR2.DAT is a file with the most important output from any run of the system for compound IJKLMN. A7 Somehow the DIRDIF command procedure must be made available and known to all users of the DIRDIF program system..... .....somehow the programs belonging to the DIRDIF program system must be made available and known to the DIRDIF command procedure..... .....somehow the special files DIRDIF.HELP, DIRDIF.ORBASE and DIRDIF.ORUSER must be made available and known to the programs belonging to the DIRDIF program system. Therefore a number of ASSIGNments are given in a file DDASSIGN.COM which must be stored in the DIRDIF (sub)directory. This command procedure must be executed by every user prior to using the DIRDIF program system by executing it from every user's LOGIN.COM at login time. ************************************************************************ II. D I R D I F: Steps to take 1 Create the directory, e.g. [DIRDIF], which is going to contain all the files belonging to the DIRDIF program system, and make it the current directory; see assumption A1. 2 Get all the files belonging to the DIRDIF program system using FTP or unpack all files from DIRDIF.BCK/SAVE_SET from the TK50 tape (see separate instructions further on). You should have the following files: == The DDMAKE.COM command procedure; == The DDASSIGN.COM command procedure; == The DIRDIF.COM command procedure; == A file called DIRDIF.HELP with on-line HELP information, to be read and listed by programs belonging to the DIRDIF program system; == A file called DIRDIF.ORBASE with common structural fragments, to be read and listed by one of the programs of the DIRDIF program system; == A file called DIRDIF.ORUSER which is a supplement to DIRDIF.ORBASE and which is read and listed by the same program. Every user can add his or her own fragments to this file, and therefore every user should get his or her own copy of this file to start with. 3 Run the DDMAKE.COM command procedure to compile and link the individual programs: @DDMAKE 4 Special care should be taken with two files which must be available for listing by all group members. Therefore, reset their default protection: SET FILE/PROTECTION=(S:RWED,O:RWED,G:RWE,W) DIRDIF.HELP SET FILE/PROTECTION=(S:RWED,O:RWED,G:RWE,W) DIRDIF.ORBASE 5 A number of global assignments are made in DDASSIGN.COM and the system manager must adapt the very first executable statement in which the exact location of the [xxxxxx.DIRDIF] (sub)directory must be given. As part of this location a disk drive has been given, dua0:. Although this may be superfluous information, you had better include the correct disk drive to prevent difficulties. To find out how to change the right hand side of this statement: make the DIRDIF directory the current directory (SET DEF ...), give SHOW DEF and you will get the exact information you need to supply. This is the statement you should adapt: ddloc :== dua0:[xxxxxx.DIRDIF] 6 To make the system available to all users, adapt and include the following two statements in every user's private LOGIN.COM --------------------------------- $ @dua0:[xxxxxx.DIRDIF]DDASSIGN.COM $ ASSIGN "dua0:[mydir]dirdif.oruser" oruser in which the part dua0:[xxxxxx.DIRDIF] must be adapted using the same information as entered for 'ddloc' and in which the part dua0:[mydir] must be adapted to that particular user's situation. NEVER use another filename than DIRDIF.ORUSER. Mind that this assignments only take effect after the next login. 7 Supply each and every user with a private copy of DIRDIF.ORUSER and with copies of the data of the test structures MONOS and ATOX, all stored in appropriate (sub)directories belonging to each and every such user. 8 When storing the test data files provided with the system in their respective directories, make sure that these files are named according to the scheme given above. E.g. REN MONOS.CRYSIN CRYSIN.DAT REN MONOS.FREF FREF.DAT You are now ready to use the DIRDIF system. LOGOFF and LOGON again to let the assignments take effect. Make the directory containing the MONOS test data the current directory, mind the renames of the MONOS test files as mentioned above, and start testing as described in DIRDIF.IMPLEM . ------------------ end of VAX IMPLEM ----------------------------------- Section 21. DDMAKE.COM initiation VAX ========================================== $ ! DDMAKE.COM ***** File: DIRDIF.EXECOM Section 21. $ ! initiation VAX ***** Source: J.M.M. Smits $ ! ***** Update: 28 Oct. 1993 $ ! $ ! Command procedure for creating the EXE files for DIRDIF $ ! $ ! The DIRDIF program system is distributed such that all programs $ ! ( DDSTART CRYSDA MERBIN DDMAIN PATTY ORIENT TRACOR PHASEX FOUR NUTS $ ! and MISFIT ) must be LINKed with the NIJX subroutines (supplied in $ ! the two files: NIJX1.FORVAX and NIJX2.FOR ). $ ! $ ! For details about the DIRDIF and 'CCODE' directories, see DIRDIF.COM $ ! $ DELESIL = "NOCONFIRM/NOLOG" $ FORTSIL = "NOLIST/NOWARN" $ LINKSIL = "NOMAP/NOSYMB" $ TYPE SYS$INPUT ********************************************************************* * DDMAKE: compile and LINK the DIRDIF system components * ********************************************************************* $ IF F$SEARCH("NIJX1.FORVAX").EQS."" THEN GOTO NONIJX1 $ IF F$SEARCH("NIJX2.FOR") .EQS."" THEN GOTO NONIJX2 $ COPY/'DELESIL' NIJX1.FORVAX,NIJX2.FOR NIJX.FOR $ IF F$SEARCH("NIJX.FOR").EQS."" THEN GOTO NONIJX $ WRITE SYS$OUTPUT "Compile NIJX routines, create NIJX library" $ FORT/'FORTSIL' NIJX $ IF F$SEARCH("NIJX.OBJ").EQS."" THEN GOTO NONIJXOBJ $ IF F$SEARCH("NIJX.LIS").NES."" THEN DELE/'DELESIL' NIJX.LIS;* $ IF F$SEARCH("NIJX.OLB").NES."" THEN DELE/'DELESIL' NIJX.OLB;* $ LIBRARY/CREATE/NOLOG/LIST=NIJX.LIS NIJX NIJX $ DELE/'DELESIL' NIJX.OBJ;* $ IF F$SEARCH("NIJX.OLB").EQS."" THEN GOTO NOLIBRARY $ ! $ NERROR = 0 $ WRITE SYS$OUTPUT "" $ ! $ WRITE SYS$OUTPUT "Compile and LINK system component 01/11 CRYSDA" $ IF F$SEARCH("CRYSDA.FOR") .NES."" THEN FORT/'FORTSIL' CRYSDA $ IF F$SEARCH("CRYSDA.EXE") .NES."" THEN DELE/'DELESIL' CRYSDA.EXE;* $ IF F$SEARCH("CRYSDA.OBJ") .NES."" THEN LINK/'LINKSIL' CRYSDA,NIJX/LIB $ IF F$SEARCH("CRYSDA.OBJ") .NES."" THEN DELE/'DELESIL' CRYSDA.OBJ;* $ IF F$SEARCH("CRYSDA.EXE") .NES."" THEN GOTO MERBIN $ NERROR = 1 $ WRITE SYS$OUTPUT "Unable to create CRYSDA.EXE continue..." $ ! $ MERBIN: $ WRITE SYS$OUTPUT "Compile and LINK system component 02/11 MERBIN" $ IF F$SEARCH("MERBIN.FOR") .NES."" THEN FORT/'FORTSIL' MERBIN $ IF F$SEARCH("MERBIN.EXE") .NES."" THEN DELE/'DELESIL' MERBIN.EXE;* $ IF F$SEARCH("MERBIN.OBJ") .NES."" THEN LINK/'LINKSIL' MERBIN,NIJX/LIB $ IF F$SEARCH("MERBIN.OBJ") .NES."" THEN DELE/'DELESIL' MERBIN.OBJ;* $ IF F$SEARCH("MERBIN.EXE") .NES."" THEN GOTO DDSTART $ NERROR = 1 $ WRITE SYS$OUTPUT "Unable to create MERBIN.EXE continue..." $ ! $ DDSTART: $ WRITE SYS$OUTPUT "Compile and LINK system component 03/11 DDSTART" $ IF F$SEARCH("DDSTART.FOR").NES."" THEN FORT/'FORTSIL' DDSTART $ IF F$SEARCH("DDSTART.EXE").NES."" THEN DELE/'DELESIL' DDSTART.EXE;* $ IF F$SEARCH("DDSTART.OBJ").NES."" THEN LINK/'LINKSIL' DDSTART,NIJX/LIB $ IF F$SEARCH("DDSTART.OBJ").NES."" THEN DELE/'DELESIL' DDSTART.OBJ;* $ IF F$SEARCH("DDSTART.EXE").NES."" THEN GOTO PATTY $ NERROR = 1 $ WRITE SYS$OUTPUT "Unable to create DDSTART.EXE continue..." $ ! $ PATTY: $ WRITE SYS$OUTPUT "Compile and LINK system component 04/11 PATTY" $ IF F$SEARCH("PATTY.FOR") .NES."" THEN FORT/'FORTSIL' PATTY $ IF F$SEARCH("PATTY.EXE") .NES."" THEN DELE/'DELESIL' PATTY.EXE;* $ IF F$SEARCH("PATTY.OBJ") .NES."" THEN LINK/'LINKSIL' PATTY,NIJX/LIB $ IF F$SEARCH("PATTY.OBJ") .NES."" THEN DELE/'DELESIL' PATTY.OBJ;* $ IF F$SEARCH("PATTY.EXE") .NES."" THEN GOTO ORIENT $ NERROR = 1 $ WRITE SYS$OUTPUT "Unable to create PATTY.EXE continue..." $ ! $ ORIENT: $ WRITE SYS$OUTPUT "Compile and LINK system component 05/11 ORIENT" $ IF F$SEARCH("ORIENT.FOR") .NES."" THEN FORT/'FORTSIL' ORIENT $ IF F$SEARCH("ORIENT.EXE") .NES."" THEN DELE/'DELESIL' ORIENT.EXE;* $ IF F$SEARCH("ORIENT.OBJ") .NES."" THEN LINK/'LINKSIL' ORIENT,NIJX/LIB $ IF F$SEARCH("ORIENT.OBJ") .NES."" THEN DELE/'DELESIL' ORIENT.OBJ;* $ IF F$SEARCH("ORIENT.EXE") .NES."" THEN GOTO TRACOR $ NERROR = 1 $ WRITE SYS$OUTPUT "Unable to create ORIENT.EXE continue..." $ ! $ TRACOR: $ WRITE SYS$OUTPUT "Compile and LINK system component 06/11 TRACOR" $ IF F$SEARCH("TRACOR.FOR") .NES."" THEN FORT/'FORTSIL' TRACOR $ IF F$SEARCH("TRACOR.EXE") .NES."" THEN DELE/'DELESIL' TRACOR.EXE;* $ IF F$SEARCH("TRACOR.OBJ") .NES."" THEN LINK/'LINKSIL' TRACOR,NIJX/LIB $ IF F$SEARCH("TRACOR.OBJ") .NES."" THEN DELE/'DELESIL' TRACOR.OBJ;* $ IF F$SEARCH("TRACOR.EXE") .NES."" THEN GOTO DDMAIN $ NERROR = 1 $ WRITE SYS$OUTPUT "Unable to create TRACOR.EXE continue..." $ ! $ DDMAIN: $ WRITE SYS$OUTPUT "Compile and LINK system component 07/11 DDMAIN" $ IF F$SEARCH("DDMAIN.FOR") .NES."" THEN FORT/'FORTSIL' DDMAIN $ IF F$SEARCH("DDMAIN.EXE") .NES."" THEN DELE/'DELESIL' DDMAIN.EXE;* $ IF F$SEARCH("DDMAIN.OBJ") .NES."" THEN LINK/'LINKSIL' DDMAIN,NIJX/LIB $ IF F$SEARCH("DDMAIN.OBJ") .NES."" THEN DELE/'DELESIL' DDMAIN.OBJ;* $ IF F$SEARCH("DDMAIN.EXE") .NES."" THEN GOTO PHASEX $ NERROR = 1 $ WRITE SYS$OUTPUT "Unable to create DDMAIN.EXE continue..." $ ! $ PHASEX: $ WRITE SYS$OUTPUT "Compile and LINK system component 08/11 PHASEX" $ IF F$SEARCH("PHASEX.FOR") .NES."" THEN FORT/'FORTSIL' PHASEX $ IF F$SEARCH("PHASEX.EXE") .NES."" THEN DELE/'DELESIL' PHASEX.EXE;* $ IF F$SEARCH("PHASEX.OBJ") .NES."" THEN LINK/'LINKSIL' PHASEX,NIJX/LIB $ IF F$SEARCH("PHASEX.OBJ") .NES."" THEN DELE/'DELESIL' PHASEX.OBJ;* $ IF F$SEARCH("PHASEX.EXE") .NES."" THEN GOTO FOUR $ NERROR = 1 $ WRITE SYS$OUTPUT "Unable to create PHASEX.EXE continue..." $ ! $ FOUR: $ WRITE SYS$OUTPUT "Compile and LINK system component 09/11 FOUR" $ IF F$SEARCH("FOUR.FOR") .NES."" THEN FORT/'FORTSIL' FOUR $ IF F$SEARCH("FOUR.EXE") .NES."" THEN DELE/'DELESIL' FOUR.EXE;* $ IF F$SEARCH("FOUR.OBJ") .NES."" THEN LINK/'LINKSIL' FOUR,NIJX/LIB $ IF F$SEARCH("FOUR.OBJ") .NES."" THEN DELE/'DELESIL' FOUR.OBJ;* $ IF F$SEARCH("FOUR.EXE") .NES."" THEN GOTO NUTS $ NERROR = 1 $ WRITE SYS$OUTPUT "Unable to create FOUR.EXE continue..." $ ! $ NUTS: $ WRITE SYS$OUTPUT "Compile and LINK system component 10/11 NUTS" $ IF F$SEARCH("NUTS.FOR") .NES."" THEN FORT/'FORTSIL' NUTS $ IF F$SEARCH("NUTS.EXE") .NES."" THEN DELE/'DELESIL' NUTS.EXE;* $ IF F$SEARCH("NUTS.OBJ") .NES."" THEN LINK/'LINKSIL' NUTS,NIJX/LIB $ IF F$SEARCH("NUTS.OBJ") .NES."" THEN DELE/'DELESIL' NUTS.OBJ;* $ IF F$SEARCH("NUTS.EXE") .NES."" THEN GOTO MISFIT $ NERROR = 1 $ WRITE SYS$OUTPUT "Unable to create NUTS.EXE continue..." $ ! $ MISFIT: $ WRITE SYS$OUTPUT "Compile and LINK system component 11/11 MISFIT" $ IF F$SEARCH("MISFIT.FOR") .NES."" THEN FORT/'FORTSIL' MISFIT $ IF F$SEARCH("MISFIT.EXE") .NES."" THEN DELE/'DELESIL' MISFIT.EXE;* $ IF F$SEARCH("MISFIT.OBJ") .NES."" THEN LINK/'LINKSIL' MISFIT,NIJX/LIB $ IF F$SEARCH("MISFIT.OBJ") .NES."" THEN DELE/'DELESIL' MISFIT.OBJ;* $ IF F$SEARCH("MISFIT.EXE") .NES."" THEN GOTO READY $ NERROR = 1 $ WRITE SYS$OUTPUT "Unable to create MISFIT.EXE continue..." $ ! $ READY: $ IF NERROR .EQ. 1 THEN GOTO ERROR $ TYPE SYS$INPUT ****** DIRDIF program system created successfully ! ****** $ GOTO STOP $ ! $ ERROR: $ TYPE SYS$INPUT ***** WARNING ***** Not all system components could be created successfully ***** Check the presence of the required FORTRAN source files ***** Try again after remedial action $ GOTO STOP $ ! $ NONIJX1: $ WRITE SYS$OUTPUT "Fatal error, file NIJX1.FORVAX missing" $ GOTO STOP $ ! $ NONIJX2: $ WRITE SYS$OUTPUT "Fatal error, file NIJX2.FOR missing" $ GOTO STOP $ ! $ NONIJX: $ WRITE SYS$OUTPUT "Fatal error, file NIJX.FOR not created" $ GOTO STOP $ ! $ NONIJXOBJ: $ WRITE SYS$OUTPUT "Fatal compilation error, file NIJX.OBJ not created" $ GOTO STOP $ ! $ NOLIBRARY: $ WRITE SYS$OUTPUT "Fatal error, unable to create NIJX library" $ GOTO STOP $ ! $ ! end of DDMAKE.COM $ STOP: $ ! $ ! end of DDMAKE.COM Section 22. DIRDIF.COM VAX command procedure to run DIRDIF =============================================================== $ ! DIRDIF.COM ***** File: DIRDIF EXECOM Section 22. $ ! simple Nijmegen version ***** Source: J.M.M. Smits $ ! Update 28 Oct. 93 | $ !--------------------------------------------------------------------- $ ! DIRDIF.COM | $ ! | $ ! Command procedure to execute the DIRDIF program system | $ ! | $ ! Paul T. Beurskens, G. Admiraal, Gezina Beurskens, W.P. Bosman, | $ ! Rene de Gelder, Randy Israel, and Jan M.M. Smits. | $ ! | $ ! Crystallography Laboratory, University of Nijmegen, | $ ! Toernooiveld, 6525 ED Nijmegen, The Netherlands | $ ! | $ !--------------------------------------------------------------------- $ ! DIRDIF-94 Version 14 Dec. 1994 Language: VAX VMS | $ !--------------------------------------------------------------------- $ ! $ ! Normal calling sequence: DIRDIF CCODE $ ! or to invoke help: DIRDIF H $ ! or for special options: DIRDIF P1 P2 P3 $ ! where P1 P2 P3 are parameters for this run. $ ! $ ! The first parameter usually is the compound code, denoted: CCODE . $ ! It is assumed that a compound is characterised by this codename $ ! (restricted to at most six characters) and that all files relating $ ! to such a compound are stored in a directory DUA0:['CCODE'] . $ ! (The literal string 'CCODE' is not a suitable compound name.) $ ! If the first parameter is H : invoke the DIRDIF help routine. $ ! Other parameters usually are not needed (P2 = P3 = blank). $ ! The calling parameters are sent to the file DDJOB.DAT . $ ! They are read, tested and/or executed by a FORTRAN program DDSTART. $ ! $ !===================================================================== $ !===================================================================== $ ! $ ! Check the calling parameters, to be sent to file DDJOB. $ ! The first parameter usually is the compound code, denoted: CCODE $ ! If the first parameter is H : invoke the DIRDIF help routine. $ ! If no parameter (P1 = blank) or if the first parameter equals: HELP $ ! or ? or CCODE or BATCH: call DDSTART without file assignements. $ ! Other parameter (BATCH or special options) usually are not needed; $ ! if present, they are also sent to the DDJOB file. $ ! $ ! Do we have a HELP request? If so, we don't need to set the directory $ IF P1 .EQS. "" THEN GOTO HELP $ IF P1 .EQS. "?" THEN GOTO HELP $ IF P1 .EQS. "H" THEN GOTO HELP $ IF P1 .EQS. "HELP" THEN GOTO HELP $ IF P1 .EQS. "CCODE" THEN GOTO HELP $ IF P1 .EQS. "BATCH" THEN GOTO HELP $ ! $ ! BATCH as the second parameter may only be used in batch environment! $ ! This keyword must never be supplied in this position by the user: in $ ! this way it is reserved for the system (i.e. generated by DDSTART). $ ! Batch execution is initiated by answering the appropriate question $ ! in DDSTART while still in interactive mode, or, in automatic mode, $ ! by giving the keyword BATCH as the THIRD parameter..... $ ! $ IF P2 .NES. "BATCH" THEN GOTO BATCHOK $ ENVIR = F$GETJPI( "", "MODE" ) $ IF ENVIR .EQS. "BATCH" THEN GOTO BATCHOK $ WRITE SYS$OUTPUT "Wrong use of the keyword BATCH. Call HELP invoked." $ P1 = "HELP" $ P2 = "" $ P3 = "" $ GOTO HELP $ ! $ BATCHOK: $ ! We do have a proper call: the first parameter is the CCODE $ CCODE = P1 $ GOTO OKOK $ ! $ HELP: $ ! Set dummy CCODE in case we have a HELP request. $ CCODE = "CCODE" $ ! $ OKOK: $ ! $ ! Set dummy for first parameter in case there are no parameters $ FIRST = P1 $ IF P1 .EQS. "" THEN FIRST = "END" $ WRITE SYS$OUTPUT FIRST," ",P2," ",P3," written to file DDJOB" $ ! $ IF F$SEARCH("DDJOB.DAT") .NES. "" THEN DELETE DDJOB.DAT;* $ ! Write all parameters to DDJOB.DAT $ OPEN/WRITE DDJOB_FILE DDJOB.DAT $ WRITE DDJOB_FILE FIRST," ",P2," ",P3 $ CLOSE DDJOB_FILE $ ! $ IF F$SEARCH("DDSYST.DAT") .NES. "" THEN DELETE DDSYST.DAT;* $ ! $ IF F$SEARCH("IPR2.DAT") .EQS. "" THEN GOTO NOLIST $ IF F$SEARCH("IPR2.OLD") .NES. "" THEN DELETE IPR2.OLD;* $ RENAME IPR2.DAT;* IPR2.OLD;* $ WRITE SYS$OUTPUT "File IPR2.DAT has been renamed to IPR2.OLD" $ ! $ NOLIST: $ IF F$SEARCH("IPR3.DAT") .EQS. "" THEN GOTO START $ IF F$SEARCH("IPR3.OLD") .NES. "" THEN DELETE IPR3.OLD;* $ RENAME IPR3.DAT;* IPR3.OLD;* $ WRITE SYS$OUTPUT "File IPR3.DAT has been renamed to IPR3.OLD" $ ! $ START: $ EXPROG = "DIRDIF_DDSTART" $ GOTO DDSTART $ ! $ DDLOOP: $ OPEN/READ/ERROR=DDSYST_ERROR DDSYST_FILE DDSYST.DAT $ READ/END_OF_FILE=DDSYST_EOF DDSYST_FILE LINE $ CLOSE DDSYST_FILE $ EXPROG = F$EXTRACT(0,7,LINE) $ ! $ IF EXPROG .EQS. "SENDBA " THEN GOTO BATCH $ IF EXPROG .EQS. "SENDBA" THEN GOTO BATCH $ IF EXPROG .EQS. "STOP " THEN GOTO STOP $ IF EXPROG .EQS. "STOP" THEN GOTO STOP $ EXPROG = "DIRDIF_" + EXPROG $ ! $ ! Crucial statement: execute program named EXPROG $ DDSTART: $ DEFINE/USER_MODE SYS$INPUT SYS$COMMAND $ 'EXPROG' $ GOTO DDLOOP $ ! $ DDSYST_EOF: $ WRITE SYS$OUTPUT "Premature EOF encountered on DDSYST file, exit." $ GOTO STOP $ ! $ DDSYST_ERROR: $ WRITE SYS$OUTPUT "Error on opening DDSYST file, exit." $ ! $ STOP: $ ! $ IF F$LOGICAL("DDSYST_FILE") .NES. "" THEN CLOSE DDSYST_FILE $ IF F$SEARCH("DDJOB.DAT") .NES. "" THEN DELETE DDJOB.DAT;* $ IF F$SEARCH("DDSYST.DAT") .NES. "" THEN DELETE DDSYST.DAT;* $ TYPE SYS$INPUT *** The most important output has been written in file IPR2.DAT * *** In case of problems, inspect IPR3.DAT for more information. * $ WRITE SYS$OUTPUT "Bye bye from DIRDIF" $ ! $ EXIT $ ! $ BATCH: $ ! Batch execution requested in DDSTART: delete a possible old command $ ! procedure file DDBATCH.COM from a previous run and create a new one. $ ! Delete the DDJOB.DAT and DDSYST.DAT files just created: they will be $ ! recreated during execution in batch. $ ! The CONDA.DAT file just created is used in the submitted job. $ ! $ IF F$SEARCH("DDBATCH.COM") .NES. "" THEN DELETE DDBATCH.COM;* $ OPEN/WRITE DDBATCH_FILE DDBATCH.COM $ WRITE DDBATCH_FILE "$ DIRDIF ''CCODE' BATCH" $ WRITE DDBATCH_FILE "$ EXIT" $ CLOSE DDBATCH_FILE $ IF F$SEARCH("DDJOB.DAT") .NES. "" THEN DELETE DDJOB.DAT;* $ IF F$SEARCH("DDSYST.DAT") .NES. "" THEN DELETE DDSYST.DAT;* $ ! $ ! The SUBMIT command given here can be adapted in many ways to your $ ! local needs and queues. However, be careful when requesting a LOG $ ! file: it tends to be rather long because this command procedure will $ ! be written into it completely, and the statements in the program $ ! loop will be written over and over again. $ ! $ SUBMIT/NOLOG/NOPRINT/NOTIFY DDBATCH.COM $ ! $ ! End of DIRDIF.COM = DIRDIF VAX command procedure file Section 23. DDASSIGN.COM VAX command proc. to set assignments ================================================================ $ ! DDASSIGN.COM ***** File: DIRDIF EXECOM Section 23. $ ! VAX assignments ***** Source: J.M.M. Smits $ ! | $ ! Command procedure to set the necessary assignments | $ ! DIRDIF-94 Version 14 Dec. 1994 Language: VAX VMS | $ ! | $ ddloc :== dua0:[dirdif] $! $! Adapt the statement above to reflect your local situation; $! See the VAX/VMS implementation instructions for details. $! $ dirdif_crysda :== run 'ddloc'crysda $ dirdif_ddmain :== run 'ddloc'ddmain $ dirdif_ddstart :== run 'ddloc'ddstart $ dirdif_patty :== run 'ddloc'patty $ dirdif_phasex :== run 'ddloc'phasex $ dirdif_four :== run 'ddloc'four $ dirdif_merbin :== run 'ddloc'merbin $ dirdif_nuts :== run 'ddloc'nuts $ dirdif_orient :== run 'ddloc'orient $ dirdif_tracor :== run 'ddloc'tracor $ dirdif :== @'ddloc'dirdif.com $ ASSIGN 'ddloc'"dirdif.help" help $ ASSIGN 'ddloc'"dirdif.orbase" orbase Section 30. UNIX / AIX / ULTRIX introduction ============================================= --------------------------------------- File: DIRDIF EXECOM Section 30. Finally, (3 Aug. 1993) we have all Unix problems solved (nock-nock). The following scripts are available: 1996: see files: DDMAKE.* and IMPLEM.* and others. Section 31. Simple Script for COMPILING DIRDIF on RISC / AIX Section 32. Simple Script for COMPILING DIRDIF on DEC / ULTRIX Section 33. Simple Script for COMPILING DIRDIF on SUN / UNIX Section 34. Simple Script for EXECUTING DIRDIF C-shell Section 35. Advanced Script K-Sh for COMPILING DIRDIF on RISC/ AIX Section 36. Advanced Script K-Sh COMPILING DIRDIF on DEC / ULTRIX Section 37. ---> Script for EXECUTING DIRDIF. K+B-shell Section 38. ---> Script for EXECUTING DIRDIF. C-shell Note: in the DDMAKE scripts for compiling, the Fortran files XXXXX.FOR (upper case !) will be moved to source/xxxxx.f (lower case). The executable files are put into bin/XXXXX (upper case). DIRDIF.HELP, DIRDIF.ORBASE and DIRDIF.ORUSER must be renamed to dirdif.help, dirdif.orbase and dirdif.oruser (lower case). The names of all files related to the structure at hand (mimicked: CCODE) must (are, will) be written in upper case. Examples: CRYSIN and FREF (files needed for testing !). Scripts have been used on the following computers: DEC5000, DEC5001, SUN computers, SPARCS workstations, Silicon Graphics, and RISC 6000 AIX or AIX Windows. We expect that these scrips can also be used for HP and Convex under UNIX, but one must be aware of possible (local) differences, even for the systems mentioned above. We thank H.J. Bruins Slot, A.L. Spek, J.P. Declercq, G. Baudoux and R. Driessen for help and useful suggestions. Section 31. Simple Script for COMPILING DIRDIF on RISC / AIX ============================================================= ---------------------------------------------- for all Shells --------------------------------------- File: DIRDIF EXECOM Section 31. # +--------------------------------------------------------------------+ # | DIRDIF-94 | # | | # | Script for COMPILING DIRDIF on RISC / AIX All Shells | # +--------------------------------------------------------------------+ # | Last modification 03-08-1993 by Rene de Gelder. | # | We thank H.J. Bruins Slot, A.L. Spek, J.P. Declerq, | # | G. Baudoux & R. Driessen for their kind help in setting up | # | DIRDIF under Unix, Ultrix and AIX! | # +--------------------------------------------------------------------+ # | Specifications of THIS script: | # | Shell: C shell, Bourne shell & Korn Shell | # | Computer: IBM Risc 6000/320: AIX. | # | | # | Notes: -This script can only be executed if its permission | # | mode is 'execute'. | # | This may be set by the command: chmod u+x Thisfile | # | -A similar but more advanced script for the | # | Bourne & Korn shell is also available. | # +--------------------------------------------------------------------+ mkdir bin mkdir source # Files obtained by ftp are assumed to be in upper case! mv NIJX1.FORAIX source/nijx1.f mv NIJX2.FOR source/nijx2.f mv CRYSDA.FOR source/crysda.f mv DDMAIN.FOR source/ddmain.f mv DDSTART.FOR source/ddstart.f mv FOUR.FOR source/four.f mv MERBIN.FOR source/merbin.f mv NUTS.FOR source/nuts.f mv ORIENT.FOR source/orient.f mv PATTY.FOR source/patty.f mv PHASEX.FOR source/phasex.f mv TRACOR.FOR source/tracor.f # concatenate nijx1 and nijx2 to nijx.f cat source/nijx1.f >> source/nijx.f cat source/nijx2.f >> source/nijx.f # now .f files must be present cd source xlf -c nijx.f xlf -o ../bin/CRYSDA crysda.f nijx.o xlf -o ../bin/DDMAIN ddmain.f nijx.o xlf -o ../bin/DDSTART ddstart.f nijx.o xlf -o ../bin/FOUR four.f nijx.o xlf -o ../bin/MERBIN merbin.f nijx.o xlf -o ../bin/NUTS nuts.f nijx.o xlf -o ../bin/ORIENT orient.f nijx.o xlf -o ../bin/PATTY patty.f nijx.o xlf -o ../bin/PHASEX phasex.f nijx.o xlf -o ../bin/TRACOR tracor.f nijx.o # cd .. Section 32. Simple Script for COMPILING DIRDIF on DEC / ULTRIX ================================================================== --------------------------------------- File: DIRDIF EXECOM Section 32. # ---------------------------------------------------------------------- # | DIRDIF-94 | # | | # | Script for COMPILING DIRDIF on DEC / ULTRIX All Shells | # ---------------------------------------------------------------------- # | Last modification 03-08-1993 by Rene de Gelder. | # | We thank H.J. Bruins Slot, A.L. Spek, J.P. Declerq, | # | G. Baudoux & R. Driessen for their kind help in setting up | # | DIRDIF under Unix, Ultrix and AIX! | # ---------------------------------------------------------------------- # | Specifications of THIS script: | # | Shell: C shell, Bourne shell & Korn Shell | # | Computer: DEC5000: ULTRIX. | # | | # | Notes: -This script can only be executed if its permission | # | mode is 'execute'. | # | This may be set by the command: chmod u+x Thisfile | # | -A similar but more advanced script for the | # | Bourne & Korn shell is also available. | # ---------------------------------------------------------------------- mkdir bin mkdir source # Files obtained by ftp are assumed to be in upper case! mv NIJX1.FORAIX source/nijx1.f mv NIJX2.FOR source/nijx2.f mv CRYSDA.FOR source/crysda.f mv DDMAIN.FOR source/ddmain.f mv DDSTART.FOR source/ddstart.f mv FOUR.FOR source/four.f mv MERBIN.FOR source/merbin.f mv NUTS.FOR source/nuts.f mv ORIENT.FOR source/orient.f mv PATTY.FOR source/patty.f mv PHASEX.FOR source/phasex.f mv TRACOR.FOR source/tracor.f # concatenate nijx1 and nijx2 to nijx.f cat source/nijx1.f >> source/nijx.f cat source/nijx2.f >> source/nijx.f # now .f files must be present cd source # No optimization is specified. Change if desired but be careful! f77 -static -c -O0 nijx.f f77 -static -o ../bin/CRYSDA -O0 crysda.f nijx.o f77 -static -o ../bin/DDMAIN -O0 ddmain.f nijx.o f77 -static -o ../bin/DDSTART -O0 ddstart.f nijx.o f77 -static -o ../bin/FOUR -O0 four.f nijx.o f77 -static -o ../bin/MERBIN -O0 merbin.f nijx.o f77 -static -o ../bin/NUTS -O0 nuts.f nijx.o f77 -static -o ../bin/ORIENT -O0 orient.f nijx.o f77 -static -o ../bin/PATTY -O0 patty.f nijx.o f77 -static -o ../bin/PHASEX -O0 phasex.f nijx.o f77 -static -o ../bin/TRACOR -O0 tracor.f nijx.o # cd .. Section 33. Simple Script for COMPILING DIRDIF on SUN / UNIX ================================================================ --------------------------------------- File: DIRDIF EXECOM Section 33. # ---------------------------------------------------------------------- # | DIRDIF-94 | # | | # | Script for COMPILING DIRDIF on SUN / UNIX All Shells | # ---------------------------------------------------------------------- # | Last modification 03-08-1993 by Rene de Gelder. | # | We thank H.J. Bruins Slot, A.L. Spek, J.P. Declerq, | # | G. Baudoux & R. Driessen for their kind help in setting up | # | DIRDIF under Unix, Ultrix and AIX! | # ---------------------------------------------------------------------- # | Specifications of THIS script: | # | Shell: C shell, Bourne shell & Korn Shell | # | Computer: Sun: Unix. | # | | # | This script can only be executed if its permission mode is 'execute' # | This may be set by the command: chmod u+x Thisfile | # ---------------------------------------------------------------------- mkdir bin mkdir source # Files obtained by ftp are assumed to be in upper case! mv NIJX1.FORUNX source/nijx1.f mv NIJX2.FOR source/nijx2.f mv CRYSDA.FOR source/crysda.f mv DDMAIN.FOR source/ddmain.f mv DDSTART.FOR source/ddstart.f mv FOUR.FOR source/four.f mv MERBIN.FOR source/merbin.f mv NUTS.FOR source/nuts.f mv ORIENT.FOR source/orient.f mv PATTY.FOR source/patty.f mv PHASEX.FOR source/phasex.f mv TRACOR.FOR source/tracor.f # concatenate nijx1 and nijx2 to nijx.f cat source/nijx1.f >> source/nijx.f cat source/nijx2.f >> source/nijx.f # now .f files must be present cd source # use -native to use the optimum local floating point hardware # use -static to save values of variables at subroutine exit # use -lV77 to use the library of VMS routines (date and time) # use -O4 for maximum optimisation # First, create a random library of general purpose routines (nijx) f77 -c -native -static -lV77 -O4 nijx.for ar cr nijx.a nijx.o ranlib nijx.a # Compile and link the individual programs. Mind the capitals f77 -native -static -lV77 -o CRYSDA -O4 crysda.for nijx.a f77 -native -static -lV77 -o DDMAIN -O4 ddmain.for nijx.a f77 -native -static -lV77 -o DDSTART -O4 ddstart.for nijx.a f77 -native -static -lV77 -o FOUR -O4 four.for nijx.a f77 -native -static -lV77 -o MERBIN -O4 merbin.for nijx.a f77 -native -static -lV77 -o NUTS -O4 nuts.for nijx.a f77 -native -static -lV77 -o ORIENT -O4 orient.for nijx.a f77 -native -static -lV77 -o PATTY -O4 patty.for nijx.a f77 -native -static -lV77 -o PHASEX -O4 phasex.for nijx.a f77 -native -static -lV77 -o TRACOR -O4 tracor.for nijx.a cd .. Section 34. Simple Script for EXECUTING DIRDIF C-shell ============================================================== --------------------------------------- File: DIRDIF EXECOM Section 34. #!/bin/csh # ---------------------------------------------------------------------- # | DIRDIF-94 | # | | # | Paul T. Beurskens, G. Admiraal, Gezina Beurskens, W.P. Bosman, | # | Rene de Gelder, Randy Israel, and Jan M.M. Smits. | # | | # | Crystallography Laboratory, University of Nijmegen, | # | Toernooiveld, 6525 ED Nijmegen, The Netherlands. | # | | # ---------------------------------------------------------------------- # | Simple script for EXECUTING the program system DIRDIF | # | Last modification 05-08-1993 by Rene de Gelder. | # | We thank H.J. Bruins Slot, A.L. Spek, J.P. Declerq, | # | G. Baudoux & R. Driessen for their kind help in setting up | # | DIRDIF under Unix, Ultrix and AIX! | # ---------------------------------------------------------------------- # | Specifications of THIS script: | # | Shell: C shell | # | Tested on computer: IBM Risc 6000/320, DEC5000 | # | | # | This script can only be executed if its permission mode is 'execute' # | This may be set by the command: chmod u+x Thisfile | # | A similar but more advanced script for the C shell, | # | Bourne shell and/or Korn shell is also available. | # | | # | In case of problems please contact one of the following persons: | # | | # | Paul T. Beurskens, E-mail: u625002 at hnykun11.urc.kun.nl | # | Jan M.M. Smit, E-mail: u625021 at hnykun11.urc.kun.nl | # | Rene de Gelder, E-mail: u625018 at hnykun11.urc.kun.nl | # ---------------------------------------------------------------------- # Store user environment set old=$cwd # set INDEX = $#argv # number of parameters given in the call # # define DIRDIF Root Directory DDROOT: general files # define DIRDIF Executable Directory DDEXEC: programs #****************************************************************** # Adapt the following directory definitions to your local situation: # set DDROOT = /u/rene/dirdif set DDEXEC = /u/rene/dirdif/bin #****************************************************************** # test first parameter (FIRST) and write file DDJOB if ( $INDEX < 1 ) then set FIRST = END else set FIRST = $1 endif echo $FIRST $2 $3 $4 > DDJOB # rm DDSYST IPR2 IPR3 ln -s $DDROOT/dirdif.help HELP ln -s $DDROOT/dirdif.orbase ORBASE #=====> Note: ORUSER should also be available for personal use <===== #=====> to add new search fragments! (mind the capitals: ORUSER) <===== set EXPROG = DDSTART DDLOOP: if ( $EXPROG == STOP ) goto END ln -s $DDEXEC/$EXPROG $EXPROG.EXE $EXPROG.EXE rm $EXPROG.EXE set EXPROG = `cat DDSYST` set EXPROG = $EXPROG[1] goto DDLOOP # END: rm HELP ORBASE DDSYST DDJOB # return to original directory of user cd $old # End of DIRDIF script Section 35. Advanced Script K-Sh for COMPILING DIRDIF on RISC/ AIX =================================================================== --------------------------------------- File: DIRDIF EXECOM Section 35. #!/bin/ksh # ---------------------------------------------------------------------- # | DIRDIF-94 | # | | # | Paul T. Beurskens, G. Admiraal, Gezina Beurskens, W.P. Bosman, | # | Rene de Gelder, Randy Israel, and Jan M.M. Smits. | # | | # | Crystallography Laboratory, University of Nijmegen, | # | Toernooiveld, 6525 ED Nijmegen, The Netherlands. | # | | # ---------------------------------------------------------------------- # | Unix script for COMPILING the program system DIRDIF | # | Last modification 03-08-1993 by Rene de Gelder. | # | We thank H.J. Bruins Slot, A.L. Spek, J.P. Declerq, | # | G. Baudoux & R. Driessen for their kind help in setting up | # | DIRDIF under Unix, AIX & ULTRIX! | # ---------------------------------------------------------------------- # | Specifications of THIS script: | # | Shell: Bourne shell & Korn Shell | # | Computer: IBM Risc 6000/320 | # | | # | This script can only be executed if its permission mode is 'execute' # | This may be set by the command: chmod u+x Thisfile | # | | # | In case of problems please contact one of the following persons: | # | | # | Paul T. Beurskens, E-mail: u625002 at hnykun11.urc.kun.nl | # | Jan M.M. Smits, E-mail: u625021 at hnykun11.urc.kun.nl | # | Rene de Gelder, E-mail: u625018 at hnykun11.urc.kun.nl | # ---------------------------------------------------------------------- chk=0 if [ ! -d bin ]; then mkdir bin; fi if [ ! -d source ]; then mkdir source; fi # files in upper case? if [ -f NIJX1.FORAIX ] ; then mv NIJX1.FORAIX source/nijx1.f; fi if [ -f NIJX2.FOR ] ; then mv NIJX2.FOR source/nijx2.f; fi if [ -f CRYSDA.FOR ] ; then mv CRYSDA.FOR source/crysda.f; fi if [ -f DDMAIN.FOR ] ; then mv DDMAIN.FOR source/ddmain.f; fi if [ -f DDSTART.FOR ] ; then mv DDSTART.FOR source/ddstart.f; fi if [ -f FOUR.FOR ] ; then mv FOUR.FOR source/four.f; fi if [ -f MERBIN.FOR ] ; then mv MERBIN.FOR source/merbin.f; fi if [ -f NUTS.FOR ] ; then mv NUTS.FOR source/nuts.f; fi if [ -f ORIENT.FOR ] ; then mv ORIENT.FOR source/orient.f; fi if [ -f PATTY.FOR ] ; then mv PATTY.FOR source/patty.f; fi if [ -f PHASEX.FOR ] ; then mv PHASEX.FOR source/phasex.f; fi if [ -f TRACOR.FOR ] ; then mv TRACOR.FOR source/tracor.f; fi # files in lower case? if [ -f nijx1.foraix ] ; then mv nijx1.foraix source/nijx1.f; fi if [ -f nijx2.for ] ; then mv nijx2.for source/nijx2.f; fi if [ -f crysda.for ] ; then mv crysda.for source/crysda.f; fi if [ -f ddmain.for ] ; then mv ddmain.for source/ddmain.f; fi if [ -f ddstart.for ] ; then mv ddstart.for source/ddstart.f; fi if [ -f four.for ] ; then mv four.for source/four.f; fi if [ -f merbin.for ] ; then mv merbin.for source/merbin.f; fi if [ -f nuts.for ] ; then mv nuts.for source/nuts.f; fi if [ -f orient.for ] ; then mv orient.for source/orient.f; fi if [ -f patty.for ] ; then mv patty.for source/patty.f; fi if [ -f phasex.for ] ; then mv phasex.for source/phasex.f; fi if [ -f tracor.for ] ; then mv tracor.for source/tracor.f; fi # concatenate nijx1 and nijx2 to nijx.f if [ -f source/nijx1.f ]; then cat source/nijx1.f >> source/nijx.f; fi if [ -f source/nijx2.f ]; then cat source/nijx2.f >> source/nijx.f; fi # now .f files must be present if [ ! -f source/nijx.f ] ; then chk=1 ; fi if [ ! -f source/crysda.f ] ; then chk=1 ; fi if [ ! -f source/ddmain.f ] ; then chk=1 ; fi if [ ! -f source/ddstart.f ]; then chk=1 ; fi if [ ! -f source/four.f ] ; then chk=1 ; fi if [ ! -f source/merbin.f ] ; then chk=1 ; fi if [ ! -f source/nuts.f ] ; then chk=1 ; fi if [ ! -f source/orient.f ] ; then chk=1 ; fi if [ ! -f source/patty.f ] ; then chk=1 ; fi if [ ! -f source/phasex.f ] ; then chk=1 ; fi if [ ! -f source/tracor.f ] ; then chk=1 ; fi if [ chk -eq 1 ] then echo ' .for or .FOR file(s) is missing!' exit fi cd source xlf -c nijx.f xlf -o ../bin/CRYSDA crysda.f nijx.o xlf -o ../bin/DDMAIN ddmain.f nijx.o xlf -o ../bin/DDSTART ddstart.f nijx.o xlf -o ../bin/FOUR four.f nijx.o xlf -o ../bin/MERBIN merbin.f nijx.o xlf -o ../bin/NUTS nuts.f nijx.o xlf -o ../bin/ORIENT orient.f nijx.o xlf -o ../bin/PATTY patty.f nijx.o xlf -o ../bin/PHASEX phasex.f nijx.o xlf -o ../bin/TRACOR tracor.f nijx.o # cd .. Section 36. Advanced Script K-Sh COMPILING DIRDIF on DEC / ULTRIX ================================================================== --------------------------------------- File: DIRDIF EXECOM Section 36. #!/bin/ksh # ---------------------------------------------------------------------- # | DIRDIF-94 | # | | # | Paul T. Beurskens, G. Admiraal, Gezina Beurskens, W.P. Bosman, | # | Rene de Gelder, Randy Israel, and Jan M.M. Smits. | # | | # | Crystallography Laboratory, University of Nijmegen, | # | Toernooiveld, 6525 ED Nijmegen, The Netherlands. | # | | # ---------------------------------------------------------------------- # | Unix script for COMPILING the program system DIRDIF | # | Last modification 03-08-1993 by Rene de Gelder. | # | We thank H.J. Bruins Slot, A.L. Spek, J.P. Declerq, | # | G. Baudoux & R. Driessen for their kind help in setting up | # | DIRDIF under Unix, AIX & ULTRIX! | # ---------------------------------------------------------------------- # | Specifications of THIS script: | # | Shell: Bourne shell & Korn Shell | # | Computer: DEC5000 | # | | # | This script can only be executed if its permission mode is 'execute' # | This may be set by the command: chmod u+x Thisfile | # | | # | In case of problems please contact one of the following persons: | # | | # | Paul T. Beurskens, E-mail: u625002 at hnykun11.urc.kun.nl | # | Jan M.M. Smits, E-mail: u625021 at hnykun11.urc.kun.nl | # | Rene de Gelder, E-mail: u625018 at hnykun11.urc.kun.nl | # ---------------------------------------------------------------------- chk=0 if [ ! -d bin ]; then mkdir bin; fi if [ ! -d source ]; then mkdir source; fi # files in upper case? if [ -f NIJX1.FORAIX ] ; then mv NIJX1.FORAIX source/nijx1.f; fi if [ -f NIJX2.FOR ] ; then mv NIJX2.FOR source/nijx2.f; fi if [ -f CRYSDA.FOR ] ; then mv CRYSDA.FOR source/crysda.f; fi if [ -f DDMAIN.FOR ] ; then mv DDMAIN.FOR source/ddmain.f; fi if [ -f DDSTART.FOR ] ; then mv DDSTART.FOR source/ddstart.f; fi if [ -f FOUR.FOR ] ; then mv FOUR.FOR source/four.f; fi if [ -f MERBIN.FOR ] ; then mv MERBIN.FOR source/merbin.f; fi if [ -f NUTS.FOR ] ; then mv NUTS.FOR source/nuts.f; fi if [ -f ORIENT.FOR ] ; then mv ORIENT.FOR source/orient.f; fi if [ -f PATTY.FOR ] ; then mv PATTY.FOR source/patty.f; fi if [ -f PHASEX.FOR ] ; then mv PHASEX.FOR source/phasex.f; fi if [ -f TRACOR.FOR ] ; then mv TRACOR.FOR source/tracor.f; fi # files in lower case? if [ -f nijx1.foraix ] ; then mv nijx1.foraix source/nijx1.f; fi if [ -f nijx2.for ] ; then mv nijx2.for source/nijx2.f; fi if [ -f crysda.for ] ; then mv crysda.for source/crysda.f; fi if [ -f ddmain.for ] ; then mv ddmain.for source/ddmain.f; fi if [ -f ddstart.for ] ; then mv ddstart.for source/ddstart.f; fi if [ -f four.for ] ; then mv four.for source/four.f; fi if [ -f merbin.for ] ; then mv merbin.for source/merbin.f; fi if [ -f nuts.for ] ; then mv nuts.for source/nuts.f; fi if [ -f orient.for ] ; then mv orient.for source/orient.f; fi if [ -f patty.for ] ; then mv patty.for source/patty.f; fi if [ -f phasex.for ] ; then mv phasex.for source/phasex.f; fi if [ -f tracor.for ] ; then mv tracor.for source/tracor.f; fi # concatenate nijx1 and nijx2 to nijx.f if [ -f source/nijx1.f ]; then cat source/nijx1.f >> source/nijx.f; fi if [ -f source/nijx2.f ]; then cat source/nijx2.f >> source/nijx.f; fi # now .f files must be present if [ ! -f source/nijx.f ] ; then chk=1 ; fi if [ ! -f source/crysda.f ] ; then chk=1 ; fi if [ ! -f source/ddmain.f ] ; then chk=1 ; fi if [ ! -f source/ddstart.f ]; then chk=1 ; fi if [ ! -f source/four.f ] ; then chk=1 ; fi if [ ! -f source/merbin.f ] ; then chk=1 ; fi if [ ! -f source/nuts.f ] ; then chk=1 ; fi if [ ! -f source/orient.f ] ; then chk=1 ; fi if [ ! -f source/patty.f ] ; then chk=1 ; fi if [ ! -f source/phasex.f ] ; then chk=1 ; fi if [ ! -f source/tracor.f ] ; then chk=1 ; fi if [ chk -eq 1 ] then echo ' .for or .FOR file(s) is missing!' exit fi cd source # No optimization is specified. Change if desired but be careful! f77 -static -c -O0 nijx.f f77 -static -o ../bin/CRYSDA -O0 crysda.f nijx.o f77 -static -o ../bin/DDMAIN -O0 ddmain.f nijx.o f77 -static -o ../bin/DDSTART -O0 ddstart.f nijx.o f77 -static -o ../bin/FOUR -O0 four.f nijx.o f77 -static -o ../bin/MERBIN -O0 merbin.f nijx.o f77 -static -o ../bin/NUTS -O0 nuts.f nijx.o f77 -static -o ../bin/ORIENT -O0 orient.f nijx.o f77 -static -o ../bin/PATTY -O0 patty.f nijx.o f77 -static -o ../bin/PHASEX -O0 phasex.f nijx.o f77 -static -o ../bin/TRACOR -O0 tracor.f nijx.o # cd .. Section 37. Script for EXECUTING DIRDIF. K+B-shell =============================================================== --------------------------------------- File: DIRDIF EXECOM Section 37. #!/bin/ksh # ---------------------------------------------------------------------- # | DIRDIF-94 | # | | # | Paul T. Beurskens, G. Admiraal, Gezina Beurskens, W.P. Bosman, | # | Rene de Gelder, Randy Israel, and Jan M.M. Smits. | # | | # | Crystallography Laboratory, University of Nijmegen, | # | Toernooiveld, 6525 ED Nijmegen, The Netherlands. | # | | # ---------------------------------------------------------------------- # | Script for EXECUTING the program system DIRDIF | # | Last modification 03-08-1993 by Rene de Gelder. | # | We thank H.J. Bruins Slot, A.L. Spek, J.P. Declerq, | # | G. Baudoux & R. Driessen for their kind help in setting up | # | DIRDIF under Unix, Ultrix and AIX! | # ---------------------------------------------------------------------- # | Specifications of THIS script: | # | Shell: Bourne-shell & Korn-shell | # | Tested on computer: IBM Risc 6000/320, DEC5000. | # | | # | This script can only be executed if its permission mode is 'execute' # | This may be set by the command: chmod u+x Thisfile | # | The Korn shell is the standard AIX shell. | # | A similar script for the C shell is also available. | # | | # | In case of problems please contact one of the following persons: | # | | # | Paul T. Beurskens, E-mail: u625002 at hnykun11.urc.kun.nl | # | Jan M.M. Smits, E-mail: u625021 at hnykun11.urc.kun.nl | # | Rene de Gelder, E-mail: u625018 at hnykun11.urc.kun.nl | # ---------------------------------------------------------------------- # # Let's script! # # Clear screen # clear # # Store user environment # old=$PWD # # Initialize keys # abort=0 loop=0 # INDEX=$# # number of parameters given in the call # # define DDROOT: Directory containig general files for DIRDIF # define DDEXEC: Directory containing executable DIRDIF programs # define DDSTRC: Root directory for structures # # If you want DDSTRC to be the directory FROM WHICH YOU EXECUTE # this script specify: DDSTRC='none' # #****************************************************** # ATTENTION! :Adapt the following directory definitions # to your own LOCAL situation! # DDROOT=/u/rene/dirdif DDEXEC=/u/rene/dirdif/bin DDSTRC=/u/rene/dirdif #****************************************************** # # Check presence of directories specified # if [ ! -d $DDROOT ]; then echo $DDROOT "is not a valid directory for DDROOT"; exit; fi if [ ! -d $DDEXEC ]; then echo $DDEXEC "is not a valid directory for DDEXEC"; exit; fi if [ ! -d $DDSTRC ] && [ $DDSTRC != 'none' ]; then echo $DDSTRC "is not a valid directory for DDSTRC"; exit; fi # # test first parameter (FIRST) and write file DDJOB # if [ $INDEX -lt 1 ]; then FIRST=END else FIRST=$1 fi echo $FIRST $2 $3 $4 > DDJOB # # Switch to directory belonging to the current compound # Do not change directory if HELP is requested # if [ $FIRST = 'END' ] || [ $FIRST = 'CCODE' ] || [ $FIRST = 'BATCH' ] \ || [ $FIRST = 'end' ] || [ $FIRST = 'ccode' ] || [ $FIRST = 'batch' ] \ || [ $FIRST = 'HELP' ] || [ $FIRST = 'H' ] \ || [ $FIRST = 'help' ] || [ $FIRST = 'h' ]; then clear # # No change in directory # else # # Change directory # CCODE=$FIRST # # Check presence of compound directory # if [ $DDSTRC != 'none' ]; then if [ -d $DDSTRC/$CCODE ]; then mv DDJOB $DDSTRC/$CCODE cd $DDSTRC/$CCODE echo " Directory set to" $DDSTRC/$CCODE if [ -f ORUSER ]; then echo " ORUSER present" else cp $DDROOT/dirdif.oruser ./ORUSER fi else echo " Directory" $DDSTRC/$CCODE "not present!" abort=1 fi else echo " No change to structure-directory" fi fi # # Start DIRDIF if everything is OK # if [ abort -eq 0 ]; then # # Backup old output files and link files # ln -s $DDROOT/dirdif.help HELP ln -s $DDROOT/dirdif.orbase ORBASE if [ -f DDSYST ]; then rm DDSYST; fi if [ -f IPR2 ]; then mv IPR2 IPR2.OLD echo " IPR2 moved to IPR3" fi if [ -f IPR3 ]; then mv IPR3 IPR3.OLD echo " IPR3 moved to IPR3.OLD" fi EXPROG=DDSTART # # Working loop # while [ $loop -eq 0 ] do ln -s $DDEXEC/$EXPROG $EXPROG.EXE $EXPROG.EXE 2>dirdif.log rm $EXPROG.EXE read EXPROG < DDSYST if [ $EXPROG = STOP ]; then loop=1; fi done fi # # Ready! # echo " Job completed successfully at " `date`. # # Remove unnecessary files # if [ -f HELP ]; then rm HELP; fi if [ -f ORBASE ]; then rm ORBASE; fi if [ -f DDSYST ]; then rm DDSYST; fi if [ -f DDJOB ]; then rm DDJOB; fi if [ -f dirdif.log ]; then rm dirdif.log; fi # # return to original directory of user # cd $old echo echo " Current directory is now:" $PWD echo exit # End of DIRDIF script Section 38. Script for EXECUTING DIRDIF. C-shell ============================================================== --------------------------------------- File: DIRDIF EXECOM Section 38. #!/bin/csh # ---------------------------------------------------------------------- # | DIRDIF-94 | # | | # | Paul T. Beurskens, G. Admiraal, Gezina Beurskens, W.P. Bosman, | # | Rene de Gelder, Randy Israel, and Jan M.M. Smits. | # | | # | Crystallography Laboratory, University of Nijmegen, | # | Toernooiveld, 6525 ED Nijmegen, The Netherlands. | # | | # ---------------------------------------------------------------------- # | Script for EXECUTING the program system DIRDIF | # | Last modification 03-08-1993 by Rene de Gelder. | # | We thank H.J. Bruins Slot, A.L. Spek, J.P. Declerq, | # | G. Baudoux & R. Driessen for their kind help in setting up | # | DIRDIF under Unix, Ultrix and AIX! | # ---------------------------------------------------------------------- # | Specifications of THIS script: | # | Shell: C shell | # | Tested on computer: IBM Risc 6000/320, DEC5000. | # | | # | This script can only be executed if its permission mode is 'execute' # | This may be set by the command: chmod u+x Thisfile | # | Similar scripts for the Bourne and/or Korn shell are also available. # | | # | In case of problems please contact one of the following persons: | # | | # | Paul T. Beurskens, E-mail: u625002 at hnykun11.urc.kun.nl | # | Jan M.M. Smits, E-mail: u625021 at hnykun11.urc.kun.nl | # | Rene de Gelder, E-mail: u625018 at hnykun11.urc.kun.nl | # ---------------------------------------------------------------------- # define aliases to store and reset user environment alias cd 'set old=$cwd; chdir \!*' alias back 'set back=$old; set old=$cwd; cd $back; unset back' # set INDEX = $#argv # number of parameters given in the call # # define DIRDIF Root Directory DDROOT: general files # define DIRDIF Executable Directory DDEXEC: programs # define DIRDIF structures Directory DDSTRC: root for structures # Adapt the following directory definitions to your local situation: # set DDROOT = /u/rene/dirdif # Use different directory for .exe files set DDEXEC = /u/rene/dirdif/bin # Use different directory for .exe files set DDSTRC = /u/rene/dirdif # limit coredumpsize 0 # store user environment using alias cd cd . # test first parameter (FIRST) and write file DDJOB if ( $INDEX < 1 ) then set FIRST = END else set FIRST = $1 endif echo $FIRST $2 $3 $4 > DDJOB #====> Now we switch to the directory belonging to the current compound. #====> (This may be bypassed: see foregoing Appendices.) #====> ++++ but do not change directory if HELP is requested (HREQUEST: if ( $FIRST == END || $FIRST == CCODE || $FIRST == BATCH ) goto HREQUEST if ( $FIRST == end || $FIRST == ccode || $FIRST == batch ) goto HREQUEST if ( $FIRST == HELP || $FIRST == H ) goto HREQUEST if ( $FIRST == help || $FIRST == h ) goto HREQUEST #===> now change directory set CCODE = $FIRST #===> you may test here if this directory really exists ! #===> if not exiting: goto EXIT if ( -d $DDSTRC/$CCODE ) then mv DDJOB $DDSTRC/$CCODE cd $DDSTRC/$CCODE echo Directory set to $DDSTRC/$CCODE if ( -f ORUSER ) then echo ORUSER present else cp $DDROOT/dirdif.oruser ./ORUSER endif else echo Directory $DDSTRC/$CCODE not present! goto EXIT endif #=====> If we switch to the proper CCODE directory: <===== #=====> **** HAVE A COPY OF THIS SHELL IN THAT **** <===== #=====> **** PARTICULAR DIRECTORY **** <===== #=====> **** TOGETHER WITH A COPY OF ORUSER **** <===== #=====> **** (mind the capitals: ORUSER) **** <===== HREQUEST: # ++++ end of change directory # ln -s $DDROOT/dirdif.help HELP ln -s $DDROOT/dirdif.orbase ORBASE if ( -f DDSYST ) then rm DDSYST endif if ( -f IPR2 ) then mv IPR2 IPR2.OLD echo IPR2 moved to IPR3 endif if ( -f IPR3 ) then mv IPR3 IPR3.OLD echo IPR3 moved to IPR3.OLD endif set EXPROG = DDSTART goto DDSTRT DDLOOP: set EXPROG = `cat DDSYST` set EXPROG = $EXPROG[1] DDSTRT: if ( $EXPROG == STOP ) then goto END else ln -s $DDEXEC/$EXPROG $EXPROG.EXE $EXPROG.EXE rm $EXPROG.EXE endif if ( $status != 0 ) then echo STATUS EXIT from DDLOOP goto STOPRETCODE else goto DDLOOP endif STOPRETCODE: echo ERROR returning from $EXPROG goto EXIT END: echo Job completed successfully at `date`. EXIT: if ( -f HELP ) rm HELP if ( -f ORBASE ) rm ORBASE if ( -f DDSYST ) rm DDSYST if ( -f DDJOB ) rm DDJOB # return to original directory of user back echo "Current directory is now:" pwd # End of DIRDIF script Section 41. PC-DOS and MS-DOS on IBM or IBM-compatible PC's =========================================================== ***** DIRDIF PC : ***** File: DIRDIF EXECOM Section 41. ***** PC-DOS MS-DOS ***** Origin: J.M.M. Smits, Feb. 1992 11.1 General introduction --------------------------- Definitions MSDOS: PC-DOS as used on IBM PC's or MS-DOS as used on IBM-compatible PC's; 8086: the Intel 8086 or 8088 microprocessor; 80x86: the Intel 80x86 microprocessor; 80x86SX: the Intel 80x86SX microprocessor; 80x86(SX): the Intel 80x86 or 80x86SX microprocessors; 80x87: the Intel 80x87 Numeric Processing Extension NPX, alias numeric or mathematical co-processor. The DIRDIF program system was designed and developped on an IBM main frame computer. DIRDIF and the necessary computer hardware grew up and matured together. While DIRDIF has been able to shed the shackles of early computer hardware, MSDOS is still (and probably will always be) severely restricted by the limit of 640K bytes internal memory. With the 80286 it became possible to address up to 16Mb of internal mem- ory. However, the memory above 1Mb can only be used to store data, be it in the form of a RAM disk or, together with the necessary additional hardware, as expanded memory viewed through a 64Kb window in an unused part of upper memory, the region between 640Kb and 1 Mb. Practically speaking the 80286 is, in all other respects, a fast 8086: a 16-bit microprocessor with a 16-bit data bus. In many ways the 80386 behaves as a very fast 80286: only a limited part of its full potential is used. Although it is a 32-bit microprocessor with a 32-bit data bus (16-bit data bus in case of the 80386SX), it still uses 16-bit processing. But you can emulate expanded memory in extended memory without additional hardware. To speed up floating point calculations, the 80286(SX) or 80386(SX) can be complemented by the 80287 or 80387 repectively. The easiest way of defining the 80486 is to describe it as an 80386 with a built-in 80387 co-processor, resulting in a considerable gain in speed. For some reasons it was thought necessary to introduce later on the 80486SX by disabling (not removing!) the co-processing abilities of the 80486. To this processor you can add an 80487 co-processor! This way of using an 80286, 80386(SX) or 80486(SX) is known as 'real mode': the way an 8086 behaves. But there is another way of using an 80286, 80386(SX) or 80486(SX): in 'protected mode'. The processor can switch between these two modes, but MSDOS works in 'real mode' only. Only the 80386(SX) and 80486(SX) can switch readily back and forth between the two modes. Therefore we restrict the follo- wing discussion to these microprocessors. In 'protected mode' an 80386(SX) or 80486(SX) behaves comple- tely dif- ferent. The range of usable memory, for programs and data, is practi- cally limitless. It uses real 32-bit processing, thereby increasing the speed of your calculations. However, there is one serious drawback: it is not compatible with MSDOS: you cannot use the basic input/output (BIOS) routines of the operating system, or any other system (DOS) rou- tines, in protected mode. To use an 80386(SX) or 80486(SX) in 'protected mode', you need special software, collectively known as DOS-extenders, which switches the micro- processor, whenever it is needed, from 'protected mode' to 'real mode' and vica versa, and which takes care of the very tricky communication between these two modes. Besides that you need programs that are com- piled in the right way. To run DIRDIF on your machine we provide you with all the necessary software to do so. =====> W A R N I N G <===== The DOS extender provided with the DIRDIF program system, DBOS, manages and uses extended memory. You should be aware that simulated expanded memory is no longer available to DBOS. To prevent conflicts you should not use any other memory managing programs besides DBOS. You should use no other disk cache program than the one provided by the /DISK_CACHE option of DBOS itself. However, you can use the RAMDRIVE.SYS device driver to create and use a RAM disk to your advantage. Apart from the changes indicated below you must adapt your CONFIG.SYS and AUTOEXEC.BAT files to reflect these warnings. 11.2 Hardware and software requirements ----------------------------------------- Operating system: PC-DOS or MS-DOS 3.3 or higher DOS extender: DBOS (provided with the DIRDIF system) Processor: 80386(SX) or 80486(SX). The use of an 80387 or 80487 (when appropriate) or Weitek co-processor is strongly recommended. Memory: at least 2 Mb internal memory Disk space: Hard disk required 1 Mb to hold the DOS extender software 2 Mb to hold the DIRDIF program system 0.5 Mb typically for each structure. Floppy drive: 3,5" - 720Kb or 3,5" - 1.4Mb or 5,25" - 360Kb or 5,25" - 1.2Mb to install the system. Video: no special requirements, no graphic modes used. 11.3 Installation and first test --------------------------------- 1. Make backup copies of your CONFIG.SYS and AUTOEXEC.BAT files. 2. Create a (sub)directory to store the DOS extender DBOS. 3. Copy all files from the 'DBOS' floppy disk to this (sub)directory. 4. Create a (sub)directory to store the DIRDIF program system. 5. Copy all files from the 'DIRDIF' floppy disk to this (sub)directory. 6. Add the path to the DBOS (sub)directory and the path to the DIRDIF (sub)directory to the PATH command in your AUTOEXEC.BAT file. For maximum efficiency: put them as forward as possible in the search sequence, e.g.: PATH = C:\DIRDIF;C:\DOS;C:\DBOS 7. Set in the AUTOEXEC.BAT file the environmental parameter DIRSYSTEM to the path to the DIRDIF (sub)directory, including the delimiting backslash, e.g.: SET DIRSYSTEM = C:\DIRDIF\ N.B. So you must specify this path twice: once in the PATH statement statement and once as an environmental parameter. 8. Add the instruction DBOS, optionally followed by the option /DISK_CACHE, to your AUTOEXEC.BAT file. 9. Make any changes to your CONFIG.SYS and AUTOEXEC.BAT files needed to reflect the warnings given above. 10. Reboot your machine to make the changes effective. 11. Create a (sub)directory to hold the data belonging to your present compound, in this case the test compound MONOS. e.g. MKDIR C:\STRUCT\MONOS. Copy all files from the 'MONOS' floppy disk to this (sub)directory. 12. Make this (sub)directory the current directory, e.g. CD C:\STRUCT\MONOS and start your first test by typing: DIRDIF MONOS ORIENT 11.4 Operational notes ----------------------- In all cases we advise you not to use any disk cache program other than the one provided by the /DISK_CACHE option of DBOS itself, or to have any TSR program with a memory management component in your configura- tion. If you have more than 2 Mb internal memory, then the following may be of interest to you. Under MSDOS versions 3.3 and 4.01 (mind!) we used the RAMDRIVE.SYS device driver to create a RAM disk in extended memory above 2Mb. You can use this drive to lower the 'turn-around' time, not by speeding up the calculations but by minimizing the time needed for disk I/O. Under MSDOS version 5.00 the supplied RAMDRIVE.SYS device driver (ver- sion 3.06) needs the HIMEM.SYS device driver. This combination is incom- patible with DBOS!!! However, we successfully used the MSDOS 4.01 ver- sion of RAMDRIVE.SYS (version 2.12) in combination with the SETVER.EXE device driver. Take the following steps: - Use the SETVER command: SETVER RAMDRIVE.SYS 4.00 - Insert DEVICE=C:\DOS\SETVER.EXE in your CONFIG.SYS file before the loading of RAMDRIVE.SYS - Insert DEVICE=C:\DOS\RAMDRIVE.SYS with its parameters in CONFIG.SYS pointing to MSDOS 4.01 version 2.12! - You should certainly not load HIMEM.SYS If you want to, you can use this RAM disk, let's say D:, in two ways: - the savest way: set the environmental parameter DIRTDISK = D: (or add this SET command to your AUTOEXEC.BAT file). All intermediate files will be written to your RAM disk. Its size should be 512Kb. - The fastest way: copy all your data files to the RAM drive. Make this drive the current drive (and switch to the correct current directory if needed) and start the DIRDIF system. It is your own responsibility to copy the resulting output files to your hard disk to prevent loss of data. You need at least a RAM drive of 1024Kb. N.B. If you have memory to spend you could even copy (in your AUTOEXEC.BAT file) all files from the DIRDIF program system and DBOS DOS-extender to appropriate (sub)directories on your RAM drive. We advise you to create a seconds, separate RAM drive to hold these files. Be sure to set the correct paths in the PATH and SET statements in your AUTOEXEC.BAT file. 11.5 Operating system considerations ------------------------------------- The DIRDIF program system and the DBOS DOS-extender have been tested under PC-DOS / MS-DOS versions 3.3, 4.01 and 5.00. MSDOS version 5.00 offers new possibilities to enlarge the amount of conventional memory available to normal programs (in 'real mode') by highloading device drivers and TSR's in Upper Memory Blocks and making part of the operating system resident in the High Memory Area, directly above the 1Mb limit. However, because you are going to use protected mode, memory is no more at a premium. You had better not use the EMM386.EXE device driver needed to highload things, or HIMEM.SYS itself. As it is, you really need completely different configurations depending on what kind of programs you are going to run: one configuration with no other memory management program than DBOS and one configuration with maximum conventional memory. Any compromise would probably deteriorate the performance of your system in any given circumstance. One (save) way of doing is to setup your favourite configura- tion files CONFIG.SYS and AUTOEXEC.BAT on your C: disk and have a floppy disk ready for your A: floppy drive in case you want to switch over to another con- figuration. This floppy disk should contain the operating system (FORMAT A: /S) and the alternative CONFIG.SYS and AUTOEXEC.BAT files (and per- haps appropriate copies of RAMDRIVE.SYS and SETVER.EXE). Make sure that path-indications point to your C: disk if possible! As an example we show some typical setup's for a 4 Mb system under MSDOS 5.00 and under MSDOS 3.3 or 4.01. We do not seek completeness: these examples merely function to show the presence, or absence, of statements related to the use of DBOS. MSDOS 5.00 setup for maximum conventional memory, no DBOS ========================================================= The CONFIG.SYS file: ------------------- BUFFERS=24 FILES=20 STACKS=0,0 DEVICE=C:\DOS\HIMEM.SYS DOS=HIGH,UMB DEVICE=C:\DOS\EMM386.EXE NOEMS DEVICEHIGH SIZE=1060 C:\DOS\ANSI.SYS REM SETVER.EXE in \DOS has no special entry for RAMDRIVE.SYS REM RAMDRIVE.SYS is the MSDOS 5.00 supplied version 3.06 DEVICEHIGH SIZE=190 C:\DOS\SETVER.EXE DEVICEHIGH SIZE=4A0 C:\DOS\RAMDRIVE.SYS 1024 512 128 /E COUNTRY=031 437 C:\DOS\COUNTRY.SYS SHELL=C:\DOS\COMMAND.COM /P /E:256 LASTDRIVE=D The AUTOEXEC.BAT file: --------------------- @ECHO OFF SET COMSPEC=C:\COMMAND.COM SET PATH=D:;C:\DOS;C:\WINDOWS PROMPT=$l$p$g VERIFY=OFF BREAK=ON LOADHIGH C:\DOS\GMOUSE LOADHIGH C:\DOS\GRAPHICS LOADHIGH C:\DOS\DOSKEY LOADHIGH C:\DOS\MODE COM1:9600,N,8,1 LOADHIGH C:\DOS\MODE COM2:9600,N,8,1,R LOADHIGH C:\DOS\GRAFTABL CLS ECHO +------------------------------------------------------------------ ECHO | ECHO | MS-DOS 5.00 ECHO | ECHO | Your machine has been configured with the HIMEM.SYS driver and th ECHO | EMM386.EXE driver. The DOS operating system has been loaded in th ECHO | High Memory Area. As many drivers and TSR's as possible have been ECHO | loaded in Upper Memory Blocks. A RAM drive has been created. ECHO | ECHO | The DBOS Extender has not been loaded| it cannot be used savely. ECHO | ECHO +------------------------------------------------------------------ MSDOS 5.00 setup for use with the DOS extender DBOS =================================================== The CONFIG.SYS file: Assuming startup from A: ------------------- BUFFERS=24 FILES=20 STACKS=0,0 REM This version of SETVER.EXE on A: contains the entry REM RAMDRIVE.SYS 4.00 REM RAMDRIVE.SYS on A: is the MSDOS 4.01 supplied version 2.12 DEVICE=A:SETVER.EXE DEVICE=A:RAMDRIVE.SYS 1024 512 128 /E DEVICE=C:\DOS\ANSI.SYS COUNTRY=031 437 C:\DOS\COUNTRY.SYS SHELL=C:\DOS\COMMAND.COM /P /E:256 The AUTOEXEC.BAT file: --------------------- @ECHO OFF C: <--- assuming startup from A: C:\DOS\GMOUSE SET COMSPEC=C:\COMMAND.COM SET PATH=C:\DIRDIF;C:\DOS;C:\DBOS SET DIRSYSTEM=C:\DIRDIF\ SET DIRTDISK=D: PROMPT=$l$p$g VERIFY=OFF BREAK=ON C:\DOS\MODE COM1:9600,N,8,1 C:\DOS\MODE COM2:9600,N,8,1,R C:\DOS\GRAPHICS C:\DOS\GRAFTABL C:\DOS\DOSKEY C:\DBOS\DBOS /DISK_CACHE CLS ECHO +-----------------------------------------------------------------+ ECHO | MS-DOS 5.00 | ECHO | | ECHO | Your machine has been configured without the HIMEM.SYS driver | ECHO | or any other drivers or TSR's that use extended memory or that | ECHO | use or simulate expanded memory. The High Memory Area is not | ECHO | available, no Upper Memory Blocks are defined or used. A RAM | ECHO | drive is present. | ECHO | The DBOS Extender has been loaded, disk caching enabled. | ECHO +-----------------------------------------------------------------+ MSDOS 3.3 or 4.01 setup for use with the DOS extender DBOS ========================================================== The CONFIG.SYS file: ------------------- BUFFERS=24 FILES=20 STACKS=0,0 DEVICE=C:\DOS\ANSI.SYS DEVICE=C:\DOS\RAMDRIVE.SYS 1024 512 64 /E DEVICE=C:\DOS\GMOUSE.SYS /2 COUNTRY=031 437 A:\DOS\COUNTRY.SYS SHELL=C:\DOS\COMMAND.COM /P /E:256 LASTDRIVE=D The AUTOEXEC.BAT file: --------------------- @ECHO OFF SET COMSPEC=C:\COMMAND.COM SET PATH=D:;C:\DIRDIF;C:\DOS;C:\DBOS SET DIRSYSTEM=C:\DIRDIF SET DIRTDISK=D: PROMPT=$l$p$g VERIFY OFF BREAK=ON MODE COM1:9600,N,8,1 MODE COM2:9600,N,8,1,R GRAPHICS GRAFTABL C:\DBOS\DBOS /DISK_CACHE 11.6 The DIRDIF batch procedure -------------------------------- @echo off rem +---------------------------------------------------------------+ rem | | rem | Command procedure to execute the DIRDIF program system | rem | | rem | Paul T. Beurskens, G. Admiraal, Gezina Beurskens, W.P.Bosman | rem | Rene de Gelder, Randy Israel, and Jan M.M. Smits | rem | | rem | Crystallography Laboratory, University of Nijmegen, | rem | Toernooiveld, 6525 ED Nijmegen, The Netherlands | rem | | rem | DIRDIF-94, version 14 Dec. 1994. Language: IBM PC | rem | | rem +---------------------------------------------------------------+ rem rem Normal calling sequence: DIRDIF CCODE rem or to invoke help: DIRDIF H rem or for special options: DIRDIF P1 P2 P3 rem where P1 P2 P3 are parameters for this run rem rem rem The first parameter usually is the compound code, denoted: CCODE rem If the first parameter is H : invoke the DIRDIF help routine. rem If no parameter are given or if the first parameter equals rem HELP or ? or CCODE: call DDSTART without file assignments. rem Other parameters (BATCH or special options) usually are not needed; rem if present, they are also sent to the DDJOB file. rem (The BATCH option is not represented in this command procedure.) rem if not .%DIRSYSTEM% == . goto DEFINED echo Environmental parameter DIRSYSTEM not set. echo Set this parameter to the path to the DIRDIF SYSTEM directory, echo including the final \, preferably in your AUTOEXEC.BAT file. goto EXIT :DEFINED if exist DDJOB del DDJOB if exist DDSYST del DDSYST if not exist IPR2 goto NOLIST if exist IPR2.OLD del IPR2.OLD rename IPR2 IPR2.OLD echo File IPR2 has been renamed to IPR2.OLD :NOLIST if not exist IPR3 goto START if exist IPR3.OLD del IPR3.OLD rename IPR3 IPR3.OLD echo File IPR3 has been renamed to IPR3.OLD rem :START rem Check the calling parameters in program WRDDJOB: write the rem calling parameters to the DDJOB file. %DIRSYSTEM%WRDDJOB %1 %2 %3 goto DDSTART :LOOP rem Determine which program should be executed next: program RDDDSYST rem reads the DDSYST file and STOPs with a numerical parameter to rem indicate the next program. rem N.B. The ERRORLEVEL condition must be interpreted as follows: rem ERRORLEVEL is true if, and only if, the previous exit code rem was equal to or greater than . rem --------------- %DIRSYSTEM%RDDDSYST if ERRORLEVEL 99 goto ERRORSTOP if ERRORLEVEL 11 goto ERRORSTOP if ERRORLEVEL 10 goto NUTS if ERRORLEVEL 9 goto FOUR if ERRORLEVEL 8 goto PHASEX if ERRORLEVEL 7 goto TRACOR if ERRORLEVEL 6 goto ORIENT if ERRORLEVEL 5 goto PATTY if ERRORLEVEL 4 goto DDMAIN if ERRORLEVEL 3 goto DDSTART if ERRORLEVEL 2 goto MERBIN if ERRORLEVEL 1 goto CRYSDA if ERRORLEVEL 0 goto STOP :CRYSDA RUN77 %DIRSYSTEM%CRYSDA goto LOOP :MERBIN RUN77 %DIRSYSTEM%MERBIN goto LOOP :DDSTART RUN77 %DIRSYSTEM%DDSTART goto LOOP :DDMAIN RUN77 %DIRSYSTEM%DDMAIN goto LOOP :PATTY RUN77 %DIRSYSTEM%PATTY goto LOOP :ORIENT RUN77 %DIRSYSTEM%ORIENT goto LOOP :TRACOR RUN77 %DIRSYSTEM%TRACOR goto LOOP :PHASEX RUN77 %DIRSYSTEM%PHASEX goto LOOP :FOUR RUN77 %DIRSYSTEM%FOUR goto LOOP :NUTS RUN77 %DIRSYSTEM%NUTS goto LOOP :ERRORSTOP echo =============> E R R O R S T O P <==================== :STOP if exist DDJOB del DDJOB if exist DDSYST del DDSYST echo The most important output has been written in file IPR2 echo In case of problems, inspect IPR3 for more information. echo Bye bye from DIRDIF :EXIT rem rem End of DIRDIF.BAT = DIRDIF IBM-PC command procedure file Section 51. CYBER PROCEDURE (A.Meetsma, Groningen) ================================================== ***** DIRDIF CYBER ***** File: DIRDIF EXECOM Section 51. ***** ------------ ***** Origin: A.Meetsma, Mar. 1992 PROCEDURE DIRDIF ( cat, catalog, cata, c : application = $required prog, pg, program : key XXXX TEST PATTY ORIENT TRACOR PHASEX .. DIRP1 FOUR CRYSDA MERBIN NUTS keyend = XXXX reff, rf, ref_file, r : key HKLX HKLS HKLD SHELX FREF BINFO keyend = HKLX pr, print, p : boolean = false ) " ---------------------------------------------------------------------- " | DIRDIF-94 | " | | " | Command procedure to execute the DIRDIF program system | " | | " | Paul T. Beurskens, G. Admiraal, Gezina Beurskens, W.P. Bosman, | " | Rene de Gelder, Randy Israel, and Jan M.M. Smits. | " | | " | Crystallography Laboratory, University if Nijmegen, | " | Toernooiveld, 6525 ED Nijmegen, The Netherlands | " | | " | This procedure file prepared by A. Meetsama, Groningen, Mar. 1992 | " ---------------------------------------------------------------------- " DIRDIF HELP ....help " DIRDIF H ....help " DIRDIF TEST ....testing with MONOS from PUB " DIRDIF CPXXX (option) run with default reflection HKLX file " DIRDIF CPXXX (option) rf= Reflection_File wc$wc = $working_catalog setwc $local VAR userstr : string = $string($user) user : string = $substr(userstr, 9, $strlen(userstr)-8) dir$cat : string = $string(cat) dir$prog : string = $string(prog) dir$path : string = '$user.'//dir$cat//'.' dir$ref : string = $string(reff) dir$fid : string dir$crys : file dir$file : file dir$aux : file dir$perm : list of key CRYSDA BINFO DDLOG ATOMS ATMOD ATOLD keyend = (CRYSDA BINFO DDLOG ATOMS ATMOD ATOLD) dir$list : list of key ATMOD ATOLD ATOMS BINFC BINFO FREF CONDA CONDA2 .. CRYSDA CRYSIN .. DDJOB DDLOG DDSYST IPR2 IPR3 FMAP PDEK XYZN XYZO .. HKLX HKLS HKLD FAUX1 FAUX2 keyend = .. (ATMOD ATOLD ATOMS BINFC BINFO FREF CONDA CONDA2 .. CRYSDA CRYSIN .. DDJOB DDLOG DDSYST IPR2 IPR3 FMAP PDEK XYZN XYZO .. HKLX HKLS HKLD FAUX1 FAUX2) dir$key : key .. ATMOD ATOLD ATOMS BINFC BINFO FREF CONDA CONDA2 .. CRYSDA CRYSIN .. DDJOB DDLOG DDSYST IPR2 IPR3 FMAP PDEK XYZN XYZO .. HKLX HKLS HKLD FAUX1 FAUX2 keyend Line : string VAREND WHEN exit DO CANCEL any_fault change_working_catalog c=wc$wc Change_terminal_attribute HP=ON WHENEND WHEN any_fault DO display_value value='Problems in Job_DIRDIF: ' display_value value=osv$status display_value value=osv$command_name Delete_Command_List_Entry Entry=.meetsma.pub.dirdif91 WHENEND Create_Command_List_Entry Entry=.meetsma.pub.dirdif91 Change_terminal_attribute HP=OFF string_to_upper_case dir$cat string_to_upper_case dir$prog string_to_upper_case dir$ref If dir$cat = 'HELP' or dir$cat = 'H' then; dir$prog = 'HELP'; Ifend If dir$cat = 'TEST' then; dir$prog = 'TEST'; Ifend If dir$prog = 'XXXX' then; dir$prog = ''; Ifend PutL ' ' PutL ' >>>>>>>> Start: --- D I R D I F --- ' PutL ' ' PutL ' Catalog: '//dir$cat PutL ' ' " Delete and Detach_Files <<<<<<<<<<<<< FOR EACH dir$key IN dir$list DO dir$fid = $string(dir$key) dir$aux = $fname(dir$fid) IF $file(dir$aux, temporary) THEN DelF dir$aux PutL ' ' PutL ' >>>>>>>> Delete_file : '//dir$fid//' <<<<<<<<<' PutL ' ' ELSEIF $file(dir$aux, attached) THEN DetF dir$aux PutL ' ' PutL ' >>>>>>>> Detach_file : '//dir$fid//' <<<<<<<<<' PutL ' ' IFEND FOREND IF not $file(help,attached) THEN AttF .meetsma.pub.ddhelp lfn=help Ifend IF not $file(orbase,attached) THEN AttF .meetsma.pub.orbase lfn=orbase Ifend IF not $file(oruser,attached) THEN AttF .meetsma.pub.oruser lfn=oruser Ifend If dir$prog = 'TEST' THEN attach_file f=.meetsma.pub.crysin lfn=crysin attach_file f=.meetsma.pub.card3 lfn=card3 PutL 'PUB ' DDJOB ElseIf dir$prog = 'HELP' THEN PutL 'HELP ' DDJOB Else IF ($Job(Job_Mode)=BATCH) THEN PutL dir$cat//' '//dir$prog//' BATCH' DDJOB Else PutL dir$cat//' '//dir$prog DDJOB Ifend dir$crys = $Fname(dir$path//'crysda') IF $File(dir$crys, PERMANENT) THEN CopF dir$crys crysda CopF $Fname(dir$path//'binfo') binfo CopF $Fname(dir$path//'ddlog') ddlog dir$aux = $Fname(dir$path//'atmod') If $File(dir$aux, PERMANENT) then CopF dir$aux atmod Ifend ELSE dir$aux = $Fname(dir$path//'crysin') If $File(dir$aux, PERMANENT) then attach_file f=dir$aux lfn=crysin Else PutL ' ' PutL ' ...... file '//dir$aux//' not present'//$char(7) PutL ' ' Ifend dir$aux = $Fname(dir$path//dir$ref) If $File(dir$aux, PERMANENT) then attach_file f=dir$aux lfn=$Name(dir$ref) Else PutL ' ' PutL ' ...... file '//dir$aux//' not present'//$char(7) PutL ' ' Ifend IFEND Ifend PutL ' ' PutL ' >>>>>>>>>>>>>> C A L C U L A T I N G --------' PutL ' ' PutL ' >>>>>>> ----- D D S T A R T of D I R D I F 91 ----' PutL ' ' " Next line needed for FTN2 ol=high, some wrong/not initialized vars SetPa pv=zero " next line for testing purposes " ... (PTB) could be wrongly truncated ... and partly put to next line: " Exet $user.b_dirdif sp=DDSTART tel=fatal pv=fpi fpi=on af=$user.pub " .abortf DDSTART PutL ' ' GetL Line i=DDSYST While Line <> 'STOP' DO " next line for testing purposes " Incl 'Exet $user.b_dirdif sp='//Line//' tel=fatal pv=fpi fpi=on af=$user.pub.abortf DO=DEBUGF ' IncL Line GetL Line i=DDSYST Whilend " Save files <<<<<<<<<<<<<< If dir$prog <> 'TEST' then FOR EACH dir$key IN dir$perm DO dir$fid = $string(dir$key) dir$aux = $fname(dir$fid) IF $file(dir$aux, temporary) AND $file(dir$aux,size) > 0 THEN copy_file dir$aux $fname('$user.'//dir$cat//'.'//dir$fid) PUTL ' ' put_line ' >>>>>>>> Saving file : '//dir$fid//' <<<<<<<<<' PUTL ' ' IFEND FOREND IF $file(ATOMS, temporary) AND $file(ATOMS,size) > 0 THEN PUTL ' ' CopF ATOMS $Fname(dir$path//'ATOMS') put_line ' >>>>>>>> Saving file ATOMS as ATOM_SPF <<<<<<<<<' PUTL ' ' EDN CRYSDA FAUX1 ' K ; R4 ; E ; I/ / ; M2 ; R2 ; .. E2 ; R3 ; I/ / ; F/SPGR/ ; R11 ; .. (V/ / E , R)* ; M ; K* ; :C ' EDN ATOMS FAUX2 .. ' F/ATOMS / K ; M ; (F/ATOM / R62 E* M)*; .. M- ; F/END/ K ; :C ' CopF FAUX2 FAUX1.$eoi Copf FAUX1 $Fname(dir$path//'ATOM_SPF.'//'$next') IFEND Ifend IF pr AND $file(IPR2, temporary) and $file(IPR2,size) > 0 THEN KP f=IPR2 t='DIRDIF-'//dir$cat//'.' pfl=true IFEND IF $Job(Job_Mode)=INTERACTIVE THEN Edif f=IPR2 i=input Else CopF IPR2 output IFEND PutL ' ' PutL ' .......there is a local file IPR3 with more information...' PutL ' ' Delete_Command_List_Entry Entry=.meetsma.pub.dirdif91 SetPa pv=floating_point_indefinite put_line ' ' put_line ' >>>>>>> ----- D I R D I F done ----'//$char(7) put_line ' ' PROCEND DIRDIF ----------------------------- end of CYBER procedure ------------------- ***** XXXXXXXXXXXXXXXXXXXX ***** File: DIRDIF EXECOM Section XX. ------ end of DIRDIF EXECOM -------------------------------------------