**************   OVERVIEW   **************

     The restrained reciprocal space refinement program system developed by
Hendrickson and Konnert is implemented as three separate FORTRAN programs:
SCATT, PROTEIN and PROLSQ.  Much has been published on the general methods
employed in the programs, and users are referred to the following articles:

a) "Stereochemically Restrained Refinement of Macromolecular Structures"
    By W. Hendrickson, in "Methods in Enzymology" Vol. 115, part B, (1985)
    edited by H. Wyckoff, C. Hirs and S. Timasheff, Academic Press, pg 252-270.

b) "Restrained Least-Squares Refinement of Proteins" By W. Hendrickson in
   "Crystallographic Computing 3: Data Collection, Structure Determination,
    Proteins, and Databases" (1985) edited by G. Sheldrick, C Kruger and
    R. Goddard, Clarendon Press, Oxford, Pg 306-311.

c)  "Incorporation of Stereochemical Information into Crystallographic
     Refinement" By W. Hendrickson and J. Konnert in "Computing in
     Crystallography" (1980) edited by R. Diamond, S. Ramaseshan and 
     K. Venkatesan, Indian Academy of Sciences, pg 13.01-13.23.

d)  "Stereochemically Restrained Least-Squares Refinement" By W. Hendrickson
     and J. Konnert in "Biomolecular Structure, Function, Conformation
     and Evolution" Vol 1, (1980) edited by R. Srinivasan, Pergamon, Oxford   
     pg 43-57.

     The current versions of the programs available at the Pittsburgh
Supercomputing Center have been modified to suit the Pittsburgh
crystallographic community and have been extensively tested. The modified
versions are called HKSCAT, PROTIN and GPRLSA. The local modifications include: 

1)  Generalizing the code so it is applicable to any space group with free
    format symmetry input.

2)  Optimizing the code for high performance on vector/array processors.

3)  Including the ability to remove structure factor contributions from the
    least squares matrix and vector for selected residues (facilitates
    generation of residue-deleted electron density maps and/or local
    optimization of small regions with "bad" geometry).

4)  Including the ability to perform multiple refinement cycles in one job.

5)  Including the ability to select exact or table lookup routines for trig
    function evaluation.

6)  Including the ability to add "fixed atom" contributions to structure
    factors (i.e. hydrogens, anomalous dispersion corrections etc).

7)  Changes in the way parameter shifts are handled when occupancy factors
    exceed unity (thermal shifts are now applied instead).

8)  Output Fourier coefficients are now on an absolute scale.

9)  Output coordinate and Fourier coefficient files are now ASCII to simplify
    transfer to and use on other computers. 

10) Introduction of an alternative choice of weighting scheme.

11) Minor changes in printed output.

          **********   General Program Descriptions   **********

	Detailed descriptions of each program and the input required is
given in the appropriate program writeup. The writeups may be copied from
USR$ROOT1:[FUREY.UNICOS] with the filenames HKSCAT.WUP, PROTIN.WUP and
GPRLSA.WUP.  The following however, is a general description of the whole
process along with a suggested strategy.

PROGRAM HKSCAT -  This program reads the user supplied reflection data and
                  prepares a binary file for input to GPRLSA.  It is generally
                  run only once, with all data included (no cutoffs, they
                  can be applied later).  The output file should be saved for
                  later use, although it can be modified by an auxilliary
                  program if "fixed atom" contributions are to be included.

PROGRAM PROTIN -  This program reads the user supplied atomic coordinates
                  and a "standard group" dictionary.  It prepares a binary 
                  file for GPRLSA specifying ideal distances and angles for
                  each amino acid residue as well as any special (e.g.
                  disulphide, ligand-metal) linkages.  It also is used to
                  check for bad parameters in the input model, and to prepare
                  a list of "possible contacts" (i.e. nonbonded or nonangle 
                  related atom pairs separated by roughly van der Waals
                  contact distances).  Program GPRLSA monitors the possible
                  contact list during refinement and inserts repulsion terms
                  if a contact distance becomes too short.  Program PROTIN
                  should be rerun periodically (after about 10 runs through
                  program GPRLSA) to update the contact list as refinement
                  progresses, and to reset the shift file (see GPRLSA writeup).
                  It also must be rerun when converting from an overall
                  isotropic temperature factor to individual temperature
                  factors or when any additional atoms (e.g. solvent molecules)
                  are added or changes in the amino acid sequence are made.

PROGRAM GPRLSA -  This program actually performs the structure refinement by
                  a sparse matrix conjugate gradient algorithm which minimizes
                  differences between current and target values for functions
                  of the atomic parameters.  The target values are observed
                  structure factor amplitudes (for reflection data) and/or
                  ideal distances and angles (for stereochemical data).  In
                  general, a linear combination of structure factor and
                  stereochemical terms is minimized with respect to atomic
                  coordinates. By adjusting the relative weights for structure
                  factor and stereochemical terms, one can generally obtain
                  good agreement with the primary x-ray observations and
                  maintain reasonable stereochemistry as well.  One can also
                  minimize differences between thermal factors of atoms which
                  are coupled, and differences between structural segments
                  thought to be superimposable (e.g. related by
                  noncrystallographic symmetry). The program reads the
                  reflection data and restraint files prepared by HKSCAT and
                  PROTIN respectively (and possibly a shift file written in a
                  prior run).  The primary output is an updated shift file
                  containing all accumulated parameter shifts, however the new
                  coordinates and calculated structure factors may also be
                  output, if requested.  Printed output always includes
                  statistics relating to agreement between the current model
                  and the various types of "target" observations as well as
                  statistics on the calculated shifts. 


            
            ***************   PROGRAM LIMITS   ***************


     HKSCAT - no limit to the number of reflections. Up to 10 different
              atom types can be input, but the program currently uses
              (and expects) only 8.

     PROTIN - Up to 20000 total atoms may be input.  The atoms can be
              distributed in up to 12 chains, with up to 6 chain types. The
              maximum residue number in any chain is 998.  The standard group
              dictionary can accomodate 28 groups, 23 of which are supplied
              in the default dictionary. 

     GPRLSA - There are 3 versions of GPRLSA, all identical except for the
              maximum structure size each can handle.  It is desirable to
              use the smallest version possible as memory costs accumulate
              quickly on the CRAY.

              GPRLSA1- up to 4,000 atoms, 500 variable occupancy factors
                       up to 25,000 distances to be restrained.

              GPRLSA2- up to 9,000 atoms, 500 variable occupancy factors
                       up to 50,000 distances to be restrained.

              GPRLSA3- up to 12,000 atoms, 500 variable occupancy factors
                       up to 75,000 distances to be restrained.
  


             ***************   GETTING STARTED   ***************

     1) First program HKSCAT must be run to prepare the binary reflection
        data file.  Inputs must include the cell constants, atom type
        code numbers, coefficients for an analytical approximation to the
        scattering factors for each atom type, and the observed reflection
        data.  The exact formats required are given in  HKSCAT.WUP. The last
        number printed on the output (total # reflections) should be noted,
        and the binary file created on unit 20 should be saved. 

        TYPICAL ERRORS- Formatting errors, inclusion of more (or less) than 8
        atom types without modifying the programs, and changing the atom type
        code number so it no longer conforms to that assumed by program PROTIN.
        ( 1=C, 2=N, 3=O, 4=S, 5=Fe++, 6=H, 7=Zn++, 8=Ca++ ).  The first 4 should
        not be changed.  If other atom types are needed, then types 5 thru 8 can
        be redefined (if not needed) by changing the coefficients, however the
        corresponding Van der Waals radiii should then also be changed in the
        PROTIN input, as well as entry of the new atom type in the standard
        group dictionary. If more than 8 atom types are needed, then programs
        HKSCAT and GPRLSA must be changed.  The atom type code numbers
        must agree with those given in the standard group dictionary and Van
        der Waals constants input. The input reflection data should terminate
        with an end of file, NOT h,k,l=999 or any other value. WARNING! Some
        methods for creating the reflection data file on a VAX result in
        inclusion of a ^Z in the last record of the file.  If it is present,
        remove it with an editor. (It is interpreted by the Cray as the 0 0 0
        reflection with an Fobs of zero!!!)



     2) Next program PROTIN must be run to prepare the restraint file.
        Inputs must include the users list of atomic coordinates, the standard
        group dictionary, and control information specifying sequence and
        special contact information.  The exact formats required are given
        in PROTIN.WUP. The input and validity of the model should be verified
        by examination of the output file, and the binary file created on unit
        10 should be saved.  The information on the last page of the output
        under "SUMMARY COUNTS" should be noted.
        
        TYPICAL ERRORS- Formatting errors, duplicate residues or atoms in
        input, atoms missing from input residues (particulary the terminal
        oxygen OT for C terminus residues), mismatch between coordinate types
        (angstrom coordinates input when fractional are expected or vice versa),
        group types or atoms input that are not part of standard group
        dictionary, missing residues due to breaks in the chain, failure to
        specify special contacts not inherent in the sequence (particularly
        CB - SG distances where CB and SG are from different residues in a
        disulphide bond), putting atoms with variable occupancies somewhere
        other than at the end of the input coordinates, omitting chain
        identification numbers in multichain structures, and exceeding program
        dimensions (more than 6 chain types, more than 12 chains, more than
        20000 atoms, more than 28 groups in dictionary, more than 12 planes
        associated with multiplanar prosthetic groups, residue numbers greater
        than 998 in any one chain, more than 55 atoms or 185 distances in any
        group, more than 14 atoms in any plane).

     3) Next one of the versions of GPRLSA is run to carry out the refinement.
        Inputs include the binary files written by HKSCAT and PROTIN, control, 
        and weighting information.  The exact formats are described in
        GPRLSA.WUP. For runs other than the first in a series, an additional
        binary shift file should be supplied on unit 15 (it was output on unit
        16 in the previous run). Output files depend on which options were
        invoked, but can include unit 32 (model coordinates), unit 31
        (calculated structure factors), and unit 16 (parameter shifts). The
        file written on unit 16 should always be saved.

        TYPICAL ERRORS- Formatting errors, bad cell constants, incorrect
        symmetry cards (particulary in high symmetry space groups when one
        coordinate is a composite of two others. Inputs should be EXACTLY as
        listed in the International Tables), discrepancy between inputs and
        "SUMMARY COUNT" information from PROTIN, bad AFSIG,BFSIG parameters
        (see writeup) or bad input to HKSCAT leading to reflections with
        SIG FOBS less than or equal to zero, failure to constrain origin
        along polar axes, failure to include PDEL parameter (see writeup)
        when problem is severely underdetermined, failure to include DAMB
        damping factor card when individual thermal factors are used OR
        inclusion of it when an overall thermal factor is used, failure to
        include DAMQ damping factor card when occupancies are refined OR
        inclusion of it when they are not, failure to rerun PROTIN when
        changing from overall to individual thermal factors (and resetting
        the B's for each atom to a reasonable value in the PROTIN input),
        exceeding program dimensions.






            ***************   REFINEMENT STRATEGY   ***************

            In any macromolecular structure refinement problem the three most
        important aspects are: 1) What data should be used at what point? 
        2) When does one proceed to the next stage? and 3) How can the results
        be evaluated?  Although each structure refinement situation poses its
        own problems, the strategy outlined below addresses these aspects and
        seems to work well for most structures.  It should probably be tried
        initially and followed until the behavior of the model indicates
        otherwise.  The described strategy, when appropriate, also indicates
        how one would use the current software to perform the refinement. One
        important point is that it will, at times, be desirable to remove low
        order reflections during refinement runs, however these reflections
        should ALWAYS be reintroduced if the resulting structure factors are
        to be used to compute electron density maps.

        Before refinement can begin, programs HKSCAT and PROTIN must be run
        to prepare the necessary data files. The PROTIN log file should be
        examined carefully and any severe errors (wrong chirality, atoms
        missing, dictionary incomplete etc) corrected and the program rerun.
        If the model leads to very large numbers of "POSSIBLE CONTACTS", it
        may be desirable to rerun PROTIN with a smaller VDWCUT parameter.

        The following steps assume HKSCAT and PROTIN have been successfully
        run and their output files are available. We then use one of the
        versions of GPRLSA in the subsequent steps.

     a) GETTING STARTED- Initially, the reflection data will be on an arbitrary
        scale with the scale factor unknown. With an overall temperature
        factor set in the range 15 - 25, run one cycle of refinement.
        Use all data to moderate (~ 3 A ) resolution and weights determined
        from counting statistics (KFWGT=3), rejecting unobserved data i.e. data 
        with Fobs < k * sig Fobs  where k is 2 -> 6, depending on the quality
        (and possibly quantity) of your data. Discard file 16 as the only
        shift we are interested in is for the scale factor, which is given
        on the log file.  Now update the scale factor as indicated and do
        a structure factor calculation only (REPORT=2). Discard the files
        on units 31 and 32.  From the output log file get the "FITTED" 
        quantities AFSIG and BFSIG, multiply each by 0.4, and insert these
        modified quantities in the control file. Also change the weighting
        selection indicator to use the maximum of sigma-F, sigdel (KFWGT=2).
        At this point the scale factor and weights will be reasonable, and
        shifts computed for other parameters in subsequent cycles can be
        accepted.
        
     b) With the scale and weight parameters set, do a cycle of refinement
        (REPORT=0) using all data from infinity to moderate (~3 A ) resolution,
        and save the shift file (unit 16).  From the output, get the new scale
        factor and  new AFSIG, BFSIG parameters. Multiply the latter by .4 and
        insert the new scale and modified weight parameters in the control
        file.  Increment the JABN and DAMP parameters to reflect that an
        additional cycle has been done, and redefine the previously output
        shift file to be the new input file (on unit 15).  Repeat step b until
        there is little change in the R factor and agreement statistics for
        stereochemistry.

     c) At this point the rms deviations from ideal stereochemisty should be
        roughly equal to their estimated standard deviations, and atoms with
        extreme deviations should be examined explicitly. Run a structure
        factor calculation only (REPORT=2) to get the new coordinates (and
        structure factors). The coordinates are written to unit 32 while the
        structure factors are written to unit 31.  Correct any severe errors
        and rerun PROTIN to update the contact list. Update the control
        information to GPRLSA to reflect the new PROTIN output.  The R factor
        was probably higher for low resolution data due to lack of solvent
        in the model, so change the rejection criteria to omit data with
        (sin theta)/lambda < .05  (10 A data).  Continue submitting refinement
        cycles as in b until convergence is obtained.

     d) If the atoms have moved considerably from their initial positions, the
        model should now be compared with the original electron density map to
        insure that the interpretation has not changed drastically. Get the
        coordinates (run with REPORT=2) and make changes, if needed. If changes
        are made, rerun PROTIN and refine again.  Once convinced that the model
        has no very bad parameters, extend the data to higher resolution, if
        available (possibly in several stages), and continue refining as in b.
        If very high resolution data (d < 2.0 ) is available, you may want to
        further reject low angle reflections ( d > 6 or 8A). Continue refining
        until convergence.

     e) Once converged at the resolution limit of the data, get the coordinates
        (run with REPORT=2) and examine residue deleted electron density maps
        (usually 2Fo-Fc, obtained by omitting residue stretches to be examined
        from the phasing calculations, KILRES parameter, using output on unit
        31). The entire structure should be examined this way in stages,
        deleting no more than 10% of the structure each time and correcting
        any obvious errors as you go along. When corrected, rerun PROTIN and 
        refine again to convergence. If significant changes were made, begin
        with low resolution data again and extend it gradually as before.

     f) If data to 3A resolution or better is available and all major errors are
        corrected, change the input coordinate file to PROTIN by giving each
        atom it's own thermal factor, rerun PROTIN, update the GPRLSA control
        file (making sure to set ITEMP=1 and TO=0.0) and refine to convergence.
        
     g) Repeat step e.

     h) If you are happy with the progress, at this point you can begin to
        include solvent molecules in the model. Get the coordinates and 
        calculated structure factors (this time without deleting residues), and 
        compute a difference electron density map (Fo-Fc).  Examine the first
        50 or so highest peaks, and find the shortest contact distance each
        makes to an atom in your model (taking care to include all symmetry
        operations). If the distance is between 2.5 and 3.3 angstroms, and 
        the contact is to a model atom capable of forming hydrogen bonds,
        include the peak as a water molecule. You may want to verify it
        graphically as well, but this can be deferred. Once water molecules
        are included, some (but not all) of the low angle data can be 
        reintroduced and should be used to refine with to convergence.

     i) Repeat step h several times, until a reasonable (but not excessive!)
        number of waters are found.  Then rerun PROTIN, this time allowing
        the water molecules to have variable occupancy factors, update the
        GPRLSA control file and refine to convergence. Discard waters with
        occupancies less than 0.3 or B's greater than 50, rerun PROTIN, and
        refine to convergence.

     j) Make one last examination (step e), and correct any errors. Pay
        particular attention to residues with large deviations from the ideal
        chiral volume, and to residues with the omega torsion angle deviating
        from +/- 180 by more than about 6 degrees. Compute a Ramachandran
        plot and examine any nonglycine residues with phi/psi angles outside
        the allowed regions.  If there are any they should be explainable in
        terms of stabilizing contacts to neighboring atoms. Use an auxilliary
        program to check for any bad contacts to symmetry related molecules.
        Examine the environments around all Asn and Gln groups in terms of
        possible hydrogen bonds, and interchange the side chain O and N atoms
        if needed. If there are Asn/Asp or Gln/Glu ambiguities in the sequence,
        check the hydrogen bonding environment around each and make changes if
        needed. If any sequence or atom designations were changed, correct any
        solvent molecules which may be affected. After making the indicated
        changes, refine to convergence.

     k) Break out the champagne, you've earned it! 

           ***************   RUNNING THE PROGRAMS   ****************

	     In order to simplify running the programs, it is assumed that
       all jobs will be run in batch mode and will be submitted from the VAX
       front end ( cpwsca ) via the station software command CSUB.  This mode
       enables all job preparation and submission to be done in a VMS 
       environment, and the users need not know much about UNICOS or know
       anything about UNIX text editors. It will also enable submission of
       jobs from remote sites via BITNET.  All lineprinter output will be
       automatically placed on the front end VAX after the job completes, and
       will be forwarded to the site of submission if BITNET was used. Other
       (non-lineprinter) files can be moved to the front end VAX via DISPOSE
       commands.

            Log on to cpwsca by responding appropriately to the Username and
       Password prompts.  Then issue the command
 
                                  CHOOSE YMP
 
       From that point on you can submit Cray control files for execution
       with the command   CSUB filename    where filename is the name of the
       control file on the front end VAX.  You can check the job status by
       issuing the commands CSTAT or CQUEUE. 

       WARNING!!! The UNICOS operating system is case sensitive, thus in any
                  of the following control files be sure to use lower case
                  characters in filenames and commands. 

       RUNNING HKSCAT: Prepare input control and data files for HKSCAT.
                       Generally this involves changing only the first line
                       (cell constants) in the data file, and filenames in
                       the control file, but it may be necessary to change
                       atom types as well. Also prepare the input reflection
                       data file. The example below assumes the filenames are
                       as follows:

                       hkscat.d  - data file, read from unit 5 (see example
                                   at end)
                               
                       refdat.d  - reflection data file, read from unit 11
                     
                       refdat.20 - binary output file (unit 20, to reside on
                                   Cray.

                       hkscat.unc - Unicos batch control file.


                The contents of hkscat.unc should be as follows:
------------------------------------------------------------------------------
                 # user=myname pw=mypassword
                 # QSUB -r jobname
                 # QSUB -lt 90
                 # QSUB -eo
                 fetch hkscat.d -t 'usr$root1:[myvmsdir]hkscat.d'
                 fetch refdat.d -t 'usr$root1:[myvmsdir]refdat.d'
                 ln refdat.d fort.11
                 /usr/users/furey/hkscat < hkscat.d
                 mv fort.20 hksout.20
                 rm refdat.d hkscat.d fort.11
                 ls -C
-------------------------------------------------------------------------------
                 In the deck myname and mypassword should be replaced by
                 your UNICOS username and password. usr$root1:[myvmsdir]
                 should be replaced by your default directory on the VAX.
                 (Get it by typing  SHOW DEFAULT). Jobname is any name you
                 want (to follow job through queues). lt 90 specifies up to
                 90 seconds of cpu time. eo specifies that error messages
                 will be included in the log file. The fetch statements copy
                 files from the front end VAX to the CRAY. The ln statement
                 associates the file refdat.d with Fortran unit number 11. 
                 The next line runs the program from directory /usr/users/furey
                 and redirects input to be read from hkscat.d instead of unit
                 5. The mv statement renames the binary output file. The rm
                 statement deletes all unneeded files. The ls statement lists
                 the contents of your directory in the CRAY file system. 

       RUNNING PROTIN: Prepare input control and data files for PROTIN.
                       Generally this involves changing the sequence data
                       and special contacts, but it may require changes
                       to the standard group dictionary and Van der Waal's
                       radii input as well. Copies of the standard group
                       dictionary file (stdgrp.d) should be obtained from
                       USR$ROOT1:[FUREY.UNICOS]. The input coordinate file
                       must also be supplied.  The example below assumes
                       the filenames are as follows:

                       protin.d  - data file, read from unit 5 (see example
                                   at end)
                               
                       stdgrp.d  - standard group dictionary, read from unit 11
                     
                       coords.d  - input coordinate file, read from unit 12

                       proout.10 - binary output file (to reside on Cray, unit 
                                   10) 
                       protin.unc - Unicos batch control file.

                The contents of protin.unc should be as follows:
------------------------------------------------------------------------------
                 # user=myname pw=mypassword
                 # QSUB -r jobname
                 # QSUB -lt 180
                 # QSUB -eo
                 fetch protin.d -t 'usr$root1:[myvmsdir]protin.d'
                 fetch coords.d -t 'usr$root1:[myvmsdir]coords.d'
                 fetch stdgrp.d -t 'usr$root1:[myvmsdir]stdgrp.d'
                 ln stdgrp.d fort.11
                 ln coords.d fort.12
                 /usr/users/furey/protin < protin.d
                 mv fort.10 proout.10
                 rm protin.d coords.d stdgrp.d fort.11 fort.12
                 ls -C
-------------------------------------------------------------------------------
                 Definitions and functions of the various commands are as
                 described for HKSCAT.


       RUNNING GPRLSA: Prepare input control file for GPRLSA. Generally this
                       involves changing SUMMARY COUNT information from PROTIN,
                       reflection count from HKSCAT, weighting, scale factor
                       and various option parameters. The example below assumes
                       the filenames are as follows:

                       gprlsa.d  - data file, read from unit 5 (see example
                                   at end)
                               
                       hksout.20 - reflection data, prepared by HKSCAT, read
                                   from unit 20
                     
                       proout.10 - restraint data, prepared by PROTIN, read
                                   from unit 10

                       gprlsa.unc - Unicos batch control file.


                       In addition, depending on which options are invoked,
                       the following files may be needed or created.

                       shifts.16 - output shift file, binary (to reside on
                                   Cray, unit 16), generated if REPORT = 0 or 1

                       shifts.15 - input shift file, binary (shifts.16 from
                                   previous run), needed if JABN > 0

                       coords.32 - new coordinates, formatted, unit 32,
                                   generated if REPORT > 0

                       fcalc.31  - calculated structure factors, formatted,
                                   unit 31, generated if REPORT > 0


                The contents of gprlsa.unc FOR THE INITIAL RUN should be as
                follows:
------------------------------------------------------------------------------
                 # user=myname pw=mypassword
                 # QSUB -r jobname
                 # QSUB -lt 90
                 # QSUB -eo
                 fetch gprlsa.d -t 'usr$root1:[myvmsdir]gprlsa.d'
                 ln hksout.20 fort.20
                 ln proout.10 fort.10
                 /usr/users/furey/gprlsa1 < gprlsa.d
                 rm gprlsa.d fort.10 fort.20 fort.16
                 ls -C
-------------------------------------------------------------------------------
                 Definitions and functions of the various commands are as
                 described for HKSCAT. Note that the example runs program
                 GPRLSA1. For larger problems it may be necessary to run
                 GPRLSA2 or GPRLSA3 (see LIMITS section). The time parameter
                 depends heavily on the structure size, and is roughly given
                 (in seconds) by
                   (  0.37 x NA x NSYMM x NREF ) / 10**6   (on a Cray YMP) 
                 where NA = # atoms in asymmetric unit, NSYMM = # equivalent
                 positions input and NREF = # reflections used in the 
                 refinement. If table lookup is NOT used (ITABLE = 1), then
                 this time should be doubled.  In the example above, no
                 output other than the log file is saved, which is appropriate
                 only for the initial run.  Cray XMP times are roughly 1.57
                 times those for the YMP.

                 Sample control file when shifts are to be saved for first
                 time (appropriate when scale and weights are set, and JABN=0)
------------------------------------------------------------------------------
                 # user=myname pw=mypassword
                 # QSUB -r jobname
                 # QSUB -lt 90
                 # QSUB -eo
                 fetch gprlsa.d -t 'usr$root1:[myvmsdir]gprlsa.d'
                 ln hksout.20 fort.20
                 ln proout.10 fort.10
                 /usr/users/furey/gprlsa1 < gprlsa.d
                 mv fort.16 shifts.16
                 rm gprlsa.d fort.10 fort.20
                 ls -C
-------------------------------------------------------------------------------



                 Sample control file for intermediate cycles, i.e. shifts
                 to be saved, and JABN > 0 ( shifts input from previous cycles).
------------------------------------------------------------------------------
                 # user=myname pw=mypassword
                 # QSUB -r jobname
                 # QSUB -lt 90
                 # QSUB -eo
                 fetch gprlsa.d -t 'usr$root1:[myvmsdir]gprlsa.d'
                 ln hksout.20 fort.20
                 ln proout.10 fort.10
                 mv shifts.16 shifts.15               
                 ln shifts.15 fort.15
                 /usr/users/furey/gprlsa1 < gprlsa.d
                 mv fort.16 shifts.16
                 rm gprlsa.d fort.10 fort.15 fort.20
                 ls -C
-------------------------------------------------------------------------------



                 Sample control file for terminating cycles i.e. structure
                 factors and refined coordinates to be obtained (REPORT=2
                 and JABN > 0 ).
------------------------------------------------------------------------------
                 # user=myname pw=mypassword
                 # QSUB -r jobname
                 # QSUB -lt 90
                 # QSUB -eo
                 fetch gprlsa.d -t 'usr$root1:[myvmsdir]gprlsa.d'
                 ln hksout.20 fort.20
                 ln proout.10 fort.10
                 mv shifts.16 shifts.15               
                 ln shifts.15 fort.15
                 /usr/users/furey/gprlsa1 < gprlsa.d
                 mv fort.31 fcalc.31
                 mv fort.32 coords.32
                 dispose coords.32 -t 'usr$root1:[myvmsdir]coords.32'
                 dispose fcalc.31 -t 'usr$root1:[myvmsdir]fcalc.31'
                 rm gprlsa.d fort.10 fort.15 fort.16 fort.20
                 rm fcalc.31 coords.32
                 ls -C
-------------------------------------------------------------------------------
                 Note the introduction of DISPOSE commands to transfer the
                 coordinate and structure factor files back to the VAX.
                 For structure factor calculation only cycles (REPORT=2),
                 the time required will generally be about half of what is
                 needed for a refinement cycle.

                     



                **********   SAMPLE INPUT FILES   **********

     The following files can be copied from USR$ROOT1:[FUREY.UNICOS] to serve
as templates for preparing inputs to the program system.       


                           Sample input file hkscat.d
--------------------------------------------------------------------------------
   95.04   92.60   72.70   90.00   90.00   90.00
C      1 2.31000 20.8439 1.02000 10.2075 1.58860 .568700 .865000 51.6512 .215600
N      2 12.2126 .005700 3.13220 9.89330 2.01250 28.9975 1.16630 .582600 -11.529
O      3 3.04850 13.2771 2.28680 5.70110 1.54630 .323900 .867000 32.9089 .250800
S      4 6.90530 1.46790 5.20340 22.2151 1.43790 .253600 1.58630 56.1720 .866900
FE     5 11.1764 4.61470 7.38630 0.30050 3.39480 11.6729 0.07240 38.5566 0.97070
H      6 .489918 20.6593 .262003 7.74039 .196767 49.5519 .049879 2.20159 .001305
ZN     7 11.9719 2.99460 7.38620 .203100 6.46680 7.08260 1.39400 18.0995 .780700
CA     8 15.6348 -.00740 7.95180 .608900 8.43720 10.3116 .853700 25.9905 -14.875
--------------------------------------------------------------------------------


                           Sample input file protin.d
-------------------------------------------------------------------------------
 1.00    1.00    1.00   95.04   92.60   72.70   90.     90.     90.
    2    2 VL 1 VL 2
    1    1    7    3  218   16    2    0    1  147
    2  219    7    3  436   16    2    0    1  365
 5.00    5    0   11   12
  1.85  1.55  1.50  1.80  0.63  1.30  0.74  0.99  0.00  0.00 
0   1
   22    6   89    6 2.01         1    3
   22    5   89    6 3.00         2    4
   22    6   89    5 3.00         2    4
  140    6  199    6 2.01         1    3
  140    5  199    6 3.00         2    4
1 140    6  199    5 3.00         2    4
0   2
  242    6  309    6 2.01         1    3
  242    5  309    6 3.00         2    4
  242    6  309    5 3.00         2    4
  358    6  417    6 2.01         1    3
  358    5  417    6 3.00         2    4
1 358    6  417    5 3.00         2    4
1   1    2
  217    6  435    6 2.01         1    3
  217    5  435    6 3.00         2    4
1 217    6  435    5 3.00         2    4
2
1
--------------------------------------------------------------------------------


                           Sample input file gprlsa.d
--------------------------------------------------------------------------------
PAV REFINE 1 CYCLE ON CRAY OCT 1988
   25    0   50    0    0    0   10    0    0    0    1    0
 3309 9016  552  52027627 2024    0    0    0    1
    0    0
95.04   92.60   72.70   90.     90.     90.
  0  0
     14121 0.       .0625     .1786      6.
    1
    7 6.00 4.60 3.90 3.40 3.00 2.80 2.60 
       2   0.60 -12.70          1.000   .020    .045    .035    .250    .100
1.00    .020    1.00    .20     1.00    1.75    2.50    1.75    2.50    3.00
1.00    .30     -.25    .00     -.30    1.00    10.00   5.00    15.00   15.00
.50     .50     .50     1.00    .50     .30     .20     5.00    3.50    2.00
 0.00          1 0.03066
    0 0.00
      0.00
  4
X,Y,Z
1/2-X,-Y,1/2+Z
1/2+X,1/2-Y,-Z
-X,1/2+Y,1/2-Z
    1  100    2    4 .40  .40  .40  .40
--------------------------------------------------------------------------------