
                       B L A N C


    The BLANC program suite is a collection of programs which can be used
    for macromolecular structure determination by X-ray crystallography. The
    suite is designed to provide experienced crystallographers and students 
    with a number of simple tools and at the same time allows to test new
    approaches. Beside set of small programs, the BLANC system introduces so-
    called superprograms which represent larger programs composed of several
    smaller programs. They utilize so-called black-box principle requiring
    minimum preparations or intervention from a user. The programs are written
    in standard Fortran77. They are connected by standard BLANC data files.
    The package has been ported to all the major platforms such as Unix, VMS
    and DOS. At the moment a current version of the suite is distributed by
    anonymous ftp. The complex has been used by virtually all crystallographic
    laboratories in the former Soviet Union.

   
    Introduction.

       The BLANC program suite project was started in 1979 in the Institute of
     Crystallography by a small group of protein crystallographers headed by
     Dr. A.A.Vagin.
       The goal of the project was to develop an independent flexible set of 
     programs which could communicate with each other through standard data 
     file formats. The programs can be combined in a many different ways
     allowing user to perform any particular task. All computer code is written
     in standard Fortran77.
       The suite contain programs for analysis and merging of intensity data,
     structure solution programs utilizing SAD, SIR, MIR, SIRAS, MIRAS, 
     molecular replacement and density modification methods. The complex also
     contains programs for crystallographic refinement and the programs for
     analysis of the structures. The programs for displaying electron-density,
     rotation function, etc. are also available. The suite has been 
     systematically used for the determination of a number of protein 
     structures. 


    The program suite.

    i.Basic conception.

    The main idea behind the BLANC suite is simplicity. Special attention
    attention during development of the program system was paid to make it
    as user-friendly as possible: 

   - All programs demand minimal necessary parameters. Most of them have
     default values and can be put into the program by pressing CR.
   - It is possible to use programs in dialogue mode or in batch mode.
     Modern computing thecnology allows to carry out most of the calculations
     for small and medium sized proteins in real time, therefore, dialogue
     is a preferable way of running programs in the BLANC program system.
     However, each program automatically produces a batch command file
     during dialogue. This feature might be useful for repeated calculations.
   - Program parameter requests are self-understandable because
     there are short prompts with explanations.
   - If necessary it is possible to use keywords to change certain
     parameters. Keyword are printed by the programs at the beginning
     of execution.
   - Each program has a short description. You can find it in the program
     texts of in the BLANC manual.
   
    Most of BLANC programs do not require large memory. Most of them can be
    run on IBM PC with 640 K memory. All BLANC programs are written in standard
    FORTRAN codes and can be running at least by MS-DOS, VMS VAX, UNIX. 

    see also README in directory: blanc/

    Main BLANC programs are listed in Table 2.


    Table 2. Main BLANC programs.

    -----------------------------------------------------------------------
    Program                    Function

      A. Entrance and exit.

      readPDB               converts PDB cooordinates file to BLANC/CIF
      writePDB              converts cooordinates to PDB file
      TOBLANC               converts structure factors & phases to BLANC format
      FROMBL                converts structure factors & phases to CIF
                            The exit from program suite BLANC.
      F2CIF                 writes a contents of internal BLANC files: Fobs, 
                            Fcalc, Phases to one output formatted CIFile. 
                            The exit from program suite BLANC.

      B. Fourie transformation.

      COEF                  calculates various kinds of Fourier coefficients
      FFT                   calculates maps using FFT
      RFT                   calculates structure factors
      REDUCT                check asymmetric part, other part will be 
                            equaled to zero.
      CFFT                  COEF (without anom. scatt.) + FFT
      RFFT                  REDUCT + RFT : fast fourie transform:
                            real --> complex.
      SF_CALC               computes Structure factors by formula for
                            atomic model, can use atomic aniso B factors. 

      C. Look up.

      LOOKFL                internal files lookup
      PRINTD                converts maps to simple ASCII file
      ISOLINE               draws maps in isolines (Postscript format)
      RSOLINE               draws maps of self-rotation function 
                            in isolines (Postscript format)

      D. Statistics.

      FLSTAT                gives various statistics for structure factors
                            files, etc.
      MODCHECK              gives statistics about restraints
   

      E. Scaling.

      SCALE                 calculates Wilson plot scale
      PSCALE                Patterson origin peak scaling 
      ANISOSCL              calculates anisothermal scaling of two files


      F. Modification, copy and merge.

      MODDEN                density modification program
      COPYFL                changes file titles, scale, etc.
      CONCRD                modifies cooordinate files
      JOINFL                merges the files of structure factors,
                            phases or Hendrickson-Lattman coefficients.
      TRANS                 transforms atomic coordinates.
      SORTMRG               reads, sorts, averages the files of
                            structure factors or phases
      JOINCRD               merges two files of coordinates

      G. Molecular replacement.

      RFCOEF                calculates coefficients of spherical harmonics
      RFRES                 calculates Rotation Function (Euler angles)
      RFROT                 calculates rotated spheric coefficients
      RFADD                 adds spheric coefficients 
      TRPACK                3D translation/packing/phased translation function 
      RTRANS                transforms Rotation Function map to polar angles
      ANGSUM                computes the sum of two euler angles

      H. Isomorphous replacement.
 
      PHASE                 calculates Henrickson-Lattman coefficients
                            for a derivative
      REFINE                heavy atom's full matrix refinement

      J. Refinement.

      ROTLSQ                rigid body refinement
                            also as PATLSQ - refines oriention of a model 
                            before translation function search.
      ROTFFT                rigid body refinement by FFT

      K. Others.

      ABCDPH                calculates phases of structure factors 
                            from Henderickson-Lattman coefficients
      ALIGN                 alignes optimally 2 aminoacid sequences 
      CHECK_CRD             gets information about file "crd"
      CREAT_INF             creats INF_file
      CONDEN                reshuffles 3-d electron density map 
      CONSEQ                converts sequence to coordinate file 
      CONTACT               computes inter or/and intra molecular contacts
      DNS2CCP4              converts density map to CCP4 format
      EXTRACT               creats density map around model.
      FIT                   superimposes two sets of coordinates
      FMINUSF               creats file with Fnew = ! !F1! - scale * !F2! !
      FPLUSFOM              transfers values of Figure-Of-Merit from "phase" 
                            to "amplitude" file.
      FRAGSRCH              builds full atomic model of a protein using
                            C-alpha atom coordinates
      GENDEN                generates electron density
      GENDEN_ANISO          generates electron density for atomic
                            model with aniso B factors.
      GENIND                generates the full list of indices 
      HISTOGRM              histogram matching
      MTZ2CIF               reads MTZ file of CCP4
      PEAKSRCH              performs map peak search
      PHABCD                calculates Henderickson-Lattman coefficients
                            for calculated  phases using observed and
                            calculated amplitudes
      SURFACE               calculates solvent accessible surface area
      RANDCRD               introduces a random errors to coordinates. 
      RANDF                 introduces a random errors to !F! 
      WATPEAKS              perfomrs water peak search and water replacing

      L. Not converted to current version yet.

      SEQSRCH               searches for a given aminoacid sequence in
                            the local Sequence Data Bank.
      BBONE                 inserts side chains of a protein into
                            electron density map
      GROUP                 converts scattering from protein atoms to 
                            group scattering factors thus reducing time
                            for different refinements and searches at low
                            resolution
      DPLOT                 draws PostScript stereo picture of the model
                            with electron density 
      SKELETON              density skeletonisation procedure
      LOCSCL                anisothermal local scaling
    -----------------------------------------------------------------------

    Complete list of programs you can find in the appendix B. In the
    appendix D there is the description of these programs.
    The examples how to use these programs you can find in the
    description of superprogram in appendix A.

    BLANC superprograms are listed in Table 3.

    Table.3 BLANC superprograms
    -----------------------------------------------------------------------
       Program       Function

       A. Isomorphous replacement method:

                     see also README in blanc/mir/

       MIR         * performs automated heavy atom search and phasing for
                     one or several derivatives. This program is based on
                     program TRAHALO which used translation function
                     approach for heavy atom solution.
                   * Program supports SAD,SIR,SIRAS,MIR,MIRAS cases.
                   * can use MTZ file as input.
                   * can use the phases from other sources.
                   * can manage pseudo-translation.
                   * can refine phases by density modification  
                     /solvent flattening/

       TRAHALO       TRAslation function Heavy Atom LOcation.
                   * performs automated heavy atom search and phasing 
                     for one derivative.  
                   * Program supports SAD,SIR,SIRAS cases.
                   * can use the phases from other sources.
                   * can manage pseudo-translation.
                     / also is the part of MIR /

       MIR_II        performs automated phasing: computes the phases of 
                     native structure factors by using information of several
                     derivatives (structure factors and coordinates). 
                     Can refines phases by density modification 
                     /solvent flattening/
                     / this program is auxiliary program, just refines
                       heavy atom position, computes ABCD coefficients
                       and combines its. /                                     

       B. Molecular replacement method:
                
                     see also README in blanc/molrep/ about MOLREP. 

       MOLREP        performs automated molecular replacement search: for given
                     Fobs and atomic model creats new model coresponding
                     to the maximum of rotation and translation functions.
                     Program can check several peaks of rotation function
                     by computing each translation function, refine new model
                     and select result by correlation coefficient.
                     Program can use second fixed model with correct position
                     and orientation.
       SELFROT       calculates self-rotation function
       CROSSROT      calculates cross-rotation function
       TRFUN         calculates translation and packing function

       C. Refinement:

                     see also README in blanc/makecif/ about MAKECIF. 

       MMM           Macro Molecular Minimization/Crystallographic
                     refinement. Minimizes difference between observed electron
                     density map and map of atomic model. Uses the restrains
                     files from program MAKECIF.

       MAKECIF       CIF/PDB file manipulations  
                     uses as input CIF or PDB_file and libraries mon_lib.cif,
                     ener_lib.cif, symlib.blc and creates files:
                     1. with atomic coordinates, symmetry and unit cell
                        parameters. / file extension "crd"/ 
                     2. with chemical structure description and atomic
                        scattering structure factors. / file extension "str"/
                     3. with restraints: standard values of bonds, angles, 
                        torsion angles, chirality centres, plan groups, its
                        actual values in the structure. / file extension "rst"/
    
                     If the description of a monomer is absent in the library
                     program will try to create library description and write
                     it to special file for further inclusion to the library.
                     Program creates PostScript files with the pictures of new
                     monomers.
                     Can read additional library of monomers.
       MODCHECK      reads CIFiles of coordinates and restraints,
                     gives information about restraints (to DOC_file),
                     writes PDB_file or/and CIFile of coordinates.

       LIBCHECK      reads library of monomers, performs various checks:
                     gives information about some monomer,
                     creates PostScript file with picture and information
                     about bonds, angles, ...
                     can read additional library, add two libraries and write to
                     a new library file ;
                     can create description of new monomer reading coordinates
                     from PDB file of CIFile.
       EMIN          performs energy minimization. 
                     energy minimization / or B_factor regularization / 
                     minimizes the energy of structure using the restraints
                     files from program MAKECIF.
 
                     E_total = E_bond + E_angle + E_tors + E_vdw + E_hb
                                  
                           E_bond  = Sum ( Kb * (Bobs     -Bidl)**2    )
                           E_angle = Sum ( Ka * (ANGLEobs -ANGLEidl)**2)
                           E_tors  = Sum ( Kt * (PHIobs   -PHIidl)**2  )
                           E_vdw   = Lennard-Jones 6-12 potential
                           E_bond  = 10-12 potential
 
       DENMOD        phase refinement by density modification
                 
       D. Others:

       OMIT           for given Fobs and atomic model computes omit-phases 
                      which corresponds to omit map.
       OMIT_MAP       creats total omit map
       SFCHECK        checks quality of X-ray structures.
                      checks agreement PDB coordinates file and PDB structure 
                      factors file; gives information about R-factor,
                      correlation, Luzzaty plot, Wilson plot, Boverall, ...,
                      local error estimation by residues. Can compute omit
                      phases and use its instead phases of model.
                      Possible use program  for BLANC_coordinates file and 
                      internal BLANC structure factors file.

    -----------------------------------------------------------------------

    In the appendix A there is the description of superprograms by flow-chart.


    ii. Libraries.
  
    BLANC maintains a library of subroutines for performing the basic
    crystallographic and programming operations.  Common subroutines, e.g.,
    to open and close data files, read and write data, FFT, matrix operations,
    etc. are gathered in a special library (LIBUTILS). This shortens
    markedly program code and makes it easy to read and modify the programs. 
    Each program has a subrotine version gathered in another library (LIBSUBR).
    This allows a programmer to develop larger programs composed of smaller
    ones.

    List of subroutines you can find in the appendix E.


    iii. Three levels of programming in BLANC. Introduction
         of superprograms.

    There are three main levels of programming modules in the BLANC
    suite of programs. The first level is superprograms. The superprograms
    normally implement some method (e.g., molecular replacement using known
    model). Some programs may act like subroutines inside superprogram. On the
    second level we have usual crystallographic programs which perform basic
    operations like calculation of structure factors, electron density etc.
    They use subroutines from the library. The subroutines themselves
    constitute a third level. The main goal of this programming level is to
    solve local tasks only: matrix operation, FFT, opening and closing files,
    etc. These special arrangement of BLANC programs simplifies significantly
    development of new programs.


    iv. Documentation.

   The BLANC manual gives the details of installation procedures. In order
   to run the programs certain environment variables need to be set to appro-
   priate values. 
   Output document files are produced which contain necessary information
   about the progress of each particular run of the program.

   See also the file: blanc/doc/news

    v. Original features of BLANC.

   BLANC contains a set of new original algorithms and programs developed
   independently by us. Among them algorithms for calculation of translation
   and packing function (Vagin, A.A., 1983; Vagin, A.A. 1989), new program for
   data scaling using Patterson origin peak (will be published eslewhere), 
   program for black-box molecular replacement, black-box heavy-atom search and
   phasing, global omit map program (Vagin, A.A., unpublished results) and
   others. 

   Authors:      A.A.Vagin, G.N.Murshudov, B.V.Strokopytov

   References:

    Vagin, A.A. Ph.D. Thesis, Institute of Crystallography, Moscow, 1983.

    Vagin, A.A. New translation and packing functions., Newsletter
    on protein crystallography., Daresbury Laboratory, number 24, 1989.

    A.A.Vagin, G.N.Murshudov, B.V.Strokopytov
    The BLANC program suite for Protein Crystallography.
    Newsletter on protein crystallography., Daresbury Laboratory, 
    (1997) 33, pp 25-30.

    A.Vagin,A.Teplyakov, A Translation-Function Approach for Heavy-Atom
    Location in Macromolecular Crystallography. Acta Cryst. (1998).
    D54, 400-402 

    A.Vagin,A.Teplyakov, MOLREP: an automated program for
    molecular replacement., J. Appl. Cryst. (1997) 30, 1022-1025.

    A.A.Vaguine, J.Richelle, S.J.Wodak. SFCHECK: a unified set of 
    procedure for evaluating the quality of macromolecular stracture-factor
    data and their agreement with atomic model.
    Acta Cryst.(1999). D55, 191-205

    Main reference:

                A. A. Vagin, G. N. Murshudov and B. V. Strokopytov
                BLANC: the program suite for protein crystallography 
                J. Appl. Cryst. (1998). 31, 98 - 102

    Additional notes:

       1. BLANC was created in 1979 in Institute of Crystallography in Moscow.
          Fortunately general initial construction was goud enough and we
          have the same in this time. Only two things were changed. First,
          in the begining  there was main program which gather all program -
          subroutines in the single program. Second, there was "sum-file"
          which looked like MTZ-file of CCP4. This file gathered apmlitudes
          and phases of native structure and derivatives. After 5 years
          expirience we refused of it. A lot of structure was solved to use
          these programs and now we have programs which cumulated expirience 
          solving these structure. Main feature of new version BLANC is 
          introducing super-programs.

       2. Super-programs  - It is better to start to work with BLANC by super-
          programs. Each super-program runs as black-box. Usually this box uses
          a lot of programs ( subroutine version ) with several default
          parameters. These defaults accumulated the expirience of author
          about this subject. Text of super-program is short. It looks like
          a collection of small boxes with definition its parameters. Test of
          super-program exactly corresponds to flow-chart which you can find in
          Appendix A.So it is convinient to learn the method. Of course you can
          repeate the calculation a program by program and use another values of
          parameters or another program. After that you will have own
          modification of the method. If you put the programs (subroutine
          version) which were used with its parameters into the single program
          you will have new super-program.
 
       3. Memory request.
          The programs in the super-programs use common working array which
          size is easy to change because only one or two parameters control 
          it.

       4. NC-symmetry.
          The files of coordinates contains information about asymmetric part
          of unit cell and non-crystallographic symmetry. Some programs need  
          to use the non-crystallographical symmetry operators when it is
          necessary to restore the contents of asymmetrycal part of unic cell.
          In this case information will be taken from coordinate file. In
          other cases programs do not use this information and do not check it.

       5. FFT
          Calculation the structure factors and the density produced by FFT for
          all space groups.

       6. Phases - BLANC uses two kinds of representation of phases:
              1. by angles - mcos(phi),msin(phi) , where m - figure of merit 
              2. by Hendrickson_Lattman coefficients ABCD.
          You can have HL cofficients:
              1. from program PHASE for heavy atom derivative.
              2. to transform the phases by program PHABCD.
          You can transform HL coefficients to the phases by program  ABCDPH. 
          Coefficients ABCD are very usefull to combine phase information. You
          can do it by programs ABCDPH.
 
       7. Boff - soft low resolution cut-off.
          Disordered solvent contributes to diffraction in the low resolution 
          range. To avoid influence of solvent usual prartice is to apply 
          low resolution cut-off (~8A). Low resolution cut-off introduces
          systematical errors in the electron density especially near the
          surface of the model. It is the series termination effect. Instead to
          use of usual low resolution cut-off program  multiplies the modules
          of structure factors by special coefficient: 

              Fnew = Fold (1-exp(-Boff*s^2)) , where Boff= 4resmin^2

          This is a kind of to remove the desordered solvent influence. There 
          are several algorithms trying the modeling the solvent. Usual way is 
          to apply additional coefficient like which this program uses. But it
          is not possible to have correct model of solvent without special
          experement to registrate diffuse scattering and it seems a good idea
          is just to remove structure factors in this resolution range by 
          "soft low resolution cut-off". 

       8. Patterson scaling.
          Scaling and the estimation the overall thermal factor. Scaling by 
          Wilson plot is rather difficult because the distribution of amplitudes
          is not Wilson's distribution especially for low resolution 
          data. Program estimates the overall thermal factor by the origine 
          peak of Patterson which always looks like a gaussian. It makes the
          estemation much more easy. This method makes possible to have good
          aproximation even for low resolution data where other methods don't
          work. Scaling  observed and calculated amplitudes is making by the
          comparison of its the origine peaks of Patterson.

       9. Completeness. Missing some data means to use its with value 
          equal 0. Better aproximation for such data is the average value for
          corresponding resolution shell. Because program scales the 
          data by Patterson this average value always is more realistic.

      10. News.
          In directory blanc/doc there is file "news" which describes recent
          changes of BLANC.

      11. If you have CCP4 package you can read MTZ file and prepare
          CIFile by program MTZ2CIF which uses libraries of CCP4.
          Also you can prepare CCP4 version of SFCHECK,MOLREP,MIR  
          See file compl.bat in directory: blanc/start/unix

    vi. File formats.

     There are four main types of file format for reflection data,
     map data, coordinate data and graphics metafiles. The coordinate 
     data files are in ASCII but reflection and map files are binary.
     The BLANC reflection files in most cases uses 12 bytes of disk memory per
     one reflection. Three reflection indices are packed into one integer*4.
     Two real numbers are used for storing information about amplitude and
     error estimate (sigma). 
     The header records contain information such as cell dimensions and
     symmetry operators. The reflection data are stored notionally as columns
     of real numbers. There is no need to mark columns by special labels since
     native, derivative and calculated data are always kept in separate
     structure factor files.
     Maps are stored in a binary sequential access files as a three dimensional
     array preceded by a suitable header which contains information about map
     dimensions, cell, symmetry information, maximum and minimum, mean and
     root-mean-square deviation density values, etc. Each density grid point is
     packed into two byte integer. There is a possibility to convert BLANC map
     format to other map file formats for use on graphical devices. 
     The standard coordinate file format is close to mmCIF format.
     The program suite allows conversion from BLANC/mmCIF format to the PDB
     format and vice versa.
     Graphical programs produce output in PostScript format. 
   
    Files of system:

  1. FILE-DOCUMENT - The file for saving messages of program. Usually these
   /formatted/     messages are the same that screen of terminal messages.
                   Sometimes this file contains additional information.
                   Extention of this file "doc".
                   If program creats DOC_file additional file with 
                   extention "bat" would be created. This is batch_file.
                   It is possible to use it if you want to repeate to run
                   program.

  2. INF-FILE      - contains unit cell parameters, name of space group,
   /formatted/     crystallographical symmetry operators, 
                   non-crystallographical symmetry operators.
                   You can creat this file by program CREAT_INF. Program
                   create INF_file and as comments examles of BLANC file
                   of coordinates, formatted CIFile of structure factors,
                   phases, Henderson/Lattman coefficients. Usually all
                   internal files contains this information in the titles
                   but some programs need or may use this file.
                   Extention of this file "inf".

  3. Internal files /unformatted/:

       Modules of sructure factors, phase, coefficients, density:

       Files type of 
        "F   " contain indices and structure factors,
        "FS  " contain indices, modules of structure factors and sigmas,
        "PH  " contain indices, m*sin(alpha) and m*cos(alpha) (m is figure
               of merit), 
        "ABCD" contain indices and Hendrickson-Lattman coeficients of
               distrubition of phases, 
        "COEF" contain indices and coeficients of Forie transformation, 
        "RI  " contain grid points and corresponding value of electron
               density (see for example description in LIBUTILS),
        "ALMN" contain indices and coeficients of rotation function. 

        ALL internal files contains in the titles the information about
        unit cell parameters, name of spase group, crystallographical symmetry
        operators and special information depending on type of file.
        For example for density file : numbers of grid points,rms of 
        electron density. You can see the contents of these files by
        programs: LOOKFL, FLSTAT, PRINTD. Extention of all these files "dat".
        
  4. Atomic coordinates file and file of heavy atoms / formatted CIF/:

        These file must have extention "crd".

        Format of coordinate's file is very closed to CIF.
        Difference is for the special cases: 

       1. when the non-cryst. symmetry is exist the some groups contain 
          the same chain related by non-cryst symmetry operators. 

       2. when some of groups lying in the special position are exist.

       3. for file of heavy atom parameters

         You can find more information and an example of coordinate's file 
         and file of heavy atoms in appendix C.

  5. Output PDB_coordinates file:

        This file created by program "writePDB" and  would have extention "pdb".

  6. Output file of structure factors / formatted CIF/:

        This file created by program "frombl".

  7. Intput PDB_coordinates file:

        Thise file used by program "readPDB" and must have extention "pdb".
        When you tape file name for program request you need not tape the
        extention. Program add the extention automatically.

  8. File converting.

    1. PDB_file of coordinates may be converted to BLANC_file 
       by program "readPDB". PDB_file must contain HEADER,SCALE
       and CRYST1 cards. MTRIX card is acceptable.
    2. If you want to creat new file of coordinates, cread INF_file
       by program "creat_inf" and see example in the comments.
    3. Formatted file of structure factors may be converted to intenal
       BLANC_file by program "toblanc". Input file must be
       file with PDB-format or CIFile which contains indices 
       and structure factors or intensities or phases, (also simple 
       formatted file with "h,k,l,!F!,sig(F)" or "h,k,l,!F!" 
       and without titles is acceptable)


       A. Example of CIfile of amplitudes:

         data_structure_9ins
         _entry.id  9ins  
         _struct.title ' insuline 9ins' 
         _cell.length_a      100.000
         _cell_length_b      100.000
         _cell.length_c      100.000
         _cell.angle_alpha    90.000
         _cell.angle_beta     90.000
         _cell.angle_gamma    90.000
         _symmetry.space_group_name_H-M  'P 1 21 1'
         loop_
         _refln.index_h
         _refln.index_k
         _refln.index_l
         _refln.F_meas_au
         _refln.F_meas_au_sigma
            2  3   4    12.3   1.2
           -2 -3  -4    11.4   1.1
          . . . . . . . . . . . . .

               or just:

         data_structure_9ins
         loop_
         _refln.index_h
         _refln.index_k
         _refln.index_l
         _refln.F_meas_au
         _refln.F_meas_au_sigma
            2  3   4    12.3   1.2
           -2 -3  -4    11.4   1.1
           . . . . . . . . . . . . .

          For intensities use:

          _refln.intensity_meas 
          _refln.intensity_sigma 

          For phases use:

          _refln.phase_calc
          _refln.fom

       B. Example of PDB file of amplitudes:

       HEADER   R2SARSF   15-JAN-91
       COMPND   RIBONUCLEASE SA (E.C.3.1.4.8) COMPLEX WITH 3'-*GUANYLIC ACID 
       SOURCE   (STREPTOMYCES $AUREOFACIENS)
       AUTHOR   J.SEVCIK,E.J.DODSON,G.G.DODSON
       CRYST1  64.900   78.320   38.790  90.00  90.00  90.00 P 21 21 21    8
       CONTNT   H,K,L,S,FOBS,SIGMA(FOBS)
       FORMAT   (2(I3,2I4,2F7.0,F6.0,9X))
       COORDS   2SAR
       REMARK  1 TWO REFLECTIONS PER RECORD.
       REMARK  2 DMIN=1.85, DMAX=16.28
       CHKSUM  1 MIN H=0,MAX H=34,MIN K=0,MAX K=41,MIN L=0,MAX L=20
       CHKSUM  2 TOTAL NUMBER OF REFLECTIONS=17346
       CHKSUM  3 TOTAL NUMBER OF REFLECTION RECORDS=8673
       CHKSUM  4 SUM OF FOBS=0.235499E+07
         0   0   3     60      9    16           0   0   4    106    307    25
         0   0   5    166     23    20           0   0   6    239    657    52
         0   0   7    326      0    38           0   0   8    425    511    40
       . . . . . . . . . . . . . . . . . . . . . .

       C. Example of simple formatted file of amplitudes:
          In this case the assumption is that order of data is H,K,L,F,sig(F)
                   
            2  3   4    12.3   1.2
           -2 -3  -4    11.4   1.1
           . . . . . . . . . . . . .

               or 

            2  3   4    12.3  
           -2 -3  -4    11.4  
           . . . . . . . . . 

     The length of file records must not exceed 80 characters.
     The format of the records is free, e.g. data must be separeted by
     blancs. ( be careful - some PDB files do not satisfy this rule)  
     Program uses the information about cell parameters and space
     group from PDB coordinate file.


     Program "creat_inf" creats several examples of input files.

  vii. Installation.

     The program suite has been implemented on a large number of hardware
     platforms including Unix. Installation is straightforward and full
     instructions are given below.


       a) Copy file blanc.tar.gz from ftp site: ftp.yorvic.york.ac.uk
                                               (  user: anonymous
                                                  cd pub/alexei    )
          and uncompress it (`gunzip blanc.tar.gz')  

          After untaring  ( command: tar xvf blanc.tar ) `blanc.tar' ,
          you will get a blanc directory, with ccp4, doc, dic, example, exe,
          for, mappage, mmm, lib, prog, start/unix, start/linux 
          subdirectories and files: sfcheck.tar.gz, molrep.tar.gz,
          makecif.tar.gz, mir.tar.gz, README

       b) Compilation.

           1. go to directory: blanc/start/unix

           2. sh setup.unx 
          
                  or 

              if you want to have CCP4 version of programs
              give command:

              sh setup_ccp4

            For Linux system:
 
              
           1. go to directory: blanc/start/linux

           2. sh setup.unx  

           3. if you want to have CCP4 version for programs
              give command:

              sh setup_ccp4

      for compilation only one program / for example: printd / use commands:

        1. go to directory: blanc/for

        2. f77 -o ../exe/printd printd.f ../lib/libsubr.a ../lib/libutils.a 

      before running

        Get commands: 1. "setenv BLANC path_name".
                                         Example: "setenv BLANC ~alexei/blanc
                          or put it to your ".personal-cshrc"

                      2. "set path=($path ~alexei/blanc/exe)"

     
      Independence on operating system:

       There are only 3 subroutine depended on operating system
       in library file: blanc/lib/libutils.ftn


      GET_PATH - call getenv / get BLANC - path of blanc directory /
      DISPL    - write message to terminal and stop cursor at the end of line.
      CLOCK    - get date to --> array IH()

      You need to uncomment corresponding operators in this subroutines.
      For example:

              SUBROUTINE DISPL(LINE)
        C
        C -P- DISPL - write message to terminal and stop cursor 
        C             at the end of line.
        C             NOTE : for Linux ( CLN ) cursor will not stop
        C                    at the end of line.
        C         
              CHARACTER LINE*(*)
              INTEGER*4 NL
              CALL LENSTR(LINE,NL)
              IF(NL.GT.79) NL=79
        CVX   WRITE(*,'(''$'',A)')   LINE(1:NL)
        CDP   WRITE(*,'('' '',A,$)') LINE(1:NL)
        CMS   WRITE(*,'('' '',A,\)') LINE(1:NL)
        CLN   WRITE(*,'('' '',A  )') LINE(1:NL)
              RETURN
              END

      CVX - for VMS VAX 
      CDP - for unix system
      CMS - for MS-DOS
      CLN - for Linux 

      setup batch: setup.unx corrects file libutils.ftn automatically.

            

     Memory request:

       Size of any programs easy to change because only one or two parameters
       control it. You can find its in the begining of program.
         
       Any program uses include file 'blanc/for/nsym-max.fh':

       C -------------------------------------------------------
       C --- IPRSYM - maximal number of symmetry operators
       C
             PARAMETER ( IPRSYM=48       )
       C -------------------------------------------------------

       If you want you can change it by hand before make setup.


    ix. Testing.


      1.  Get commands: a) "setenv BLANC path_name".
                                         Example: "setenv BLANC ~alexei/blanc
                              or put it to your ".personal-cshrc"
                      b) "set path=($path ~alexei/blanc/exe)"
      2. Testing.

       There are two files for testing in the directory blanc/example. 

                           "2sar.sf"    - formatted PDB file of SF.
                           "2sar.pdb"   - PDB file of coords. 

       2.1. Testing super_program SFCHECK:

         a) go to directory blanc/example
         b) run program "sfcheck" for files:
                                          2sar.pdb - PDB_coordinate file
                                          2sar.sf  - file of structure factors
         c) after that we wil have:

                                 2sar.crd    - BLANC_coordinate file
                                 sfcheck.fob - BLANC_Fobs_file 
                                 sfcheck.fmd - BLANC_Fmodel_file 
                                 sfcheck.fsc - BLANC_Fmodel_scaling_file 
                                 sfcheck.ph  - BLANC_PHASE_file 
                                 sfcheck.dn1 - BLANC_density_file
                                               / after program "genden" / 
       2.2. Testing super_program MOLREP:

            see README in blanc/molrep/

       2.3. Testing super_program MIR:

            see README in blanc/mir/

  x. Where are files.

  1. You can find all information in directories:

              +-- exe       executable program codes 
              !
              !-- example   test files: 
              !             "2sar.sf"    - formatted PDB file of SF.
              !             "2sar.pdb"   - PDB file of coords. 
              !
      blanc --!-- for       text of all programs.
              !                                 
              !-- doc       "blanc_descr.txt" - this file.
              !             "news"
              !
              +-- lib       libraries:  "libutils.ftn"( -->"libutils.a")
              !                         "libsubr.ftn" ( -->"libsubr.a") 
              !                         "bl_graph.f"  graphics subroutines  
              !                         "ps.resource"
              !               
              +-- dic       "symlib.blc"
              !             "bs-zeros.dat"
              !             "bank.frm"    - for program "fragsrch"
              !             "mon_lib.cif"
              !             "ener_lib.cif"
              !             "ps.resource"
              !
              +-- start/unix "presubr.f"
              !              "prelib.f"
              !              "setup.unx"  
              !              "compl.bat" batch_file for compilation all programs
              !              "ftp.bat"                        and super-programs
              !
              +-- mappage    "mappage.f","map_r.f"    connection with "O".
              !              "map_prot.f,"map_asci.f"
              !
              +-- prog       example-program: template-program for read/write
              !                               read_atoms.f - model to memory
              !                               read_crd.f   - cordinates
              !                               read_sf.f    - file of !F!
              !                               read_dns.f   - density file
              +-- temp       
              !
              +-- makecif
              !
              +-- mir   
              !
              +-- mmm   
              !
              +-- sfcheck       
              !
              +-- molrep    
              !
              +-- contact    
              !
              +-- ccp4       "mtz2cif"  - reads MTZ file and prepares CIFile.   
                             "dns2ccp4" - converts density map to CCP4 format
                             

       Several programs and superprograms have independent from the BLANC 
       versions (SFCHECK, MOLREP, MIR, CONTACT,MAKECIF, EMIN, LIBCHECK etc.)
       and are kept in separate directories. You can find more information in:
 
       SFCHECK  -   pub/alexei/blanc/sfcheck/README
       MOLREP   -   pub/alexei/blanc/molrep/README
       CONTACT  -   pub/alexei/blanc/contact/README

       LIBCHECK !
       MAKECIF  !-  pub/alexei/blanc/makecif/README
       EMIN     !


       MIR      !
       MIR_II   !-  pub/alexei/blanc/mir/README
       TRAHALO  !


 xi.    Connection with CCP4.


 1. There are two programs: 

        A) MTZ2CIF which reads MTZ file and writes output
          CIFile. Use program TOBLANC to convert CIFile to BLANC file.

        B) DNS2CCP4 which converts density map( BLANC format) to CCP4 format.

    You can find MTZ2CIF,DNS2CCP4 and makefile in directory: blanc/ccp4

    For compilation give command: make mtz2cif or/and  make dns2ccp4

 2. You can have CCP4 version SFCHECK which can read MTZ file.

    For compilation go to directory: blanc/sfcheck/src
    and give command: make ccp4.
    Name of program will be the same as for ordinary version: sfcheck  

 3. You can have CCP4 version MOLREP which can read MTZ file.

    For compilation go to directory: blanc/molrep/src
    and give command: make ccp4.
    Name of program will be the same as for ordinary version: molrep  
 
 4. This possibility uses CCP4 libraries. 
    You must define the path to this libraries by variable CLIB.
    Give command: setenv CLIB <path_to_lib>

 5. Batch file blanc/start/unix/setup_ccp4 prepares CCP4 version all
    these programs: SFCHECK,MOLREP,MIR,MTZ2CIF,DNS2CCP4.
    Go to directory: blanc/start/unix and give command: sh setup_ccp4 


 xii. Programming with BLANC.

    Easy way to understand how to use BLANC subroutines is to look at
    the example-programs in "blanc/prog" directory:

      read_sf.f    - read/write structure factor files
      read_dns.f   - read/write density files
      read_crd.f   - read/write coordinate files
      reaf_atoms.f - read/write coordinate files and keep all atoms in memory.

    See also blanc/prog/README

====================================================================

 Appendix A.

   Super-programs:

	The following schemes describe briefly how to use super-programs
        of the BLANC system for implementation of several computational
        methods.

	Notations:

	1)
	    ---------	 
	   ( coor.crd )  - a file.
	    ---------	  

	2)
	   +----------+
	   |  MODDEN  |  -  a program.
	   +----------+

	3)
	   / . . . . . . /  - comment.



     Isomorphous replacement method:


    There are three super_programs for Isomorphous replacement method:
    MIR, MIR_II, TRAHALO. Main program is MIR. Others may be used
    for semi-automated solution or if you like to play with parameters of 
    program.

       MIR         * performs automated heavy atom search and phasing for
                     one or several derivatives. This program is based on
                     program TRAHALO which used translation function
                     approch for heavy atom solution.
                   * Program supports SAD,SIR,SIRAS,MIR,MIRAS cases.
                   * can use MTZ file as input.
                   * can use the phases from other sources.
                   * can manage pseudo-translation.
                   * can refine phases by modification density 
                     /solvent flattening/

    Other prorams are the auxiliary programs. Their input files have BLANC
    format. You can have these files after program MIR.
   

       TRAHALO       TRAslation function Heavy Atom LOcation.
                   * performs automated heavy atom  searchs and phasing 
                     for one derivative.  
                   * Program supports SAD,SIR,SIRAS cases.
                   * can use the phases from other sources.
                   * can manage pseudo-translation.
                     / also is the part of MIR /

       MIR_II        performs automated phasing: computes the phases of 
                     native structure factors by using information of several
                     derivatives (structure factors and coordinates). 
                     Can refines phases by modification density 
                     /solvent flattening/
                     / this program is auxiliary program, just refines
                       heavy atom position, computes ABCD coefficients
                       and combines its. /                                     
       
       see also README in blanc/mir/

  Scheme 1 :

  
       TRAHALO -  basic program of this package.
                  solution of heavy-atom structure. Reciprocal space search 
                  for heavy atom(s) positions by program TRPACK -
                  translation function + packing function.


                  Input: !F!_obs and !F!_der or only !F!_der (SAD case)
                  Output: coordinates of heavy atoms.

                  Additional input: 
                    Phase ( some phases. For example for another derivative)

 I. without input phases.

    Part 1.

    1. scales Fobs and Fder and computes (Fobs-Fder)^2 coefficients.

    2. computes Translation function using Diff. Patterson
       coefficients. Model is a sphere or Gaussian.
       If there are known  atoms program uses its as second fixed model.
       ( up to 9 atoms). 

    3. Searches and creats list of expected atoms - "self_list".
       DLIM=RESmin/2 A. DLIM - minimal distance between two peaks which
       program recognize as different peaks.
       Refines (unphased) each atom of self_list.

    4. Sorts self_list by power.
   
    Part 2.

    1.a For fist NP (input parameter) peaks of self_list computes Translation
       and Packing function for Diff. Patterson coefficients with a second
       fixed model as current peak (i) from self_list.

    1.b For current peaks (i) of self_list creates cross_list(i),
       refines (unphased) all peaks of cross_list and sorts by power.
 
    1.c Chooses additional peak with number (NP+1) and repeates 1.b.

       For it program chooses additional peaks (I_add) for each 
       cross_list(i) which is peak with maximal density and is not
       among fisrt NP peaks in self_list. Program uses as additional
       peaks the peak with maximal power.

    2. Searchs expected pairs of atoms using self_ and cross_lists.
         Two atoms are a pair if :
          a Pair of atoms: I and J must be in self_list. 
          b Cross_list (I) must have J_peak  and cross_list(J) must 
             have I_peak.  
          c Transformation from I_peak to I_peaks of cross_list(J)
             applying to J_peaks of cross_list(I) gives J_peak. 
       Refines (unphased) all pairs.

    3. Searchs expected triples of atoms using all pairs.

    4. Trying to find more atoms.
       Using the best pair (or triple) as fixed model program computes 
       Translation function to search next atom. The search for further 
       atoms goes on until the addition of the new atoms does not increase 
       the power.

 II. with input phases.

     1. creats self_list (see part 1 above) 

     2. computes phases from input ABCD_coefficients.

     3. computes diff. fourie map and creates list of expected atoms
        four_list.

     4. rejects atoms from four lists which has density < dens_limit.
        Dens_limit = rms(density) * 6.0 computed for all atom in
        four_list.

     5. search common atoms in self and four lists.

     6. writes common atoms to output file of coordinates 
  

     Also TRAHALO is a part of MIR.


                """"""""""""""""""""""""""
                "        TRAHALO         "
                "                        "
                """"""""""""""""""""""""""



      ------             ------
     ( Fder )   +------ ( Fnat )
      ------    .        ------
          .     .           .
          v     v           v
      +------------+        .
      .  PSCALE    .        .         scaling by Patterson
      +------------+        .   
      . ANISOSCL   .        .         anisothermal scaling   
      +------------+        .   
              .             .
              v             v
            ----------      .
           ( Fder_scl )     .
            ----------      .
                   .        .    
                   v        v
                  +----------+  
                  .   coef   .         coefficients for diff. Patterson
                  +----------+         or combined diff Patterson
                       .               (i.e. + anom diff patterson)      
                       v           
                    -------     
                   ( coef  )    
                    -------     
                       .        
                       v        
               +---------------+    Translation and Packing Function.
               .    TRPACK     .    one-atom probe model 
               +---------------+    (a sphere with radius =  2.5)        
                       v                        
                     -----                   
                    ( Map )                  
                     -----                   
                       v                  
               +---------------+        
               .    PEAKSRCH   .       search heavy atom positions
               +---------------+
                       .   
                       v   
                   -----------    
                  ( coords_ha )   Self_List: expected heavy atom position.
                   -----------
                        .        
                        v

            ----  Variant without phases ----
                        .
                        v        
     + ---------->------.    For each peak of Self_List.    
     !                  .        
     !                  v        
     !          +---------------+
     !          .    TRPACK     .    model is a sphere with radius = 2.5 A
     !          +---------------+    fixed model_2 is sphere with coordinates
     ^                  v            for peak of Self_List            
     !                -----                   
     !               ( Map )                  
     !                -----                   
     !                  v                  
     !          +---------------+        
     !          .    PEAKSRCH   .       search heavy atom positions
     !          +---------------+
     ^                  v   
     !              -----------    
     !             ( coords_ha )    Cross_List(I): expected heavy atom position
     !              -----------             for each peak of Self_List
     !                  .     
     !   next peak      v
     +----------<-------
                        .  
                        v                  
            +-----------------------------------+  
            . Analysis Self_List and Cross_List .  cross validation all pairs
            +-----------------------------------+
                        v   
                   -----------    
                  ( best_pair )   
                   -----------
                        .
                        v   
                +---------------+
     +--->------.    TRPACK     .    fixed model is all found atoms. 
     !          +---------------+    
     !                  v            f            
     !                -----                   
     ^               ( Map )                  
     !                -----                   
     !                  v                  
     !          +---------------+        
     !          .    PEAKSRCH   .       search next heavy atom which
     !          +---------------+       increase power
     ^                  .
     !                  v
     !             -----------    
     +--------<-- ( coords_ha )   Output file of expected heavy atom position.
                   -----------

            ----  Variant with phases ----

                after preparation Self_List

                    ---------------   -------    --------
                   (    ABCD       ) ( F nat )  ( Fder   )
                    ---------------   -------    --------
                           .           .   .        .
                           v           .   v        v
                   +--------------+    .  +------------+    
                   .    ABCDPH    .    v  .  PSCALE    .  Scaling by Patterson
                   +--------------+    .  +------------+
                           .           .        .
                           v           .        v
                       --------        .     ----------
                      ( mi Phi )       .    ( Fder_scl )
                       --------        .     ----------
                           v           .        .
                           .           .        v
                           v           v        .
                       +----------------------------+
                       .            CFFT            .  Diff. Fourie
                       +----------------------------+
                                  .
                                  .        
                                  v
                               -------
                              (  Map  )
                               -------
                                 .
                                 .                       
                                 v                  
                       +---------------+        
                       .    PEAKSRCH   .       search heavy atom positions
                       +---------------+
                             .   
                             v   
                       -----------    
                      ( coords_ha ) Four_List: expected heavy atom position.
                       -----------
                             .        
                             .
                             v                  
            +----------------------------------+        
            . Analysis Self_List and Four_List .  search common atoms
            +----------------------------------+
                          .   
                          v   
                   -----------    
                  ( coords_ha )   Output file of expected heavy atom position.
                   -----------

  Scheme 2 :

  
       SIR      - sub-program of MIR and MIR_II which uses TRAHALO
                  for given F_obs, F_derivative ( with or without anomalous
                  scattering ) searchs heavy-atom positions, refines 
                  (unphased or phased if there is input phases)
                  and computes the phases of native structure factors.
                  Without F_obs and with anomalous signal of F_derivative 
                  - SAD case.


          Var. 1  Input: !F!_obs and !F!_der
                  Output: refined coordinates of heavy atoms and
                          file of Hendrickson-Lattman coefficients (ABCD).

                  Additional input: 
                    1. coordinates of known atoms.

                 Program searches atoms in diff Patteson / TRAHALO /,
                 refines its (unphased) and computes the phases of native
                 structure factors.

          Var. 2  Input: !F!_obs , !F!_der and Phase ( some phases. For example:
                                                  phases of another derivative)
                  Output: refined coordinates of heavy atoms or
                          file of Hendrickson-Lattman coefficients (ABCD).

                  Additional input: 
                    1. coordinates of known atoms.
                    2. coordinates corresponded on input phases. 


                 Program searches atoms in diff Patteson / TRAHALO / using
                 input phases refines its and computes the phases
                 of native structure factors.
                 Refinement is phased if input parameter RMOD='P'

          Var. 3  Input: !F!_obs , !F!_der , coordinates of heavy atoms

                  Additional input: 

                    1. file of input phases. 

                  Output: refined coordinates of heavy atoms and
                          file of Hendrickson-Lattman coefficients (ABCD).

                 Program just refines coordinates of atoms.
                 and computes the phases of native structure factors.
                 Refinement is phased if there is input phases and
                 input parameter RMOD='P'

          Var. 4  Input: !F!_der with anomalous signal.
                  SAD case.

                  Output: refined coordinates of heavy atoms and
                          file of Hendrickson-Lattman coefficients (ABCD).


                """""""""""""""""""""""""""""
                "          SIR              "
                "                           "
                """""""""""""""""""""""""""""

   ---------              ----------   ----------    <-- Start is here if
  (   Fder  )            (   Fnat   ) (  Phases  )       there is not input file
   ---------              ---------    ----------        of heave atoms.
    .     .                    .       .    .     / var 1 and var2 /
    .     v                    v       V    .
    .    +------------------------------+   .
    .    .          TRAHALO            .   . 
    .    +------------------------------+   .
    .                   .                   .
    v                   v                   v
    .                   .                   .      <-- Start is here for 
   ---------       ---------    ----------  .       variant with input file
  (   Fder  )     ( COORD.HA ) (   Fnat   ) .       of heavy atoms.
   ---------       ---------    ----------  .       / var 3 /
    .     .             .          .       /.
    .     .             .          .      / .     
    .     .             .          .     /  .     
    .     .             .          .    /   .     
    .     v             v          v   .    .
    .     .             .          .   v    .     
    .    +------------------------------+   .
    .    .           REFINE             .   .  Unphased or phased refinement
    .    +------------------------------+  /  in the first cycle refine Scale2
    .                  .                  /   after that refine XYZ and Occ.
    .                  v                 /
      \          -------------------    /
        \       ( refined COORD.HA  )  /
          \      -------------------  /
           .            .            .
           v            v            v
         +------------------------------+
         .         PHASE                .
         +------------------------------+
                        .
                        v  
                     --------
                    ( PHabcd )  
                     --------

                        
  Scheme 3 :

  
       MIR           performs automated heavy atom search and phasing:
                     computes the phases of native structure factors by use
                     information of several derivatives. Can use the phases
                     from other sources. Can refine phases by  density 
                     modification /solvent flattening/


    What program is doing:

 I. variant without input phases

    Part 1.

           For each derivative (i) program uses program SIR and
           stores coordinate "coord_i(i)", ABCD coefficients: "abcd_i(i)",
           power: "power_i(i)".
         
    Part 2.

          For a pair /i(j)/ of coordinates of i-th derivative and ABCD
          coefficients j-th derivative program uses SIR and store new
          coordinates: "coord_i(j)", ABCD coefficients: "abcd_i(j)",
          power: "power_i(j)".

          For mode FAST = "F" program choose best derivative / with
          maximal power: i_max / and uses SIR only for pairs j(i_max)

    Part 3.

         a. makes choice of best pair: j_best(i_best) and
            combines phases i_best and j_best(i_best) --> sum_ABCD

         b. using sum_ABCD applies SIR for next derivative j with
            abcd_j(i_best), coord_j(i_best). 

         c. combines ABCD of j-derivative with sum_ABCD and repeats b.
            for next derivative.

    Part 4.

         applies density modification procedure: DENMOD.

 II. variant with input phases

    Part 1.

           For each derivative (i) program uses program SIR ( with input
           phases) and stores coordinate "coord_i(i)", ABCD coefficients:
           "abcd_i(i)", power: "power_i(i)". 
         
    Part 2.

           Combines ABCD of all derivative with input_ABCD.

    Part 3.

         applies density modification procedure: DENMOD.


    Program produces several output files:

     <file_derivative-name>.crd - file of heavy-atom coordinates for all
                                  derivative
     mir_abc.dat                - output file of HL_coefficients. Use program
                                  ABCDPH  to compute phases from ABCD or
                                  to combine ABCD files
     denmod_ai.dat   - ABCD coefficients of refined phases



                """""""""""""""""""""
                "       MIR         "
                "                   "
                """""""""""""""""""""

 I. variant without input phases


   ---------   -------       -------   --------
  ( Fder_1  ) ( Fder_2) ... ( Fder_4) ( Fnat   )
   ---------   -------       -------   --------
          .        .          .         .      
          v        v          v         v     
         +--------------------------------+    
         .            SIR                 . SIR separately for each derivative
         +--------------------------------+   
                        .                    
                        v              
        ---------    ---------        --------       
       (  ABCD_1 )  (  ABCD_2 )  ... ( ABCD_4 )  ABCD,Power and HA coords for
        ---------    ---------        --------   each derivative. 
        ----------   ----------      ----------       
       ( COOR.HA_1) ( COOR.HA_2) ...( COOR.HA_4)  
        ----------   ----------      ----------   
           .            .              .
           v            v              v
         +--------------------------------+    
         .            SIR                 . SIR for each pair derivatives  
         +--------------------------------+ searchs heavy-atom positions and 
           .            .           .       computes ABCD for first using 
           v            v           v       phases from second.  
       ----------   ----------   ----------
      (PHabcd_1_2) (PHabcd_1_2) (PHabcd_1_2) ... ABCD, coords and power 
       ----------   ----------   ----------      for all pair derivatives   
                             


         ----------------     ---------------
        ( PHabcd_j_i_best)   (PHabcd_i_i_best)  best pair (i-j) of derivatives
         ----------------     ---------------
                    .                 .
                    v                 v         
                 +-----------------------+    
                 .         ABCDPH        .      combine phase information 
                 +-----------------------+
                         .     
                         v     
                     ---  for all rest derivatives ---
                         .     
                         .               current k-derivative
                         v               ---------------
                         .              (COOR.HA_k_i_best) 
                         .               ---------------- 
                         .                     .
                         v                     v
                   -----------        +------------------+
    combined ABCD ( SUMabcd   )------>.       SIR        .       
                   -----------        +------------------+
                      .                     .
                      .                     .
                      .                 ----------
                      ^                (   ABCD_k )  for k-derivative
                      .                 ----------
                      .                     .
                      .                     v
                   ---------        +------------+
                  ( SUMabcd )   --> .   ABCDPH   .   combine phase information
                   ---------        +------------+
                      !                   .
                      ^                   v
                      !            -------------
                      --------<---( SUMabcd-new )   combined ABCD
                                   -------------
                                          .
                                          .
                                          v            
                                       +--------+    
                                       . DENMOD .     
                                       +--------+   
                                          .           
                                          v
                                        --------
                                       (  ABCD  )    refined phases
                                        --------
 II. variant with input phases


 -------   ------     -------   ------   ------------
( Fder_1) (Fder_2)...( Fder_4) ( Fnat ) (input phases)
 -------   ------     -------   ------   ------------
      .       .          .         .      .  
      v       v          v         v      V
     +-------------------------------------+    
     .              SIR                    . SIR separately for each derivative
     +-------------------------------------+   
                        .                    
                        v              
        ---------    ---------        --------       
       (  ABCD_1 )  (  ABCD_2 )  ... ( ABCD_4 )  ABCD,Power and HA coords for
        ---------    ---------        --------   each derivative. 
        ----------   ----------      ----------       
       ( COOR.HA_1) ( COOR.HA_2) ...( COOR.HA_4)  
        ----------   ----------      ----------   
           .            .              .
           v            v              v

                              
                           for all derivatives
                              
                                       current i-derivative
                   ----------            ---------
                  (input ABCD)          (COOR.HA_i) 
                   ---------             --------- 
                      .                     .
                      v                     v
                   -----------        +------------------+
    combined ABCD ( SUMabcd   )------>.       SIR        .       
                   -----------        +------------------+
                      .                     .
                      .                     .
                      .                 ----------
                      ^                (   ABCD_i )  for i-derivative
                      .                 ----------
                      .                     .
                      .                     v
                   ---------        +------------+
                  ( SUMabcd )-----> .   ABCDPH   .
                   ---------        +------------+
                      !                   .
                      ^                   v
                      !            -------------
                      --------<---( SUMabcd-new )   combined ABCD
                                   -------------
                                         .
                                         .
                                         v            
                                     +--------+    
                                     . DENMOD .     
                                     +--------+   
                                         .           
                                         v
                                      --------
                                     (  ABCD  )    refined phases
                        
  Scheme 4 :

  
       MIR_II        performs automated phasing: computes the phases of 
                     native structure factors by use information of several
                     derivatives (structure factors and coordinates). 
                     Can refine phases by density modification /solvent 
                     flattening/
                     / this program is auxiliary program, just refines
                       heavy atom position, computes ABCD coefficients
                       and combines its. /                                     


                """""""""""""""""""""
                "       MIR_II      "
                "                   "
                """""""""""""""""""""
   ---------   -------       -------   --------
  ( Fder_1  ) ( Fder_2) ... ( Fder_4) ( Fnat   )
   ---------   -------       -------   --------
          .        .          .         .      
          v        v          v         v     

                and

   ---------   -------       -------  
  ( coord_1 ) (coord_2) ... (coord_4) 
   ---------   -------       -------  
          .        .          .               
          v        v          v              
         +--------------------------------+    
         .            SIR                 . SIR separately for each derivative
         +--------------------------------+ only refinement  
                        .                    
                        v              
        ---------    ---------        --------       
       (  ABCD_1 )  (  ABCD_2 )  ... ( ABCD_4 )  ABCD,Power and HA coords for
        ---------    ---------        --------   each derivative. 
        ----------   ----------      ----------       
       ( COOR.HA_1) ( COOR.HA_2) ...( COOR.HA_4)  
        ----------   ----------      ----------   
           .            .              .
           v            v              v




                          ----------
                         (   ABCD_i )  for all derivative
                          ----------
                               .
                               v
                               .
         ---------        +-----------+
        ( SUMabcd )-----> . ABCDPH    .
         ---------        +-----------+
             !                  .
             ^                  v
             !            -------------
             --------<---( SUMabcd-new )   combined ABCD
                          -------------
                                .
                                v            
                           +--------+    
                           . DENMOD .     
                           +--------+   
                                .           
                                v
                            --------
                           (  ABCD  )    refined phases
                            --------


  Scheme 5 :

    How to combine phase information and compute phases:

                             --------
                            ( PHabcd )  
                             --------
                                .
                                .
                                v
         ---------        +-----------+
        ( SUMabcd )-----> . ABCDPH    .
         ---------        +-----------+
                                .
                                v
                            -------------
                           ( SUMabcd-new )   combined ABCD
                            -------------
                                .
                                v            
                            +--------+    
                            . PHABCD .     
                            +--------+   
                                .           
                                v
                             --------
                            ( PHsum  )      combined phases
                             --------


  Scheme 6 :

        DENMOD  - phase refinement by density modification /solvent flattening/



                """""""""""""""""""""""""""""""""""""""""""""
                "       DENMOD       / SOLVENT FLATTENING / "
                """""""""""""""""""""""""""""""""""""""""""""
                    ---------------   -------
                   ( ABCD nat      ) ( F nat )
                    ---------------   -------
                           .           .
                           v           .
                   +--------------+    .
                   .    ABCDPH    .    v
                   +--------------+    .
                           .           .
      i = i + 1            v           .
   / next cycle /      --------        .
 +------------------->( mi Phi )       .
 .                     --------        .
 .                         v           .
 .               +---<-----.           .
 .               .         v           v
 .               .         +-----------+
 .               .         .  CFFT     .
 .               .         +-----------+
 ;               v               .
 .               .               .
 .               .               .        
 .               .               v
 ;               v            -------
 .               .           (   Ri  )
 .               .            -------
 .               .               .
 .               .               v       /remove negative density/
 .               .  +-----------------------------+
 .               .  . MODDEN . "C" . Rmax > Ri > 0.
 .               .  +-----------------------------+
 .               .               .               """"""""""""
 .               .               v      --->---->" ENVELOPE "
 .               .             -------/   +--<---"          "
 .               .            (  R'i  )   v      """"""""""""
 ;               v             -------  -------
 .               .               .     (  Renv )
 .               .               .      -------  
 .               .               .        .    /constant is defined from      /
 .               .               .        .    /input parameter H2O - expected/
 .               .               v        v    / percent of solvent.          /
 .               .   +---------------------------------+
 .               .   . MODDEN . "W" .  CONST           .
 .               .   .        .     .                  .
 .               .   +---------------------------------+
 .               .              .
 .               .              .
 .               .              v
 .               .              .
 ;               v              .
 .               .              .
 .               .              .
 .               .              v    
 .     -------   .           -------
 .    ( F nat )  .          (   Ri  )
 .     -------   .           -------
 .        .      .              .
 ;        v      v              v
 .  +-------------+      +--------------+
 .  .   FPLUSFOM  .      .     RFFT     .
 .  +-------------+      +--------------+
 .        .                .           .
 .        v                v           v
 .   ------------       -------    --------
 .  ( mi + F nat )     ( F i+1 )  ( Ph i+1 )
 .   ------------       -------    --------
 .        .                .           .
 .        v                v           .
 .        .            +-------+       .
 .        .---->---->  .PSCALE .       v
 .        .            +-------+       .
 .        v                .           .
 ;        .                v           v
 .        .            ----------      .     ----------
 .        v           ( F i+1 sc )     .    ( ABCD iso )
 .        .            ----------      .     ----------
 .        .                .           .          .
 .        v                v           v          v
 .        .              +---------------+        .
 .        .              .   PHABCD      .        .
 .        .              +---------------+        .
 .        .                     .                 .
 .        .                  ----------           v
 .        v                 ( ABCD i+1 )          .         
 .        v                  ----------           .
 .        v                      v                v
 .        .              +--------------------------+
 .        +----->----->  .          ABCDPH          .
 .                       +--------------------------+
 .                                     . /phase combination/
 +                                     v
 .                            -------------------
 .                           ( mi+1 Ph i+1 comb  )
 .                            -------------------
 .   i=i+1                             .
 +-------------<-----------------<-----+     /next cycle/




            """""""""""""""""""""""""
  -->----> "------------+ ENVELOPE "
  --<---<- " --+        .          "
           """ . """""""""""""""""""
               .        .
               ^        v
               .   +--------------+
               .   .     RFFT     .
               .   +--------------+
               .     .        .
               .     .        .
               ^     v        v
               .  -------   ------
               . (  Fm   ) ( Phm  )
               .  -------   ------
               .     .        .
               ;     .        .
               .     .        .
               ^     v        v
               .   +-----------------+
               .   . CFFT .  Badd    .  Badd = Benv= 500 -additional thermal
               .   +-----------------+         factor for envelope 
               .          .
               .          v
               .          .
               .          v
               .      -------
               +--<--( R env )   mask_file
                      -------






     Molecular replacement method:



       Programs:

      MOLREP   - is an automated program for molecular replacement
                 which features: 

               * a full-symmetry translation and Packing function.
               * an automated choice of search parameters.
               * scaling by Patterson origin peaks. 
               * soft low resolution cut-off.
               * anisotropic correction of data.
               * rigid body refinement.
               * allows input of a priori knowledge of similarity and
                 completeness of the model.
               * can use second fixed model with correct position
                 and orientation.
               * can check several peaks of rotation function by computing
                 each translation function and select result by correlation
               *  coefficient.
               * if the number of monomers is known MOLREP can position
                 the input number of monomers in a simple run.
               * can check and manage pseudo-translation.
               * can improve the model before to use.
               * can use MTZ file.
               * can compute only Cross rotation or only Translation function.
               * can compute Self Rotation Function with PostScript plots.
               * Spherically averaged phased translation function.
               * Phased Rotation and Phased Translation functions.
               * fitting two models.

       SELFROT  - self-rotation function.
       CROSSROT - cross-rotation function.
       TRFUN    - trunslation function.
       RTRANS   - transforms Rotation Function map to polar angles
       RSOLINE  - draws maps of self-rotation function 
                  in isolines (Postscript format)
       ANGSUM   - computes the sum of two euler angles with or without
                  applying cryst. symmetry operators.
       ROTLSQ   - rigid body or multiple domains refinement.
                  also as PATLSQ - refines oriention of a model before
                  translation function search.
       CONCRD   - also useful for the preparation of model.
                  Program can:
                     -  remove water molecules
                     -  remove H-atoms
                     -  remove alternative positions
                     -  set all occupancies = 1.0
                     -  set B_overall for all atoms
                     -  prepare model with:
                                  - only CA
                                  - only back bone atoms + CB
                     -  and more

       see also README in blanc/molrep/

                                      
  Scheme 7 :    
                                      

                """"""""""""""""""""
                "     MOLREP       "
                "                  "
                """"""""""""""""""""
              ------                        --------
             ( Fobs )                      ( Model  )
              ------                        --------
                .                              .
                v                              v
                .          +----------+        .
                .-->-------. CROSSROT .---<----.
                .          +----------+        .
                v               .              .
                .               v              .
                .         ---------------      .
       .-------------->--( List of peaks )     .
       .        .         ---------------      .
       .        .               .              .
       .        v               V              v
       .        .          +----------+        .
       .        .-->-------.   TRFUN  .---<----.
       ^                   +----------+        
       .                         .              
       .                         v
       .                         .
       .                      -----------
       .                     ( new model )
       .                      -----------
       .                         .
       .                         .
       .                         .
       .                         v
       ^                +-----------------------+
       .                . Rigid body refinement .
       .                +-----------------------+
       .                         .
       .                         .
       .     next peak           .
       .------<------------<-----.
                                 .
                                 v
                          ------------
                         ( best model )
                          ------------
 
  Scheme 8 :


       SELFROT  - self-rotation function.

                """"""""""""""""""""
                "      SELFROT     "
                "                  "
                """"""""""""""""""""
              ------
             ( Fobs )
              ------
                .
                v
            +--------+
            . RFCOEF .
            +--------+
               .
               .
             -------
            (  Almn )
             -------
               .
               v
          +---------+
          . RFRES   .
          +---------+
               .
               v
            ------
           (  RI  ) --->-----------------+
            ------         .             .
              .            .             .   / stereograph. projection /
              v            v             v   /    for axis CHI         /
       +------------+  +--------+   +------------------+
       . PEAKSRCH   .  . PRINTD .   . RTRANS . CHI = ? .
       +------------+  +--------+   +------------------+
                                         .          / CHI=180 - diad /
                                         v          / CHI=120 - triad/
                                       -------      / . . . . . . . ./
                                      (  Map  )
                                       -------
                                        .    .
                                        v    v
                                +---------+ +----------+
                                . PRINTD  . . RISOLINE .
                                +---------+ +----------+


  Scheme 9 :

       CROSSROT - cross-rotation function.

               """""""""""""""""""""
               "     CROSSROT      "
               "                   "
               """""""""""""""""""""
                      ------------
                     (Coor.crd-mod) /model structure/
                      ------------
                           .
                           v
                +-------------------------------------+
                . GENDEN . for P1 , A,B,C > 2*DIM-mod .
                +-------------------------------------+
                            .
                            v
                       +-------+
                       .  RFT  .
                       +-------+
                        .     .
                        v     v
     -------        -------   ------
    ( F-obs )     ( F-mod ) (PH-mod)
     -------        -------   ------
        .             .
        v             v
    +--------+   +--------+
    . RFCOEF .   . RFCOEF .
    +--------+   +--------+
       .             .   /RAD,RESMIN,RESMAX as for F-obs/
       v             v
    --------      --------
   (Almn-obs)    (Almn-mod)
    --------      --------
        .          .
        v          v
       +------------+
       .    RFRES   .
       +------------+
            .
            v
          ------              ------------
         (  RI  )            (Coor.crd-mod)
          ------              ------------
            .                      .
            v                      v
       +------------+              .
       . PEAKSRCH   .              .
       +------------+              .
             .                     .
             .                     .
             .                     v
             .   maximal peak   +-------+
             -----------------> . TRANS .
                    Alpha       +-------+
                    Beta          .
                    Gamma         v
                            -------------
                           ( Coor.crd-mod)  /rotated/
                            -------------


  Scheme 10 :

       TRFUN    - trunslation function.

               """"""""""""""""""""""""""""""""
               "   TRANSLATION  FUNCTION      "
               "                              "
               """"""""""""""""""""""""""""""""
                      ------------
                     (Coor.crd-mod) /orient model/
                      ------------
                           .
                           v
                +-------------------------------------+
                . GENDEN . for P1 , cell as for F-obs .
                +-------------------------------------+
                       .
                       v
                    +-------+
                    .  RFFT .
                    +-------+
                     .     .
                     v     v
      -------    -------   ------
     ( F-obs )  ( F-mod ) (PH-mod)
      -------    -------   ------
         .         .        .
         v         v        v
       +------------------------+
       . TRPACK . Tm - function .      
       +------------------------+
             .  
             v
         --------
        (  Coef  )
         --------
             .
             v
         +--------+
         .   FFT  .  / for P1 /
         +--------+
            .
            v
          ------              ------------
         (  RI  )            (Coor.crd-mod)
          ------              ------------
            .                       .
            v                       v
      +----------+  maximal peak  +-------+
      . PEAKSRCH . -------------> . TRANS .
      +----------+   Delta X      +-------+
                     Delta Y         .
                     Delta Z         v
                              -------------
                             ( Coor.crd-mod)  / correct/
                              -------------   /  model /



  Scheme 11 :
 
        FRAGSRCH  -  Model building which starts from Ca-atom model, creats 
                     complete model



               """""""""""""""""""""
               "  MODEL BUILDING   "
               "                   "
               """""""""""""""""""""
                     ------
                    ( dens )
                     ------
                       .
                       v
  --------       ---------------------
 (BANK.frm)     ( Coor.crd - Ca atoms )
  --------       ---------------------
     .                 .
     .                 v
     .        +----------+  / residues names of Ca atoms /
     +----->  . FRAGSRCH .  / define amino acid sequence /
              +----------+
                        .
                        v
                    --------------
                   ( Coor.crd-mod ) 
                    --------------          



  Scheme 12 :


        OMIT     - for given Fobs and atomic model computes omit-phases which
                   corresponds to omit map.


               """""""""""""""""""""""
               "      OMIT           "
               "                     "
               """""""""""""""""""""""

                             ------------
                            (Coor.crd-mod) /model structure/
                             ------------
                                   .
                                   v
                             +-------------+
                             . GENDEN      .
                             +-------------+
                                   .
                                   v
                             +-------------+
                             .    RFFT     .
                             +-------------+
                              .          .
                              v          v
              ---------    ---------      
             ( F-obs   )  ( PH-obs  )     
              ---------    ---------   
                  .           .                 
                  v           v
               +------------------+                 
               .      CFFT        .                 
               +------------------+                 
                       .
                       v
                   ---------        
                  (   map   )       
                   ---------     
                       .
                       v
               +------------------+                 
               .      MODDEN      . remove negative density                 
               +------------------+                 
                       .
                       v
                   ---------        
                  (   map   )       
                   ---------     
                       .
                       v
               +------------------+                 
               .   OMIT_MAP       .                 
               +------------------+                 
                       .
                       v
                   ---------        
                  ( omit_map)       
                   ---------     
                       .
                       v
               +------------------+                 
               .      RFFT        .                 
               +------------------+
                  .           .                 
                  v           v
              ---------    ---------      
             ( F-omit  )  ( PH-omit )     
              ---------    ---------   

  Scheme 13 :

        OMIT_MAP - creats total omit map.
                   First, the initial (Fobs, PHImodel) map is divided 
                   into N boxes. For each box, the electron density in 
                   it is set to zero and new phases are calculated from 
                   this modified map. A new map is calculated using these 
                   phases and Fobs. This map contains the omit map for the
                   given box which is stored until the procedure is repeated 
                   for all boxes. At the end, all the boxes with omit maps 
                   compose the total omit map. Phases calculated from the 
                   total omit map are combined with the initial phases. 

               """""""""""""""""""""""
               "      OMIT_MAP       "
               "                     "
               """""""""""""""""""""""
                  -----------            .IXMIN-IDX      .IXMAX+IDX
                 ( dens, d>=0)           . .IXMIN      .IXMAX           NX
                  -----------       +------------------------------------+
                       .            !    . .           . .               !
                       v            !    . . . . . . . . .               !
                  +----------+      !    . ............. .               !
         +----->  . DNCLEAN  .      !    . :           : .               !
         .        +----------+      !    . :   CLEAN i : .               !
         .             .            !    . :           : .               !
         .             v            !    . ............. .               !
         .       --------------     !    . . . . . . . . .               !
         .      ( omit-map /i/ )    !                                    !
         .       --------------     !                                    ! 
         .             .            !                                    !
         .             v            +------------------------------------+
         .     +-------------------+          
         .     .  MODDEN   .  "R"  . 
         .     .-------------------.
         .     .   RFT             .
         .     +-------------------+
         ^        .            .
         .        v            v      
         .    ---------    ---------       ----------
         .   ( F-omit  )  ( PH-omit )     (  F-obs   )
         .    ---------    ---------       ----------
         .                     .               .
         .                     v               v
         .                  +----------------------+
         .                  .        COEF          .
         .                  .----------------------.
         .                  .         FFT          .
         .                  +----------------------+
         .                            .
         ^                            v
         .                       -------------- 
         .                      (  new-map /i/ )
         .                       -------------- 
         .                            .
         .                            v
         .    -------------       +---------+
         .   (sum-map /i/  )----->.  DNSUM  .
         .    -------------       +---------+
         .                            .
         .                            v
         .                       -------------- 
         .-------------<--------( sum-map /i+1/)
               i+1               -------------- 
     

                                        .IXMIN      .IXMAX           NX
                                 +------------------------------------+
                                 !      .           .                 !
                                 !      .           .                 !
                                 !      .............                 !
                                 !      :           :                 !
                                 !      :   STORE i :                 !
                                 !      :           :                 !
                                 !      .............                 !
                                 !                                    !
                                 !                                    !
                                 !                                    ! 
                                 !                                    !
                                 +------------------------------------+



  Scheme 14 :

     SFCHECK  - A program for assessing the agreement between the atomic 
                model and X-ray data. The program requires one or two input 
                files, with the coordinates of the model (in PDB or CIF or 
                BLANC format) and structure factors (in CIF or PDB or BLANC 
                format), and runs completely automatically.
                gives information about R-factor, correlation, Luzzaty plot,
                Wilson plot, Boverall, ...,local error estimation by residues.
                Can compute omit phases and use its instead phases of model.
                For output information program generates PostScript file.



   For the comparison the results of different structure we need to have
   standard procedure for the calculation several indicators of quality.
   This unique procedure makes possible to avoid the discrepancies in the
   values of these indicators which come from different technique of scaling, 
   different handling resolution limits, ...
   The SFCHECK is a tool to give the information about the contents of 
   file of amplitudes of structure factors and to access its agreement with
   the atomic model. Program runs completely automaticly.

   Local estimation of errors by the gradients of difference map. 
   Program calculates two electron density map: for observed and calculated
   amplitudes with the phases for the model. For each atoms the gradients of
   difference density are calculated. Expacted displacement vector is the
   ratio of the gradient and the curvature. The module of displacement 
   vector is the indicator of the positional error. Big value will point out
   the region where we have a problem with model. Program produces a plot of
   this indicator by residues and creates the new coordinates file with this 
   indicators for each atoms written instead of B-factors.

   Comparison of 2Fobs-Fcalc and modeling density is made to compute 
   the density correlation coefficient  for each residue and also for side
   chain .

   Macromolecule is a polymer and the backbone of the chain of correct 
   model must be in the region of high electron density. Program computes
   the index of connectivity for each residue. The index of connectivity is
   the product of electron density for all backbone atoms of residue 
   except atom O, i.e geometric mean vulue of 2Fobs-Fcalc for these atoms.
   The use this indicator makes posible to recognize the places with gap of
   the chain. The presence such gaps would point to a problem with connectivity
   of chain. Probably it would occur for loops of chain or for the model with
   incorrect tracing. Program computes also additional similar indicator - index
   of density which is the product of density for all atoms residue or side
   chain. This indicator would point to region with low electron density where
   we need to pay attention with model.  

   Program can use the non-crystallographical symmetry operator when 
   it is necessary to restore the contents of asymmetrycal part of unic cell.

  Output information and criteria.

  1.About crystal: cell parameters and space group.
  2.About model: number of atoms, % of solvent, reported resolution 
    and R-factor.
  3.About amplitudes: 
     a. resolution of data, effective resolution, overall thermal factor, 
        number of reflections,completeness, R-standard, R-merge;
     b. its distrubution in resolution bins; 
     c. Wilson plot with distribution !F! and overeall thermal factor estemated 
        by Wilson plot.
  4.Agreement with model.
     a. R-factor, Correlation coefficient, estimated error by Luzzati plot;
     b. its distribution in resolution bins;
     c. Luzzati plot with R-factor in resolution bins.
  5.Local error estimation. 
     a. Plot of the modules of displacement vectors by residue and side 
        chain.
     b. Plot of density correlation coefficient by residue and side chain.
     c. Plot of index of density by backbone and side chain. 
     d. Plot of index of connectivity of the chain by residue.
     e.Index of connectivity for each chain and density correlation cofficient 

     see also README in blanc/sfcheck/

===================================================================

     Apendix B: Programs:  

        In appendix D there is the descripption of these programs.
        The examples how to use these programs you can find in the
        description of super-program in appendix A.

           --- ENTRANCE & EXIT --

* readPDB  convert of cooordinates with PDB-format to BLANC-system format.
           The entrance to program suite BLANC.
* TOBLANC  converts PDB file or CIFile of Structure Factors to BLANC file.
           Reads formatted file ( CIF or PDB ) which contains indices
           and aplitudes or intensities or phases.
           Also simple (without titles) formatted file with "h,k,l,!F!"
           or "h,k,l,!F!,sig(F)" is acceptable.
           Program sorts, brings to asymmetric part of reciprical space,
           averages equivalent elements.
           The entrance to program suite BLANC.
* CREAT_INF creats INF_file with file_name extention "inf".
           Comments contain the examples of file of coordinates
           and formatted files of structure factors and phases.
* FROMBL   writes a contents of internal BLANC file to output CIFile.
           The exit from program suite BLANC.
* F2CIF    writes a contents of internal BLANC files: Fobs, Fcalc, Phases 
           to one output formatted CIFile. The exit from program suite BLANC.
* writePDB converts cooordinate file from "BLANC"-system to "PDB";

* COPYOLD  converts old_BLANC format to new_BLANC format

                --- FFT ---

* COEF     computes all kinds of the coefficients for FFT. Output file
           is for 'FFT' program. Coefficients are calculated for Patterson
           function, difference Patterson function, anomalous Patterson
           function, conventional Fourie transformation and difference Fourie
           transformation. Sim's weighting sheme may be applied.
           Input files for the programm COEF are type of "F   ",
           "FS  ", "PH  ", and output files type of "COEF".
* FFT      fast fourie transform: complex --> real.
           Program applies coefficients supplied by COEF or TRPACK
           to produce density map. For all space groups.
* CFFT     COEF ( without anom. scatt.) + FFT
* RFT      fast fourie transform: real --> complex.
           Program transforms contents of DENS-file to F and PH files.
           For all space groups.
           Density file has to contain asymm. part of unit cell.
           You neet to use REDUCT before or program RFT.
* REDUCT   checks asymmetric part, other part will be equaled to zero.
           Program reads file type of "RI" (electron density),
           and writes output file only asymmetric part of unit cell
           and to equal to zero remaining part.
* RFFT     REDUCT + RFT : fast fourie transform: real --> complex.

                --- LOOK UP ---

* LOOKFL   internal files lookup and (as option) output formatted file.
* PRINTD   show on screen the contents density-file and also can write down
           this to document file.
* ISOLINE  draws maps by isolines (Postscript format) with/without atomic model
* RISOLINE draws maps of self-rotation function by isolines (Postscript format)


                --- STATISTICS ---

* FLSTAT   gives statistics about files F or PH or DENS.
           FLSTAT calculates and writes to DOC_file some statistic
           such as distrubition of density or of structure factors, R-factors
           between two files, difference between two structure factors,
           difference between two phase angles, anomaloues characteristics of
           structure factors, on resolutions and on absolute values of these
           informations. Program may print these values in resiprocal space
           for each L-planes. Results depend on how many files will be
           reading. And much more...

                --- SCALING ---

* SCALE    Wilson's plot scaling. Program calculates the scale and the
           thermal factor by Wilson's plot scaling method.
           F_new = scale * exp(-B * R^2) * F_old,  R=sin(theta/lambda)
           This program scales files of type 'F   ', 'FS  '.
* PSCALE   scaling by origine peak of Patterson.
           Program calculates Boverall factor by Patterson or
           by Wilson plot, calculates parameters of scaling
           Scale & Thermal factor for file_1, restores missing
           reflections in file_1 (to use reflections from file_2),
           defines effective resolution, writes scaled !F! of file_1
           to output file. Without file_2 program just restore missing
           reflections by Faver, B_overal defined by Patterson.
           Can scale two files with different unit cell.
* ANISOSCL anisothermal scaling of two files of !F!.

                --- MODIFICAITION & COPY & JOIN ---

* MODDEN   copies, changes, adds, multiplies ,modifies electron density
           files. Also is the filter for the solvent flattening
           procedure /Wangs's procedure/.
           This program reads one or two files type of "RI" (electron
           density), performs on this file necessary operation and creates
           output file  type of "RI".
           If program use one input file than it performs : to add
           to this information any number, to equal to zero if value on
           this point less than given  number and much more.
           If program use two input files than it performs : to add
           each other, to apply  filtering using second file as mask
           and much more.
* COPYFL   copyies files of type 'F   ', 'FS  ','PH  ', 'ABCD','RI  '
           You may change title of files: cell parameters, resolution;
           apply coefficient and temperature factor; set Rfree flag;
           can prepare file with only L = 0 or with only even L.
* CONCRD   copies coordinate file and :
               * changes SETTING for monoclinic space groups and for 146&155;
               * restores NCS-related atoms or CS-related atoms for all
                 origins for Patterson;
               * removes water molecules;
               * sets new value B_iso or/and occupancies = 1 to all atoms;
               * changes space group ;
               * sets new atom's number (started from 1);
               * removes H-atoms;
               * removes atoms with B > Blimit or B_aniso;
               * removes atoms with alternative position;
               * removes all atoms except:
                    -  CA
                    -  back bond"s atoms + CB
                    -  P
               * change all residue_name to ALA')
               * converts fract. coords to ort. or ort. to fract.
* JOINFL   joins two file  type of "F   ", "FS  ", "PH  " or "ABCD".
           In the case "F   " or "FS  " program calculates R-factor, RMS
           between two files. Possible to remove (with writing to DOC-file)
           bad pairs. Program is used to join the phase information by
           summing of the  Hendrickson-Lattman coefficients.
* JOINCRD  join two files of coordinates.
* TRANS    ortogonal transformation of atomic coordinates.
             X"-new = [R] * ( X-old + sh1 ) + sh2
               [R]      - rotation matrix
               sh1, sh2 - vectors of shift
           Gives also information about position of molecule and radius
           of inertia.
* SORTMRG  reads, sorts, averages several "BLANC"'s files F or PH.
           Program brings refletions to asymmetric part of reciprical space,
           averages equivalent elements. Program can change setting
           for monoclinic space groups and for No 146/155.
           Use this program only by dialogue. / see also program TOBLANC /

                --- MOLECULAR REPLACEMENT ---

* RFCOEF   calculates spherical Fourie coefficients of real function
           using cristallographic Fourie coefficients. Real function
           is Patterson or electron density.
           Output file for this programm is type of "ALMN" (input
           file for program RFRES).
* RFRES    calculates Rotation Function map in Euler coordinate system.
* RFROT    calculates rotated spheric coefficients.
* RFADD    adds spheric coefficients.
* TRPACK   translation function and/or packing function algorithm for one
           or two models. Phased translation function for one or two models.
           Function:
              T - usual translation function for Patterson or Diff.Patt.
                  For Patterson search use !F!, for Difference Patterson
                  search use coefficients (!F2!-!F!)^2 which are produced by
                  program COEF. For example F2 may be the structure factors of
                  some derivative and with model as a shere or a gaussian you
                  can try to solve heavy atom structure.
              P - packing function search good position of model with minimal
                  overlapping. Higher value corresponds better position.
              M - modified translation function ( TRANS and PACK )
                  for Patterson or Diff.Patt. Program computes usual translation
                  function for each pair of cryst. symmetry operators and
                  gather its by summation or by multiplication or keep only
                  minimal value /not tested yet/. Finally multiplies result by
                  packing function to remove incorrect position with bad
                  packing.
              D - translation function for density or for difference density
                  for one or two models.
              F - only FFT with coef_file of previous run of TRPACK.
                  It is useful when you to repeat the calculation of T of TM
                  with other values of parameters.
           Model:
                  files of !F! and phases computed for space group P1 with the
                  unit cell the same as searching structure are represent a
                  model. But searching model may by just a sphere or gaussian.
                  This model may be used, for example, for searching heavy
                  atom position in the Difference Patterson.
                  You can use second fixed model with correct orientation and
                  position.
           Result:
                 is a map of translation or packing function. Use program
                  PEAKSRCH to find maximal values or program PRINTD to look at
                  the map.
* RTRANS   transforms Rotation Function map from Euler coordinate system
           to polar coordinates system.
* ROTLSQ - as PATLSQ - refines oriention of a model before
           translation function search.
* ANGSUM   computes the sum of two euler angles:
           euler_angles_result = euler_angles_2 <-+- euler_angles_1

                --- ISOMORPHOUS  REPLACEMENT ---
 
* PHASE    calculate Henrickson-Lattman coefficients for a derivative
           by Blow-Crick method.
* REFINE   (heavy) atom"s full matrix refinement.

                ---REFINEMENT ---

* ROTLSQ   rigid body or multiple domains refinement.
* ROTFFT   rigid body or multiple domains refinement by FFT.
* GRAD_X   calculates the gradients for atomic model from diff. map.
* SHIFTCRD calculates shifts of atoms from the gradients and
           writes new coordinates to output file.

                --- OTHERS ---

* EXTRACT  creats density map around model.
* GENIND   generates the full list of indices of reflections for
           given resolution limits. Type of file is 'F   '.
           Values of !F! may be equal to 1 for all reflections or represent
           diffraction from a sphere or represent Wilson's plot with
           some B_overal and Scale which may be used for scaling to
           the absolute scale.
* GENDEN   generates electron density for the atomic model.
           Also the model may represents atoms as the spheres with
           density equal 1 inside or with density depending on the
           position of model in the unit cell (usefull to study the
           packing of the moleculs in the unit).
           If you want to take into account the surface of area of atoms
           this value must be written instead of the B factors
           ( by the program "surface" )
           Program can generate the distribution of the charges instead
           electron of density. In this case coordinate's file must have
           the atomic charge instead of the occupancy.
* GENDEN_ANISO generates electron density for the atomic model with aniso B's.
           (aniso version of program GENDEN )
* GETDEN   gets values of electron density for atoms of model 
           / by convolution density with atomic distribution /
* PEAKSRCH searchs the peaks in the electron density map or Patterson or
           Rotation Function map.
* WATPEAKS water's peak search or/and water replacing.
* FIT      fits 2 sets of coordinates using least squares.
           See also program 'ALIGN' which output files are
           suitable for this program too.
* ABCDPH   calculates phases of structure factors from Henderickson/Lattman
 	   coefficients or/and joins two files of ABCD. Shows
           distribution of phase probability for some reflections.
           See also program "joinfl".
* PHABCD   calculates Henderickson/Lattman coefficients of Phase_calc
           using Fobs and Fcalc.
* HISTOGRM histogram matching.
           calculates histograms of electron density maps and creates new
           modified map accoding to histogram of test model map.
* RANDCRD  introduces a random errors to coordinates.
* RANDF    introduces a random errors to !F!.
* SF_CALC  computes !F! and phases for atomic model (with/without)
           aniso B factors by conventional method (not FFT)
* SURFACE  calculates area on Van-der-Waals surface accessible to solvent.
           writes to the file B_iso = SURFACE*10.0 + B_constant
* FRAGSRCH builds full atomic model of a protein using C-alpha atom
           coordinates of fragments found in the 'local' Protein Data Bank:
           (blanc/dic/bank.frm).
* CONTACT  computes inter or/and intra molecular contacts; 
           * can compute contacts only for special atoms ( for example
             for potential H-bonds);
           * can generate additional symmetry related atoms (with
             occupancy = 0) which are closed to initial molecule;
             can do it only for water molecules (water structure);
           * checks atoms in special positions and changes multiplicity
             for these atoms.
* CHECK_CRD gives information about coordinate file;
           computes Matthews coefficient and corresponding % solvent.
* ALIGN    alignes optimally 2 aminoacid sequences (two files of
           coordinates) and writes two output files which are suitable
           for program FIT.
* MTZ2CIF  converts some data from MTZ file to CIFile
* DNS2CCP4 converts density map to CCP4 format
* CONDEN   changes 3-d electron density map to produce new orientation
           (views along X,Y,Z, and mirror reflection are supported)
* CONSEQ   converts sequence to coordinate file which can be used for ALIGN.
* OLDNEW   convert files of type 'F   ', 'FS  ','PH  ', 'ABCD' with
           OLD_BLANC format to new format.
* FMINUSF  creats file with Fnew = ! !F1! - scale * !F2! !
* FPLUSFOM gets FOM from phases and creats file with FOM*!F!



  not ready yet.

 GENSFC	  - applies a given set of symmetry operators to an input file of
            structure factors. Output file containes all generated equivalent
            reflections.
 GENCRD	  - applies a given set of symmetry operators to an input file of atomic
	    coordinates. Output file containes all generated symmetry-related
            atoms.
 SEQSRCH  - searches for a given aminoacid sequence in the Sequence Data Bank.
 BBONE    - inserts side chains of a protein into electron density map.
 GROUP    - converts scattering from protein atoms to group scattering factors
            thus reducing time for different refinements and searches at low
            resolution.
 DPLOT    - draws PostScript stereo picture of the model with electron density 
 SKELETON - density skeletonisation procedure
 LOCSCL   - anisothermal local scaling.
 =====================================================================

 Appendix C.
 
        Format of BLANC file of coordinates. 

        Coordinate's file desribes of macromolecular structure in the crystal.
        Crystal  structure of macromolecule consists of fellowing structural
        elements:


             cryst.symm.              non- cryst.symm.
              operators                 operators  
        crystal   <-   asym.part <- group  <-  chain <- monomer <- atom  
                     of unit cell

    Each of these elements must be described completely and uniquely.

    Crystal -  is the contents of the unit cell and is generated by the cryst.
               symmetrical operators from the contents of the asymmetrical part
               of unit cell. Cell parameters, the description of the contents of
               the asymmetrical part of unit cell, the cryst. symm. operators
               define the "crystal".

    asym.part - is the contents of asym. part of unit cell and consists of 
    of unit   structural elements - "groups". Some of the "groups" may be
    cell      lying in special positions. The list of the "groups", define 
              the asym. part of unit cell.

    group   - consists of one chains. The chain and  the  non-cryst. symmetry
              operator define the group. If non-cryst. symmetry is absent
              the chain is identical the group.

    chain   - is numbered set of "monomers". The list of "monomers", the special
              links between monomers ( for example: disulfide bridges, peptide
              bond ), the description of some modification of monomers ( for
              example: terminus of polypeptide chain) define the chain. A set
              of water molecule is a chain. Chain may contain only one atom. 

    monomer - is a set of atoms connected by covalent bonds or consists of 
              the single atom.

    atom    - the  atom's type, their coordinates, B-factors, occupancies
              multyplicity define the atom.

        For complete representation of macromolecular structure coordinate file
        must contains the following descriptions:

              1. parameters of unit cell.
              2. cryst. symmetry operators.
              3. non-cryst. symmetry operators if non-cryst.symmetry is
                 exist. 
              4. list of groups contained in the asym. part unit cell with
                 non-crystallographical information.
              5. list of atoms, its coordinates, B-factors,occupancies.
              6. some information only for statistics:
                 title, R-factor, resolution. 
              7. description alternative positions and disorder groups
                 if they are present.

     The most of this information defined by category "_atom_site."
     These are the list of atoms, their coordinates, occupancies, B-factors.
     Usually the list of atoms composes the contents of assymetrycal part of
     unit cell. If the position and the numeration of monomers into the list of
     atoms are in order and the list of atoms defines the list of monomers.
     Evidently the category _atom_site. is major, the others must be considered
     as additional. It will be convenient to define any parameters only once
     in order to make less the probability of the fault. Of course, the
     parameters of unit cell and cryst.symmetry operators must always be
     described by the categories "_cell." and "_symmetry.".

     We need the additional descriptions in the special cases: 

       1. when the non-cryst. symmetry is exist the some groups contain 
          the same chain related by non-cryst symmetry operators. 

       2. when some of groups lying in the special position are exist.

     List of the categories are used for the description of the minimal
     necessary structural information:

       A. _cell_ describes the parameters of unit cell.

         _cell.length_a
         _cell.length_b
         _cell.length_c
         _cell.angle_alpha
         _cell.angle_beta
         _cell.angle_gamma

         These data names must always be present.

       B. _symmetry_ describes the cryst. symmetry operators.

         _symmetry.space_group_name_H-M 
         _symmetry.Int_Tables_number       
         _symmetry.cell_setting_number      
         _symmetry.equiv_pos_as_xyz

        Only _symmetry.space_group_name_H-M or _symmetry.Int_Tables_number
        must always be present.

      C. _struct_asym. describes the contents of asym. part of unit cell
         as the list of groups. For each group list of chains is represented
         with the description of non-cryst. symmetry and of the special 
         position. 
         The data names of the category _struct_asym. are not necessary 
         if non-cryst. symmetry or atoms lying in special positions are not
         present and the list of atoms in the category _atom_site define
         the contents of asym. part of unit cell correctly. 

         _struct_asym.id
         _struct_asym.entity_id
         _struct_asym.nc_symmetry_id
         _struct_asym.nc_symmetry_flag
         _struct_asym.multiplicity
         _struct_asym.PDB_chain_label
        # id            : serial number of group started from 1.
        # entity_id     : serial number of chain started from 1.
        #                  must be identical with _atom_site.label_entity_id
        #                if there is not NCS: number of chain = number of group 
        # nc_symmetry_id: number of NCS operator /in category "_nc_symmetry_"/
        #                     which applied to chain.
        # nc_symmetry_flag: "Y" or "." - there are coordinates of this group in
        #               the file, "N" there are not, "C" - have been calculated.

       D. _atom_set. is the list of coordinates.

          _atom_site.atom_number
          _atom_site.label_atom_id
          _atom_site.type_symbol
          _atom_site.atom_type
          _atom_site.label_alt_id
          _atom_site.label_corr_id
          _atom_site.label_res_id
          _atom_site.label_seq_id
          _atom_site.label_entity_id
          _atom_site.cartn_x
          _atom_site.cartn_y
          _atom_site.cartn_z
          _atom_site.occupancy
          _atom_site.B_iso_or_equiv
          _atom_site.thermal_displace_type
          _atom_site.symmetry_multiplicity

         # atom_type    : "M" missing,"R" rebuild,"D" dummy, "U" unknown. 
         # alt_id       : ID of alternative position.      
         # corr_id      : ID of correlated alt. positions. 
         # seq_id       : number of residue in the group 
         # entity_id    : serial number of the group started from 1.
         #                  must be identical with _struct_asym_entity_id
         # thermal_displace_type : "I" or "." - iso ,  "A" - aniso ,
         #                          "O" - overal. 
         # symmetry_multiplicity : 1 or ".", 2=1/2, 3=1/3, 4=1/4, 6=1/6,
         #                                    8=1/8, 12=1/12 

         _atom_site.label_alt_id

          This data name must be present if there are some atoms in alternative 
          positions.

       E. Title and additional information only for statistics.
          These data names may be omitted.

           _entity_reference_database_code
           _reflns_d_resolution_high
           _reflns_d_resolution_low
           _refine_ls_R_factor_all

       Special cases:

          a. If non-cryst. symmetry is exist the following data names must be
             present.

            _nc_symmetry.alpha
            _nc_symmetry.beta
            _nc_symmetry.gamma
            _nc_symmetry.vector_1
            _nc_symmetry.vector_2
            _nc_symmetry.vector_3
            # NCS operators.

            _struct_asym.id
            _struct_asym.entity_id
            _struct_asym.non_cryst_id
            _struct_asym.non_cryst_flag

          b. If some of groups or atoms are lying in special positions
             the following data name must be present.

            _struct_asym.multiplicity
                   or
            _atom_site.symmetry_multiplicity


          C. File of heavy atom parameters

            _derivative.scale1     1.00000
            _derivative.scale2     1.51493
            _derivative.Toverall   0.00000


             Additional atomic types. You need to define that only for
             wavelength other then Cu K alpha or for exotic atoms.

            _atom_type.symbol
            _atom_type.scat_Cromer_Mann_a1
            _atom_type.scat_Cromer_Mann_a2
            _atom_type.scat_Cromer_Mann_a3
            _atom_type.scat_Cromer_Mann_a4
            _atom_type.scat_Cromer_Mann_b1
            _atom_type.scat_Cromer_Mann_b2
            _atom_type.scat_Cromer_Mann_b3
            _atom_type.scat_Cromer_Mann_b4
            _atom_type.scat_Cromer_Mann_c
            _atom_type.scat_dispersion_real
            _atom_type.scat_dispersion_imag

    Example of coordinate's file.

        These file must have extention "crd".

data_structure_2SAR
_entry.id             2SAR
_database_PDB.name   'HYDROLASE (ENDORIBONUCLEASE)'
_audit.creation_date 13-DEC-90
_struct.title        'RIBONUCLEASE SA (E.C.3.1.4.8) COMPLEX WI'
_file_creation_date  'D:20.37.52/15.12.95 '
_database_PDB.remark_resolution
  'RESOLUTION. 1.8 ANGSTROMS.'
_cell.length_a       64.900
_cell.length_b       78.320
_cell.length_c       38.790
_cell.angle_alpha    90.000
_cell.angle_beta     90.000
_cell.angle_gamma    90.000
_symmetry.space_group_name_H-M  'P 21 21 21'
_symmetry.Int_Tables_number        19
_symmetry.cell_setting_number       1
loop_
_symmetry.equiv_pos_as_xyz
    +X,+Y,+Z,
    1/2-X,-Y,1/2+Z,
    -X,1/2+Y,1/2-Z,
    1/2+X,1/2-Y,-Z,
loop_
_nc_symmetry.alpha
_nc_symmetry.beta
_nc_symmetry.gamma
_nc_symmetry.vector_1
_nc_symmetry.vector_2
_nc_symmetry.vector_3
# NCS operators.
     158.0    76.60       21.0    60.8     2.57       43.8
      58.0    100.0      120.0     0.0    12.04       3.14
loop_
_struct_asym.id
_struct_asym.entity_id
_struct_asym.nc_symmetry_id
_struct_asym.nc_symmetry_flag
_struct_asym.multiplicity
_struct_asym.PDB_chain_label
# id               : serial number of group started from 1.
# entity_id        : serial number of chain started from 1.
#                     if there is not NCS: number of chain = number of group 
# nc_symmetry_id   : number of NCS operator /in category "_nc_symmetry_"/
#                     which applied to chain.
# nc_symmetry_flag : "Y" or "." - there are coordinates of this group in
#                     the file, "N" there are not, "C" - have been calculated.
     1     1  1   .  .   A
     2     1  2   .  .   A
     3     1  3   .  .   A
     4     2  1   .  .   B
     5     2  2   N  .   B
     6     3  .   .  .   3
loop_
_atom_site.atom_number
_atom_site.label_atom_id
_atom_site.type_symbol
_atom_site.atom_type
_atom_site.label_alt_id
_atom_site.label_corr_id
_atom_site.label_res_id
_atom_site.label_seq_id
_atom_site.label_entity_id
_atom_site.cartn_x
_atom_site.cartn_y
_atom_site.cartn_z
_atom_site_occupancy
_atom_site.B_iso_or_equiv
_atom_site.thermal_displace_type
_atom_site.symmetry_multiplicity

# atom_type    : "M" missing,"R" rebuild,"D" dummy, "U" unknown. 
# alt_id       : ID of alternative position.      
# corr_id      : ID of correlated alt. positions. 
# seq_id       : number of residue in the group 
# entity_id    : serial number of the group started from 1.
# thermal_displace_type : "I" or "." - iso ,  "A" - aniso ,  "O" - overal. 
# symmetry_multiplicity : 1 or ".", 2=1/2, 3=1/3, 4=1/4, 6=1/6, 8=1/8, 12=1/12 

    1 N    N    . . . ASP    1  1   45.166   12.838    9.159   1.00  30.09 . .
    2 CA   C    . . . ASP    1  1   45.225   12.437    7.741   1.00  35.72 . .
 . . . . . . . . . . . . . . . . . 

    Example of file of coordinates of heavy atoms.

        These file must have extention "crd".

data_structure_2SAR
_entry.id             2SAR
_database_PDB.name   'HYDROLASE (ENDORIBONUCLEASE)'
_audit.creation_date 13-DEC-90
_struct.title         '---'
_file_creation_date  'D:15.41.27/ 4. 5.96 '
_cell.length_a       64.900
_cell.length_b       78.320
_cell.length_c       38.790
_cell.angle_alpha    90.000
_cell.angle_beta     90.000
_cell.angle_gamma    90.000
_symmetry.space_group_name_H-M  'P 21 21 21'
_symmetry.Int_Tables_number        19
_symmetry.cell_setting_number       1
loop_
_symmetry.equiv_pos_as_xyz
    +X,+Y,+Z,
    1/2-X,-Y,1/2+Z,
    -X,1/2+Y,1/2-Z,
    1/2+X,1/2-Y,-Z,
_derivative.scale1     1.00000
_derivative.scale2     1.51493
_derivative.Toverall   0.00000
loop_
_atom_type.symbol
_atom_type.scat_Cromer_Mann_a1
_atom_type.scat_Cromer_Mann_a2
_atom_type.scat_Cromer_Mann_a3
_atom_type.scat_Cromer_Mann_a4
_atom_type.scat_Cromer_Mann_b1
_atom_type.scat_Cromer_Mann_b2
_atom_type.scat_Cromer_Mann_b3
_atom_type.scat_Cromer_Mann_b4
_atom_type.scat_Cromer_Mann_c
_atom_type.scat_dispersion_real
_atom_type.scat_dispersion_imag
   AB    12.21261   3.13220   2.01250   1.16630
          0.00570   9.89331  28.99754   0.58260
        -11.52901   0.03110   0.01800
loop_
_atom_site.atom_number
_atom_site.label_atom_id
_atom_site.type_symbol
_atom_site.atom_type
_atom_site.label_alt_id
_atom_site.label_corr_id
_atom_site.label_res_id
_atom_site.label_seq_id
_atom_site.label_entity_id
_atom_site.cartn_x
_atom_site.cartn_y
_atom_site.cartn_z
_atom_site.occupancy
_atom_site.B_iso_or_equiv
_atom_site.thermal_displace_type
_atom_site.symmetry_multiplicity
    1 PT01 PT   . . . HA     1  1   62.734   13.515    7.247   0.79  15.00 . .
    2 PT02 AB   . . . HA     1  1   33.713   56.017    0.622   0.73  15.00 . .

====================================================================

 Appendix D.

   Programs:
 
 ============================================
 
* ABCDPH   calculates phases of structure factors from Henderickson/Lattman
 	   coefficients or/and joins two files of ABCD. Shows
           distribution of phase probability for some reflections.
           See also program "joinfl".
 
   Dialogue and Batch:
 
   FILE_I:  input_file ABCD_coef
   FILE_2:  input_file ABCD_coef_2 /" " means without this file/
   FILE_O:  output_file PHASE      /" " means without output/'
   FILE_A:  output_file ABCD (+ ABCD_2) /" " means without output/
   RESOL:   MIN,MAX - resolution / default values from input_files /
   PRINT:   <0>  information about each print-th reflection will be printed
 
   Parameters of subroutine ABCDPH:
 
       SUBROUTINE ABCDPH(MDOC,NAME1,NAME2,NAMEO,NAMEA,SCCOMB
      * ,RESMIN,RESMAX,IPRINT,STOP_T,ISYM,IPRSYM,RESULT,IPRROW,IERR)
 
     MDOC    - mode of writing messages to DOC-file
               0 - only terminal , < - 0 only file, 0 < < 99 - both
               >= 99 - don't write
     NAME1   - input_file ABCD_coef
     NAME2   - input_file ABCD_coef_2 /" " means without this file/
     NAMEO   - output_file PHASE      /" " means without output/'
     NAMEA   - output_file ABCD (+ ABCD_2) /" " means without output/
     RESMIN  -  MIN,MAX - resolution / default values from input_files /
     RESMAX
     IPRINT  -  <0> information about each iprint-th reflection will be printed
     STOP_T  - must be = 'N'
     SCCOMB  - not used.
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
     IERR    - output signal of error / = 1 -error , = 0 - OK /
 
         output information :
 
      RESULT(1) - number of refls /in output file/
      RESULT(2) - <FOM>
 
 ============================================
 
* ALIGN   alignes optimally 2 aminoacid sequences (two files of
          coordinates) and writes two output files which are suitable
          for program FIT.
       Dialogue and Batch:
 
    FILE_1:           - Input coordinate file-1
    FILE_2:           - Input coordinate file-2
    MODE: <G>,1,H,S,K - matrix of comparison which will be used
                    G - gomology
                    1 - unit
                    H - hydrophobic
                    S - structure
                    K - kodon
    PEN:     <0>      - gap-penalty factor. From 0 to 1
    NRAND:   <0>      - number of random sequences to compute sigma
    WEIGHT: <N>,Y     - Y - write to coord file the weight instead of B
 
            program creates two output files (poly-alanine model) :
                              for protein-1 : align_1.crd
                              for protein-2 : align_2.crd
 
       SUBROUTINE ALIGN(MDOC,FILE_1,FILE_2,MODE,NRANR,PENR,DPENR,PENEXR,WEIGHT
      * ,RESULT,IPRROW,ISYM,IPRSYM,IERR)
 
       Parameters of subroutine:
 
       MDOC  - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
 
       ISYM   - integer*2 array for cryst.symmetry operators
       IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM)
                We need not to define contents of array ISYM
                Here is only reservation of memory.
       IERR   - signal of error / =1 -error , =o - OK /
       RESULT /real RESULT(21,21)/ - array for output information:
 
 ============================================
 
* ANGSUM   computes the sum of two euler angles:
           euler_angles_result = euler_angles_2 <-+- euler_angles_1
           if symmetry operators are available (i.e. INF_file will used)
           program computes also:
 
       euler_angles_2 <-+- Msym_i  = euler_angles_resultX <-+- euler_angles_1
 
           for each Cryst. Rotation Matrix: Msym_i
 
       Dialogue and Batch:
 
    FILE_INF: - Name of input INF_file /"inf"/ or " " if without this file
    ANGLE1:   - three euler angles_1
    ANGLE1:   - three euler angles_2
 
       It possible to use subroutine ANGSUM  by program:
 
       SUBROUTINE ANGSUM(MDOC,NAMEI,ANG1,ANG2
      *             ,ISYM,IPRSYM,RESULT,IPRMAX,IPRROW,IERR)
 
   Parameters:
 
     MDOC    - mode of writing messages to DOC-file
               0 - only terminal , < - 0 only file, 0 < < 99 - both
               >= 99 - don't write
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
     IERR    - output signal of error / =1 -error , =0 - OK /
 
     RESULT - array for output information:
     REAL RESULT(IPRMAX,IPRROW)
 
 ============================================
 
* ANISOSCL anisothermal scaling
       Fnew = Scale*Fold*exp(-(B11a*a*hh +2B12a*b*hk+..)*(1-Ks*exp(-Bsr^2))
 
       Dialogue and batch:
 
   FILE_F:  - input file F_obs.
   FILE_D:  - input file F_der.
   RESOL:   - MIN,MAX <from file> - resolution
   BOFF:     <256>    - 256 corresponds to RESmin=8A, Boff= 4RES*min^2
   BADD:      <0>       BOFF and BADD mean :
                        !F!new = !F!input *EXP(-BADD*RSQ)*(1-EXP(*-BOFF*RSQ)
   NC:        <5>     - number of cycles
   SCALE:     <1>     - initial scale
   BOVER:     <0>     - initial B_overall
   SOLV:       <N>/Y  - Y means with solvent correction
   PATT:     <Y>/N/I  - Y means pre-isoscaling by Patterson
                      - I means only isoscaling by Patterson
   FILE_O: <anisoscl_fsc> - outpit file of scaled !F!
 
   Parameters of subroutine ANISOSCL:
 
       SUBROUTINE ANISOSCL(MDOC,NAMEF,NAMED,NAMEO,RSMIN,RSMAX,SCALE,BOVER
      * ,NCYCLR,BOFF,BADD,SOLV,PATT
      * ,ISYM,IPRSYM,RESULT,IPRROW,IERR)
 
     MDOC    - mode of writing messages to DOC-file
               0 - only terminal , < - 0 only file, 0 < < 99 - both
               >= 99 - don't write
   NAMEF:  - input file F_obs.
   NAMED:  - input file F_der.
   RSMIN:  - MIN,MAX <from file> - resolution
   RSMAX:
   BOFF:     <256>    - 256 corresponds to RESmin=8A, Boff= 4RES*min^2
   BADD:      <0>       BOFF and BADD mean :
                        !F!new = !F!input *EXP(-BADD*RSQ)*(1-EXP(*-BOFF*RSQ)
   NCYCL:     <5>     - number of cycles
   SCALE:     <1>     - initial scale
   BOVER:     <0>     - initial B_overall
   SOLV:       <N>/Y  - Y means with solvent correction
   PATT:     <Y>/N/I  - Y means pre-isoscaling by Patterson
                      - I means only isoscaling by Patterson
   NAMEO: <anisoscl_fsc> - outpit file of scaled !F!
   ISYM    - integer*2 array for cryst.symmetry operators.
   IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
             max number of cryst. symm. operators.
   IERR    - output signal of error / = 1 -error , = 0 - OK /
 
         output information :
 
      REAL RESULT(IPRROW,3)
 
         RESULT( 1,1)=NC
         RESULT( 2,1)=Scale    Fnew = Scale*Fold*exp(-(B11a*a*hh +2B12a*b*hk+..)
         RESULT( 3,1)=Ks              *(1-Ks*exp(-Bsr^2))
         RESULT( 4,1)=Bs
         RESULT( 5,1)=B11
         RESULT( 6,1)=B22
         RESULT( 7,1)=B33
         RESULT( 8,1)=B12
         RESULT( 9,1)=B13
         RESULT(10,1)=B23
         RESULT(11,1)=RVAL(1) Ratio of Eigen values
         RESULT(12,1)=RVAL(2)
         RESULT(13,1)=RVAL(3)
         RESULT(14,1)=RFACTOR
         RESULT(15,1)=CC
         RESULT(16,1)=NREF
         RESULT(17,1)=RSMIN
         RESULT(18,1)=RSMAX
 
         RESULT( 1,2)=EVAL(1)
         RESULT( 2,2)=EVAL(2)   Eigen values
         RESULT( 3,2)=EVAL(3)
         RESULT( 4,2)=EVEC(1,1) Eigen vectors
         RESULT( 5,2)=EVEC(2,1)
         RESULT( 6,2)=EVEC(3,1)
         RESULT( 7,2)=EVEC(1,2)
         RESULT( 8,2)=EVEC(2,2)
         RESULT( 9,2)=EVEC(3,2)
         RESULT(10,2)=EVEC(1,3)
         RESULT(11,2)=EVEC(2,3)
         RESULT(12,2)=EVEC(3,3)
 
            iso-scaling by Patterson
 
         RESULT(1,3) = Bscale    F2_new = F2_old * scale * exp (-Bscal*s^2)
         RESULT(2,3) = SCALE
                                    Bscale = Boverall_1-Boverall_2
                                    SCALE  = Sqr_p000_1/Sqr_p000_2
 
         RESULT( 3,3)  = SQR_P000 - sqrt(P000_patt) for file_1 (test)
         RESULT( 4,3)  = B_OVER     B_overall
         RESULT( 5,3)  = RESEFF     Res_optical
         RESULT( 6,3)  = RESMXI     Res_max
 
         RESULT( 7,3)  = SQR_P000 - sqrt(P000_patt) for file_2 (scaling)
         RESULT( 8,3)  = B_OVER     B_overall
         RESULT( 9,3)  = RESEFF     Res_optical
         RESULT(10,3)  = RESMXI     Res_max
 
 ============================================
 
* CFFT     COEF ( without anom. scatt.) + FFT
       Dialogue and batch:
 
    FILE_1:  -   input file-1 of the structure factors.
    FILE_2:  -   name of FILE-DERIV, if you want it
    FILE_PH: -   name of FILE-PHASE, if you want it
    FILE_O:  -   output file of the coefficients.
    RESOL:   MIN,MAX , <from files> - resolution
    SCALE:   <1.0>
    BOFF     <0> , 240 corresponds to RESmin=10 /aprox./
                 For suppressing low resolutin reflections, kind of
                 modeling desordered solvent: Fnew=(1-exp(-Boff*s**2))*Fold
    BADD:    <0.0>
                      SCALE and BADD will be applyed:
                      DEL = (Fder*SCALE-Fnat)*EXP(-Badd*RSQ
                      or F = ( Fnat*SCALE )*EXP(-Badd*RSQ)
    LAP:     <N>,Y  - coefficients of the curvature (second derivative)
                      will be calculated: COEF = 4 * PI**2 * S**2 * F(hkl)
    ASYM:    <N>/Y , Y means to calculate only asymm.part of unit cell.
    LIMZ:  MIN MAX numbers of Z-section /default for SF calculation/
 
 
       SUBROUTINE CFFT(MDOC,LAP,POOL,NX,NY,NZ,IZMIN,IZMAX,F000,NAMEF1
      * ,NAMED,NAMEPH,NAMEF2,RESMIN,RESMAX,BADD,BOFF,ASYM,SCALE
      * ,MEMORY,RESULT,IPRROW,ISYM,IPRSYM,IERR)
 
       Parameters:
 
       MDOC  - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
       NAMEF1 - name of input file F_1
       NAMEF2 - name oF input file F_2 / or " "/
       NAMEPH - name oF input file PHASE / or " "/
       NAMED  - name of output dens-file / or " "/.
       SCALE,BOFF,BADD -  - see above.
       LAP,ASYM  - see above.
       NX,NY,NZ - numbers of points of grid corresponding axises X,Y,Z
                  if NX=NY=NZ=0 program will define minimal values
                  suitable for calculation struture factors.
       IZMIN,IZMAX - serial numbers for first and last Z-section of density.
                   "0,-1"  mean to get default value for SF calculation.
       F000:    <0.0>   - value of F(0,0,0)
                > 0   - use this value
                < 0   - use value from input coef_file.
       POOL    - real array POOL(MEMORY) for
                 one Z-section of electron density NX x NY < MEMORY.
       MEMORY  - dimension of real array POOL.
       ISYM    - integer*2 array for cryst.symmetry operators
       IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM)
                 We need not to define contents of array ISYM
                 Here is only reservation of memory.
       IERR    - signal of error / =1 -error , =o - OK /
 
       Output information:
 
       RESULT(IPRROW) /real/ :
 
       RESULT(1,1) = number of points
       RESULT(2,1) = Dmax
       RESULT(3,1) = Dmin
       RESULT(4,1) = RMS
       RESULT(5,1) = <D>
       RESULT(6,1) = N_positive points
       RESULT(7,1) = N_negative points
       RESULT(8,1) = RMS for positive and =0 density
       RESULT(9,1) = RMS for negative and =0 density
       RESULT(10,1) = <D> for positive and =0 density
       RESULT(11,1) = <D> for negative and =0 density
       IF(IPRROW.GE.15) THEN
         RESULT(12,1) = 3-moment of density
         RESULT(13,1) = 4-moment of density
         RESULT(14,1) = P_000 - value of origine Patterson peak.
         RESULT(15,1) = N points with density = 0
       ENDIF
 
 ============================================
 
* CHECK_CRD gives information about coordinate file;
           computes Matthews coefficient and corresponding % solvent.
   Dialogue and Batch:
 
     FILE_I  - BLANC system input coordinate file without extention "crd".
 
       SUBROUTINE CHECK_CRD(MDOC,FILE_I,ISYM,IPRSYM
      * ,STR_TITLE,STR_DATE,FILE_O,NATOM,RESULT,IPRMAX,IPRROW,PDB,IERR)
 
   Parameters of subroutine CHECK_CRD:
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     FILE   - name of input file without extention "crd".
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
     output information:
       REAL      RESULT (IPRROW,IPRMAX)
 
       PDB   /character*1/ "C" for BLANC_system file "crd"
                           "N" for NDB file "cif"
       RESULT(1,1) - PDB_code
       RESULT(1,2) - number of atoms
       RESULT(1,3) - number of water molecules
       RESULT(1,4) - reported resolution
       RESULT(1,5) - reported R-FAC
       RESULT(1,6) - (1,11) - CELL parameters
 
       RESULT(1,12)
       RESULT(1,13)  Space group
       RESULT(1,14)
 
       RESULT(1,15) - number of H-atoms
       RESULT(1,16) - number of chains
       RESULT(1,17) - NCS , number of NCS  operators.
       RESULT(1,18) - IGIVEN
       RESULT(1,19) - NRES_TOT
 
       Coordinates of atoms. Number of atoms = NATOM ( =< IPRROW-10 )
                             NATOM = 0 means max possible.
 
       RESULT(i+10,1)  IX
       RESULT(i+10,2)  IY
       RESULT(i+10,3)  IZ
       RESULT(i+10,4)  Dens  (occ)
       RESULT(i+10,5)  sigma (1.0)
       RESULT(i+10,6)  Xort
       RESULT(i+10,7)  Yort
       RESULT(i+10,8)  Zort
       RESULT(i+10,9)  Xfrac
       RESULT(i+10,10) Yfrac
       RESULT(i+10,11) Zfrac
       RESULT(1+10,12) number of atoms
 
 
 ============================================
 
* COEF     computes all kinds of the coefficients for FFT. Output file
           is for 'FFT' program. Coefficients are calculated for Patterson
           function, difference Patterson function, anomalous Patterson
           function, conventional Fourie transformation and difference Fourie
           transformation. Sim's weighting sheme may be applied.
           Input files for the programm COEF are type of "F   ",
           "FS  ", "PH  ", and output files type of "COEF".
   Programm calculates coefficients with phases and two file F:
 
     F1 ( F1=Fnat or Fcalc ) means first file of modules SF,
     F2 ( F2=Fder=Fobs ) - second.
 
     A=W*FOM*(SCALE*F2-F2)*EXP(-TEMP*RSQ)*SIN(PH)
     B=W*FOM*(SCALE*F2-F1)*EXP(-TEMP*RSQ)*COS(PH)
                       where W - Sim''s weight, if you want it.
                             if Sim'' weight is used SCALE=1 TEMP=0
 
   With phases and one file which contains F(hkl) and F(-h-k-l):
   Anomalous Furier function.
 
     A=FOM*(SCALE * F+ - F-)*EXP(-TEMP*RSQ)*SIN(PH)
     B=FOM*(SCALE * F+ - F-)*EXP(-TEMP*RSQ)*COS(PH)
                                     where F+ is F(hkl), F- is F(-h-k-l)
   With phases but
      ( F1 = Fnat = Fobs )
     Fourie transformation
     A=FOM*(SCALE*F1)*EXP(-TEMP*RSQ)*SIN(PH)
     B=FOM*(SCALE*F1)*EXP(-TEMP*RSQ)*COS(PH)
 
   Without phases and without second file F:
      ( F1 = Fnat = Fobs )
     Patterson function
     A=(SCALE*F1)**2
     B=2.0*SCALE*F1*sd(SCALE*F1)
 
   Without phases and with two files F:
   Difference Patterson function.
     F1 ( F1=Fnat or Fcalc ) , F2 ( F2=Fder=Fobs )
     A=(SCALE *F2-F1)**2
     B=2.0*(SCALE*F2-F1)*sd(SCALE*F2-F1)
 
   Without phases and one file which contains F(hkl) and F(-h-k-l):
   Anomalous Patterson function.
     A=(SCALE * F+ - F- )**2
     B=2.0*(SCALE * F+ - F-)*sd(SCALE * F+ - F-)
                                     where F+ is F(hkl), F- is F(-h-k-l)
 
   With phases and one file which contains F(hkl) and F(-h-k-l):
   Anomalous Furier function.
     A=W*FOM*(SCALE*F2-F2)*EXP(-TEMP*RSQ)*SIN(PH)
     B=W*FOM*(SCALE*F2-F1)*EXP(-TEMP*RSQ)*COS(PH)
                       where W - Sim''s weight, if you want it.
                             if Sim'' weight is used SCALE=1 TEMP=0
 
        where RSQ - distance between planes in reciprocal space.
              FOM - figure of merit.
              Sim's weight - W = I1(X)/I0(X), X=(2*F1*F2)/<!F1-F2!**2>
                                              I1,I2 - bessel functions
  ---------------------------------------------------------------
   Dialogue and Batch:
 
    FILE_1:  -   input file-1 of the structure factors.
    FILE_2:  -   name of FILE-DERIV, if you want it
    FILE_PH: -   name of FILE-PHASE, if you want it
    FILE_O:  -   output file of the coefficients.
    RESOL:   MIN,MAX <from files> resolution
    BOFF     <0> , 240 corresponds to RESmin=10 /aprox./
                 For suppressing low resolutin reflections, kind of
                 modeling desordered solvent: Fnew=(1-exp(-Boff*s**2))*Fold
    ANOM:    <N>,Y     Y - if you want to use anomal-scattering,
    FOM:     <0.0>   limit of fig-of-merit
                      / -1 means don''t use FOM/
    SLIM:    <0.0>   limit for F or DEL.
                      Coefficients will be calculated
                      only for such structure factors which are:
                      !F! > sd(F) * SLIM or !DEL! > sd(DEL) * SLIM
                              where  sd -standard deviation
    SIM:     <N>,Y    Y - if you want to use Sim"s scheme
    LAP:     <N>,Y  - coefficients of the curvature (second derivative)
                      will be calculated: COEF = 4 * PI**2 * S**2 * F(hkl)
    SCALE:   <1.0>
    BTEMP:   <0.0>
                      SCALE and BTEMP will be applyed:
                      DEL = (Fder*SCALE-Fnat)*EXP(-BTEMP*RSQ
                      or F = ( Fnat*SCALE )*EXP(-BTEMP*RSQ)
 
       SUBROUTINE COEF(MDOC,NAMEN,NAMED,NAMEPH,NAMEC,FOMMIN
      * ,RESMIN,RESMAX,BOFF,SLIM,LAP
      * ,SCALE,BTEMP,MSGA,ISIM,ISYM,IPRSYM,IERR)
 
   Parameters:
 
     MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             >= 99 - don't write
     NAMEN  - input file-1 of the structure factors.
     NAMED  - input file-2 of the structure factors, if you want to calculate
              difference Pattersomn or Fourie./ if not define = " " /
     NAMEPH - input file of the phases, if you want to calculate Fourie
              transformation. / if not define = " " /
     NAMEC  - output file of the coefficients.
     MSGA   = "Y" if you want to calculate anomalous Patterson or Fourie.
     ISIM   = 1   if you want to use Sim's sheme.
     FOMMIN - limit of figure of merit. If reflection has FOM < FOMMIN
              it will not used. Value FOMMIN=-1 means don't use FOM.
     RESMIN,RESMAX  - resolution MIN , MAX. Default values will be taken
                      from files.
     SCALE,BTEMP - scale and temperature factor. See above.
     SLIM  -  Coefficients will be calculated for such structure factors
               which are:
                  !F1! > sd(F1) * SLIM  or
                  !(F2-F1)! > sd(F2-F1) * SLIM  or
                  !(F(h,k,l)-F(-h,-k,-l))! > sd(F(h,k,l)-F(-h,-k,-l)) * SLIM
     BOFF     <0> , 240 corresponds to RESmin=10 /aprox./
     LAP     <N>,Y , "y" - coefficients of the curvature will be calculated.
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
     IERR    - output signal of error / =1 -error , =o - OK /
 
 ============================================
 
* CONCRD   copies coordinate file and :
               * changes SETTING for monoclinic space groups and for 146&155;
               * restores NCS-related atoms or CS-related atoms for all
                 origins for Patterson;
               * removes water molecules;
               * sets new value B_iso or/and occupancies = 1 to all atoms;
               * changes space group ;
               * sets new atom's number (started from 1);
               * removes H-atoms;
               * removes atoms with B > Blimit or B_aniso;
               * removes atoms with alternative position;
               * removes all atoms except:
                    -  CA
                    -  back bond"s atoms + CB
                    -  P
               * change all residue_name to ALA')
               * converts fract. coords to ort. or ort. to fract.
 
   Dialogue and Batch:
 
     FILE_IN  - input file of coordinates.
     FILE_OUT - output file.
 
     SETT     - <N>/Y -  change SETTING
                         for monoclinic space groups and for 146 and 155
     REST     - <N>/S/O/Y  Y - restore NCS-related atoms
                           S - restore cryst symm-related atoms (CS)
                           O - restore CS-related atoms for all origins
                               for patterson
     WAT      - <N>/Y -  remove water molecules with B >= BOV
     HATM     - <N>/Y -  remove H-atoms
     HATM:    - <N>/Y/Q  Y- remove H_atoms, Q and atoms with name started by Q
     ALT      - <N>/Y -  remove alternative positions /except "A" or "1"/
     NUM      - <N>/Y -  set new atom's number.
     NOCC     - <N>/Y/R - Y set all occupancies = 1.0 : R remove Occ = 0
     P1       - <N>/Y/name -  Y set new space group P1
                         or P1= new space group name, for example 'P 1 21 1'
     CELL: <from file> - A,B,C,alpha,beta,gamma/degrees/ if P1 ne "N"
     BOV        <0> - >0  set this value BOV to all atoms.
                      0   means not to change
                      <0  means not to remove atoms with B > !BOV!'
                     -999 means to remove aniso B
     MODE:  <Y>  - all  atoms will be included in output file.
             A   - only CA
             B   - only back bond"s atoms + CB
             R   - only back bond"s atoms + CB & change residue_name to ALA
             P   - only P
     CONV:  <N>  -
             F   - convert to fractional coordinates
             C   - convert to ortoganal  coordinates
 
 
   Parameters of subroutine CONCRD:
 
       SUBROUTINE CONCRD(MDOC,MODE,NAME1,NAME2,NAMEI,SETT,REST
      * ,WAT,P1,HATM,NUM,NOCC,ALT,CONV
      * ,A,B,C,ALPHA,BETA,GAMMA,BOV,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     MODE   - see above. / character*1 /
     NAME1  - name of input file without extention.
     NAME2  - name of output file without extention.
     NAMEI  - dummy
     SETT   - see above. / character*1 /
     REST   - see above. / character*1 /
     WAT    - see above. / character*1 /
     HATM   - see above. / character*1 /
     ALT    - see above. / character*1 /
     NUM    - see above. / character*1 /
     NOCC   - see above. / character*1 /
     P1     - see above. / character*1 /
     CONV   - see above. / character*1 /
     A,B,C  - for P1 ne "N" - new cell parameters.
     ALPHA,BETA,GAMMA
     BOV    - Boverall, 0 means not to change / MODE="C"/
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
 ============================================
 
* CONDEN   changes 3-d electron density map to produce new orientation
           (views along X,Y,Z, and mirror reflection are supported)
 
    Dialogue:
 
     FILE_D:            - input file
     FILE_O:            - output file
 
     PLAN:  <Y>/Z,X,W,N - choice of plan
                          YZ /<Y>/, ZX /Z/, XZ /X/, ZY /W/ XY /N/
 
     TRANS: <N>/Y,X     - not use /<N>/, Y-axis /Y/, X-axis /X/
                          Y or X means to use translation
 
     LIM:               - minimal and maximal numbers of output sections
                          along X (for PLAN=Y/W),
                          along Z (for PLAN=N  ), else
                          along Y'
 
 ============================================
 
* CONSEQ   converts sequence to coordinate file which can be used for ALIGN.
       File with sequence is ASCII file:
 
       !
       !# sequence
       !SVIGSDDRTRVTNTTAYPYRAIVHISSSIGSCTGWMIGPKTVATAGHCIY
       !# this is comment
       !    DTSSGSFAGTATVSP   GRNGTSYPYG
       !NRGTRITKEVFDNLTNWKNSAQ
 
       If first symbol in the line is "#" it means the line is comments
 
       Output file is BLANC (CIF) coordinate file which contains only CA atoms
 
       Dialogue :
 
    File with sequence :   - input file
    Output coord file  :   - output file. Program wiil adds extention ".crd"
                             if you did not do it.
 
 ============================================
 
* CONTACT  computes inter or/and intra molecular contacts;
 
           * can compute contacts only for special atoms ( for example
             for potential H-bonds);
           * can generate additional symmetry related atoms (with
             occupancy = 0) which are closed to initial molecule;
             can do it only for water molecules (water structure);
           * checks atoms in special positions and changes multiplicity
             for these atoms.
 
   Dialogue and Batch:
 
     FILE_C:      - input file of coordinates.
     CUT:   <3.5> - distance cut_off
     DLIM:  <0.5> - minimal distance
     /if dist (betweem symmetry related atoms) < DLIM then
                                     atom is in special position/
     MOD: <S>/I/B/N : S - intra molecular contacts, I - inter, B - both
                      N - generate symmetry related atoms around initial
                          molecule.
     HBOND: <N>/Y   : Y - only potential H-bond contacts
     WAT: <N>/Y/S   : N - without water, Y - with, S - only water structure
                      if WAT="S" and MOD.ne."N" program set MOD="B"
     FILE_O: < >    - output file of coordinates
     SPEC: <N>/Y    : Y - special contacts between TYPE1 and TYPE2
     TYPE1 < >      - type of atom_1, for example "S" /used if SPEC="Y"/
     TYPE2 < >      - type of atom_2, < > means all
 
   Parameters of subroutine CONTACT:
 
       SUBROUTINE CONTACT(MDOC,NAMEC,NAMEO,CUT_OFF,DLIM,MOD,WAT,HBOND
      * ,SPEC,TYPE1,TYPE2,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writting messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     NAMEC  - name of input file without extention.
     CUT_OFF  <3.5> - distance cut_off
     DLIM:   <0.5> - minimal distance
     MOD  <S>/I/B/N : S - intra, I - inter, B - both
                      N - generate symmetry related atoms around initial
                          molecule.
     WAT  <N>/Y/S   : N - without, Y - with, S - only water structure
     NAMEO  - name of output file / dummy /
     SPEC: <N>/Y : Y - special contacts between TYPE1 and TYPE2
     TYPE1 < > - type of atom_1, for example "S" /used if SPEC="Y"/
     TYPE2 < > - type of atom_2, < > means all
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
 ============================================
 
* COPYFL   copyies files of type 'F   ', 'FS  ','PH  ', 'ABCD','RI  '
           You may change title of files: cell parameters, resolution;
           apply coefficient and temperature factor; set Rfree flag;
           can prepare file with only L = 0 or with only even L.
       Dialogue and batch:
 
       FILE_INF: name of inf-file. Symmetry operators will be taken from
                                   this file.
       FILE_I:   name of input file which has to be copied..
       FILE_O:   name of output file.
       LIMZ:     IZMIN,IZMAX - serial numbers for first and last Z-section
                                of electron density.
       TITLE:    text if you want to write into output file new title.
 
    If you file is type of "F   " or "FS  " then next requests
    will be :
 
       COEF:    program will write into out put file
       BTEMP:                 F_new = COEF*F_old*EXP(-BTEMP*RSQ)
 
       THRESH:  program will write into output files only structure factors
       TOP:                     THRESH < |F| < TOP
 
       SCALE:   program will write into output file only such
                structure factors if |Fnew| > sigma * scale   (if scale > 0)
 
       MODE:    if MODE = '0' program will write into output file
                              only refletions with L = 0
 
                          'E' only even L
 
                          'F' set Rfree flag for reflections.
 
                default value MODE = 'A' means  all reflections.
 
       PERC:    percent of Rfree reflections <10>
 
       RESOL: RESMIN,RESMAX - program will write into output file only
                              refletions between these resolution limits
                              ( Default values vill be taken from file).
 
       SUBROUTINE COPYFL(MDOC,NAME,NAMEI,NAMEO,THRESH,TOP,COEF,BTEMP
      *           ,SCALE,RESMIN,RESMAX,IZMIN,IZMAX,MODE,TITLE
      *           ,POOL,NCRES,RESULT,IPRROW,ISYM,IPRSYM,IERR)
 
       Parameters:
 
       MDOC   - mode of writing messages to DOC-file
                0 - only terminal , < - 0 only file, 0 < < 99 - both
                >= 99 - don't write
       POOL   - real array (NCRES) for
                one Z-section of electron density NX x NY < NCRES.
       NCRES  - NCRES dimension of real array POOL.
       NAMEI  - name of inf-file. Symmetry operators will be taken from
                this file.
       NAME   - name of input file which has to be copied..
       NAMEO  - name of output file.
       COEF   - program will write into output file:
       BTEMP  -                      Fnew=COEF*Fold*EXP(-BTEMP*RSQ)
 
       THRESH  - program will write into output files only structure factors
       TOP     -                THRESH < |F| < TOP
 
       SCALE   - program will write into output file only such
                 structure factors if |Fnew| > sigma * scale.
                 (if scale > 0)
 
       IZMIN,IZMAX - serial numbers for first and last Z-section
                     of electron density.
                     in case MODE = 'F' program use IZMIN as variable PERC
       MODE   - /character*1/ if MODE = '0' program will write into output file
                only reflexes with L = 0
                'F' set Rfree flag, percent = IZMIN
                else default value MODE = 'A' means  all reflexex.
       TITLE  - /character*80/ - new title of output file.
       RESMIN - program will write into output file only reflexes
       RESMAX - between these resolutions ( Default values vill be
                taken from file).
       ISYM   - integer*2 array for cryst.symmetry operators /see INF-file/
       IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM)
       IERR   - signal of error / =1 -error , =o - OK /
       RESULT - real array RESULT(IPRROW) for additional output information
 
 ============================================
 
* CREAT_INF creats INF_file with file_name extention "inf".
           Comments contain the examples of file of coordinates
           and formatted files of structure factors and phases.
       Dialogue and Batch:
 
      FILE_INF - output-INF_file /name without extention "inf"/
      CELL: <100,100,100,90,90,90>  A,B,C,ALPHA,BETA,GAMMA'
      NSG:  <1> SPACE GROUP NUMBER /from <1> to 230 /
      SETT: <2> SETTING /1 or 2 , for monoclinic and trigonal groups only/
      CODE:  -  CODE_PDB structure (4chars)
      NAME:  -  NAME_PDB structure (40chars)
      DATE:  -  DD-MMM-YY  date of creation PDB (9chars)
      TITLE: -  title (48characters)
                "cod1cod2------------------------"
                 code1 - code of derivative (4chars)
                 code2 - code of crystal    (4chars)
 
 ============================================
 
* CROSSROT calculates cross-rotation function
           see blanc/molrep/README
 
 ============================================
 
* DENMOD   phase refinement by density modification
           see blanc/mir/README
 
 ============================================
 
* DNS2CCP4 converts density map to CCP4 format
       Dialogue and Batch:
 
    FILE_1:       - name of input dens-file.
    FILE_O:       - output_file
    SCALE: <1.0>  - Dout = Dinput * SCALE')
 
       SUBROUTINE DNS2CCP4(MDOC,NAME1,NAMEW,SCALE
      *    ,POOL,MEMORY,IERR)
 
       Parameters:
 
       MDOC  - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
       NAME1  - name of input dens-file.
       NAMEW  - name of output dens-file.
       SCALE  <1.0>  - Dout = Dinput * SCALE')
       POOL   -  real array POOL(MEMORY).
       MEMORY -  is memory for one Z-section of electron
                 density NX x NY.
       IERR   - signal of error / =1 -error , =o - OK /
 
 ============================================
 
* EXTRACT  creats density map around model.
       Dialogue and batch:
 
    FILE_1:  -   input file-1 of the structure factors.
    FILE_2:  -   name of FILE-DERIV, if you want it
    FILE_PH: -   name of FILE-PHASE, if you want it
    FILE_C:  -   name of file of model
    FILE_D:  <extract> -   output file of density.
    RESOL:   MIN,MAX , <from files> - resolution
    SCALE:   <1.0>
    BOFF     <0> , 240 corresponds to RESmin=10 /aprox./
                 For suppressing low resolutin reflections, kind of
                 modeling desordered solvent: Fnew=(1-exp(-Boff*s**2))*Fold
    BADD:    <0.0>
                      SCALE and BADD will be applyed:
                      DEL = (Fder*SCALE-Fnat)*EXP(-Badd*RSQ
                      or F = ( Fnat*SCALE )*EXP(-Badd*RSQ)
 
 
       SUBROUTINE EXTRACT(MDOC,POOL,NX,NY,NZ,F000,NAMEF1
      * ,NAMEC,NAMED,NAMEPH,NAMEF2,RESMIN,RESMAX,BADD,BOFF,SCALE
      * ,MEMORY,RESULT,IPRROW,ISYM,IPRSYM,IERR)
 
       Parameters:
 
       MDOC  - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
       NAMEF1 - name of input file F_1
       NAMEF2 - name oF input file F_2 / or " "/
       NAMEPH - name oF input file PHASE / or " "/
       NAMED  <extract> - name of output dens-file.
       SCALE,BOFF,BADD -  - see above.
       NX,NY,NZ - numbers of points of grid corresponding axises X,Y,Z
                  if NX=NY=NZ=0 program will define minimal values
                  suitable for calculation struture factors.
       F000:    <0.0>   - value of F(0,0,0)
                > 0   - use this value
                < 0   - use value from input coef_file.
       POOL    - real array POOL(MEMORY) for
                 one Z-sections of electron density NX x NY
                 and one Z-sections of electron density of box of model
                 if model will be used.
       MEMORY  - dimension of real array POOL.
       ISYM    - integer*2 array for cryst.symmetry operators
       IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM)
                 We need not to define contents of array ISYM
                 Here is only reservation of memory.
       IERR    - signal of error / =1 -error , =o - OK /
 
       Output information:
 
       RESULT(IPRROW) /real/ :
 
       RESULT(1,1) = number of points
       RESULT(2,1) = Dmax
       RESULT(3,1) = Dmin
       RESULT(4,1) = RMS
       RESULT(5,1) = <D>
       RESULT(6,1) = N_positive points
       RESULT(7,1) = N_negative points
       RESULT(8,1) = RMS for positive and =0 density
       RESULT(9,1) = RMS for negative and =0 density
       RESULT(10,1) = <D> for positive and =0 density
       RESULT(11,1) = <D> for negative and =0 density
       IF(IPRROW.GE.15) THEN
         RESULT(12,1) = 3-moment of density
         RESULT(13,1) = 4-moment of density
         RESULT(14,1) = P_000 - value of origine Patterson peak.
         RESULT(15,1) = N points with density = 0
       ENDIF
 
 ============================================
 
* FFT      fast fourie transform: complex --> real.
           Program applies coefficients supplied by COEF or TRPACK
           to produce density map. For all space groups.
       Dialogue and Batch:
 
     FILE_C:  name of input coef-file.
     FILE_D:  name of output dens-file.
     GRID:    NX,NY,NZ  - grid spacing. Default are the values
                  suitable for calculation of structure factors.
     LIMZ:    MIN MAX numbers of Z-section /default for SF calculation/
     F000:    <0.0>  - don"t use F000
               > 0   - use this value
               < 0   - use value from FILE_coef
 
       SUBROUTINE FFT(MDOC,POOL,NX,NY,NZ,IZMIN,IZMAX,F000,NAMEC
      *              ,NAMED,MEMORY,ISYM,IPRSYM,IERR)
 
       Parameters of subroutine FFT:
 
       MDOC     - mode of writing messages to DOC-file
                 0 - only terminal , < - 0 only file, 0 < < 99 - both
                 >= 99 - don't write
       NAMEC    - name of input coef-file.
       NAMED    - name of output dens-file.
       NX,NY,NZ - numbers of points of grid corresponding axises X,Y,Z
                  if NX=NY=NZ=0 program will define minimal values
                  suitable for calculation structure factors.
       IZMIN,IZMAX - serial numbers for first and last Z-section
                     of electron density.
                     <0,-1> mean default for SF calculation.
       F000:  <0.0>   - value of F(0,0,0)
                > 0   - use this value
                < 0   - use value from input coef_file.
       POOL   - real array POOL(MEMORY) for
                one Z-section of electron density NX x NY < MEMORY.
       MEMORY - dimension of real array POOL.
       ISYM   - integer*2 array for cryst.symmetry operators
       IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM)
                We need not to define contents of array ISYM
                Here is only reservation of memory.
       IERR   - signal of error / =1 -error , =o - OK /
 
 ============================================
 
* FIT      fits 2 sets of coordinates using least squares.
           See also program 'ALIGN' which output files are
           suitable for this program too.
       Dialogue and batch:
 
     FILE_W: - input file /WORKING MOLECULE,without extention "crd"/
     FILE_R: - input file /REFERENCE MOLECULE,without extention "crd"/
     FILE_O: - output file name /without extention "crd"/
                             " " - means without output file
                   Matching atoms:
     MODE:   <Y>  - all
              A   - only CA
              O   - only O
              B   - only back bond"s atoms
              P   - only P
     DLIM:   <0.0>  write information to DOC_file about
                    atoms with deviation > DLIM (and if DLIM > 0)
 
       It possible to use subroutine FIT by program:
 
       SUBROUTINE FIT(MDOC,MODE,NAMEW,NAMER,NAMEO
      *   ,POOL,MEMORY,DLIM,RESULT,ISYM,IPRSYM,IERR)
 
   Parameters:
 
     MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             >= 99 - don't write
     MODE   - kind of matching atoms, see above.
     NAMEW  - input file /WORKING MOLECULE,without extention "crd"/
     NAMER  - input file /REFERENCE MOLECULE,without extention "crd"/
     NAMEO  - output file name /without extention "crd"/
     DLIM   <0.0>  write information to DOC_file about
                    atoms with deviation > DLIM (and if DLIM > 0)
     POOL    - real array POOL(MEMORY)
     MEMORY  - dimension of array POOL, maximal number of atoms = MEMORY/12
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
     IERR    - output signal of error / =1 -error , =0 - OK /
 
     RESULT /real RESULT(11)/ - array for output information:
 
       RESULT(1) = NUMBER OF ATOMS FOR MATCHING
       RESULT(2) = RMS DISPLACEMENT
       RESULT(3) = MAXIMUM DISPLACEMENT
       RESULT(4) = ALPHA         ROTATION:
       RESULT(5) = BETA        EILER ANGLES /DEGREES/
       RESULT(6) = GAMMA
       RESULT(7) = TR(1)
       RESULT(8) = TR(2) TRANSLATION VECTOR
       RESULT(9) = TR(3)
 
 ============================================
 
* FLSTAT   gives statistics about files F or PH or DENS.
           FLSTAT calculates and writes to DOC_file some statistic
           such as distrubition of density or of structure factors, R-factors
           between two files, difference between two structure factors,
           difference between two phase angles, anomaloues characteristics of
           structure factors, on resolutions and on absolute values of these
           informations. Program may print these values in resiprocal space
           for each L-planes. Results depend on how many files will be
           reading. And much more...
       Dialogue and batch:
 
     MODE     -  function : FMOD / PHAS / PLAN / ANGL / ANOM / DENS / END /
                You may choose function which you want to operate:
           FMOD if you want calculate distrubition of structure factors on
                the resolutions and on the modules of structure factors,
                R-factor between two files of structure factors or standart
                R-factors (R=SUM(SIGMA)/SUM(F) and their distrubitions,
                completenees;
           PHAS if you want to calculate distrubition of figure of
                merit, difference between two figure of merits on the
                resolution  and on the value of figure of merit;
           PLAN you want to look through these files in reciprocal space
                for each l-planes;
           ANGL if you want to calculate distrubition of values of
                angles, difference between angles;
           ANOM you want look to characteristics of anomalues defferences.
           DENS if you want to calculate distrubition of values of
                density, difference between two files of density,density
                histogram; distribution along some line.
           END  exit of program.
 
     FILE_1   -  name of input_file_1.
     FILE_2   -  name of input_file_2, if you want it, if not tape CR.
     RESOL    -  MIN,MAX - resolution. Default values will be taken from files.
 
     SCALE    -  for MODE='PLAN' means:
                         SCALING : F-new = F * TOP
                                   F-new values > 10 will show as "*"
                                   Others - " ","1","2",...,"9".
     ATOP     -  for MODE = 'FMOD', 'PHAS', 'ANGL', 'ANOM':
                 maximal value of F or ANGLE or FOM which will be
                 accepted, t.e from 0 to ATOP.
                        Default value is:
                           for PHAS :  FOM  - MAX = <  1.0>
                           for F    : ! F ! - MAX = <100.0>
                           for ANGL : ANGLE - MAX = <180.0>
 
      BOFF:   <0> , 240 corresponds to RESmin=10 /aprox./
                       / F-new = Fold*(1-exp(-Boff*s**2))/
 
     for MODE='DENS'
 
        ATOP: <1>  , Dmax_new =  Dmax*ATOP /for density histogram/
        LINE: IX,IY,IZ - density distribution along:
                          X - if IX=-1 for line (IY,IZ),
                          Y - if IY=-1 for line (IX,IZ),
                          Z - if IZ=-1 for line (IX,IY),
 
       It possible to use subroutine FLSTAT by program:
 
       SUBROUTINE FLSTAT(MDOC,MODE,POOL,MEMORY,NAME1,NAME2,BOFF
      *  ,RESMIN,RESMAX,ATOP
      *  ,IXL,IYL,IZL,STOP_T,ISYM,IPRSYM,RESULT,IPRROW,IERR)
 
 
     STOP_T   - Y/<N>  Y - make stop of writing to terminal for reading.
 
   Parameters:
 
     MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             >= 99 - don't write
     MODE    - function: FMOD or PHAS or PLAN or ANGL or ANOM or DENS.
               see above.
     POOL    - working array / real /. Dimension is equal MEMORY.
     MEMORY  - dimension or array POOL, for sections of density
                                              NX*NY =< MEMORY
     NAME1   - name of input_file_1.
     NAME2   - name of input_file_2, if you want it, else NAME2=' '.
     RESMIN  - resolution. Default values will be taken from files.
     RESMAX
     ATOP    - see above.
     BOFF   <0> , 240 corresponds to RESmin=10 /aprox./
                 For suppressing low resolutin reflections, kind of
                 modeling desordered solvent: Fnew=(1-exp(-Boff*s**2))*Fold
     IX,IY,IZ - density distribution along:
                    X - if IX=-1 for line (IY,IZ),
                    Y - if IY=-1 for line (IX,IZ),
                    Z - if IZ=-1 for line (IX,IY),
     STOP_T  - /character*1/ see above.
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
     IERR    - output signal of error / =1 -error , =0 - OK /
 
     RESULT /real RESULT(IPRROW,11)/ - array for output information:
     IPRROW may be = 11 or 21.
 
   MODE = "FMOD" and two input files.
 
   RESULT(I,1)-resolution (A),from resmin=RESULT(1,1) to resmax=RESULT(IPRROW,1)
   RESULT(I,2) - number of the pairs of structure factors
   RESULT(I,3) - R-factors , RESULT(IPRROW,3) - total R-factors
   RESULT(I,4) - corr.
   RESULT(I,5) - R-factors for Luzzati plot with RMS_L.
   RESULT(*,5) = RMS_L - upper estimate error in coords by Luzzati plot.
 
   MODE = "FMOD" and one input file.
 
   RESULT(I,1)-resolution (A),from resmin=RESULT(1,1) to resmax=RESULT(IPRROW,1)
   RESULT(I,6) - number of structure factors F(h,k,l)
   RESULT(I,7) - <F(h,k,l)>
   RESULT(I,8) - completeness
   RESULT(I,9) - <sigma(F(h,k,l))>/<F(h,k,l)>
   RESULT(I,11) -  <F>*EXP(-Bover*S**2)
                       RESULT(IPRROW,11)= Boverall/estimated by Wilson plot/
   RESULT(1,10) = No of the structure factors for this limits of resolution
   RESULT(2,10) = Actual No of the structure factors
   RESULT(3,10) = No of F(-h,-k,-l)
   RESULT(4,10) = Fmin
   RESULT(5,10) = Fmax
   RESULT(6,10) = Nabs
   RESULT(7,10) = Nadd
   RESULT(8,10) = <F(h,k,l)>
   RESULT(9,10) = <F> = sqrt (<I>) /estimated by Wilson plot/
   RESULT(10,10)=  B_overall
   RESULT(11,10)= <F(-h,-k,-l)>
   RESULT(12,10)= F(h,k,l)min
   RESULT(13,10)= F(h,k,l)max
   RESULT(14,10)= F(-h,-k,-l)min
   RESULT(15,10)= F(-h,-k,-l)max
 
   MODE = "ANGL"
 
   RESULT(I,1)-resolution (A),from resmin=RESULT(1,1) to resmax=RESULT(IPRROW,1)
   RESULT(I,2) - number of the pairs of structure factors
   RESULT(I,3) - <DELTA>  in grad. , RESULT(IPRROW,3) - total <delata>
 
   MODE = "DENS"
 
       RESULT(1,1) = AVER1
       RESULT(2,1) = DMAX1T
       RESULT(3,1) = DMIN1T
       RESULT(4,1) = RMS1
       RESULT(5,1) = AVER2
       RESULT(6,1) = DMAX2T
       RESULT(7,1) = DMIN2T
       RESULT(8,1) = RMS2
       RESULT(9,1) = RCORRD
       RESULT(10,1)= RESOL1
       RESULT(11,1)= AMOM31
       NKR=NK
       IF(NKR.GT.20) NKR=20
       RESULT(1,2)=NKR
       RESULT(1,2)=RMIN1
       RESULT(1,2)=RMAX1
       RESULT(1,2)=RMIN2
       RESULT(1,2)=RMAX2
       IF(IPRROW.GE.21) THEN
         RESULT(12,1)= AMOM41
         RESULT(13,1)= RMSD
         RESULT(14,1)= AVERD
         RESULT(15,1)= RMSP
         RESULT(16,1)= RMSN
         RESULT(17,1)= RMSP2
         RESULT(18,1)= RMSN2
         RESULT(19,1)= RMSPD
         RESULT(20,1)= RMSND
         RESULT(21,1)= 0.0
   ---    Histograms ---
         DO I=1,NKR
           RESULT(I,3)=NPOINT(I)
           RESULT(I,4)=NPOINT2(I)
         ENDDO
       ENDIF
 
 ============================================
 
* FMINUSF  creats file with Fnew = ! !F1! - scale * !F2! !
       Dialogue and Batch:
 
      FILE_F: - input file_1 of the modules of structure factors.
      FILE_2: - input file_2 of the modules of structure factors.
      SCALE: <1.0> - scale : !F1! - scale * !F2!
      FILE_O:         - output_file /" " means without output/
 
        It is possible to use the subroutine READ_SF by program:
 
       SUBROUTINE FMINUSF(MDOC,F_NAME,F2_NAME,FO_NAME,SCALER
      *          ,ISYM,IPRSYM,RESULT,IPRROW,IERR)
 
   Parameters of subroutine:
 
     MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             >= 99 - don't write
     F_NAME  - input file_1 of the modules of structure factors.
     F2_NAME - input file_2 of the modules of structure factors.
     FO_NAME - output file /" " means without output/
     SCALE: <1.0> - scale : !F1! - scale * !F2!
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
     IERR    - output signal of error / =1 -error , =o - OK /
 
     RESULT /real RESULT(IPRROW)/ - array for output information:
 
     RESULT(1) -
     RESULT(2) -
 
 ============================================
 
* FPLUSFOM gets FOM from phases and creats file with FOM*!F!
       Dialogue and Batch:
 
      FILE_F: - input file of the modules of structure factors.
      FILE_P: - input file of the phases of structure factors.
      FILE_O: <fplusfom_fom.dat> - output_file
      RESOL: MIN,MAX - resolution /defauts from file_F/
      FOM:   <0>     - FOM limit
 
        It is possible to use the subroutine FPLUSFOM by program:
 
       SUBROUTINE FPLUSFOM(MDOC,F_NAME,PH_NAME,FO_NAME
      *     ,RESMIN,RESMAX,FOMMIN,ISYM,IPRSYM,RESULT,IERR)
 
   Parameters of subroutine:
 
     MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             >= 99 - don't write
     F_NAME  - input file of the modules of structure factors.
     PH_NAME - input file of the phases of structure factors.
     FO_NAME - output file /<fplusfom_fom.dat>/
     RESMIN,RESMAX - resolution /defauts from file_F/
     FOMMIN   <0>     - FOM limit
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
     IERR    - output signal of error / =1 -error , =o - OK /
 
     RESULT /real RESULT(21)/ - array for output information:
 
     RESULT(1) -
     RESULT(2) -
 
 ============================================
 
* FRAGSRCH builds full atomic model of a protein using C-alpha atom
           coordinates of fragments found in the 'local' Protein Data Bank:
           (blanc/dic/bank.frm).
 
       Dialogue and batch:
 
    FILE_C                  - input CRD_file   /without extention "crd"/
    FILE_O:                 - output file name /without extention "crd"/
    ISTART:  <from coords>  - first residue
    IFINISH: <from coords>  - last residue
    LENMIN: <5>,7,9,11,13   - minimal length of search fragment
    LENMAX:  5,7,9,11,<13>  - maximal length of search fragment
    DLIM:     <1.2>         -  <D>-limit for Ca-Ca
    RLIM1:    <0.8>         -  rms-limit-1 for Ca-Ca
    RLIM2:    <0.8>         -  rms-limit-2 for Ca-Ca
    RLIM3:    <2.0>         -  rms-limit-3 for Ca-Ca
    GLY:      <Y>,N         -  GLY/PROT/---> GLY/BANK/ only
    PRO:      <Y>,N         -  PRO/PROT/---> PRO/BANK/ only
    GOMOL:    <N>,Y         -  gomology comparison
    GAP:      <1>           -  gap-penalty /1 or 0 /
                               1 - minimaze number of gaps
                               0 - minimaze rms of coordinates
 
       It possible to use subroutine FRAGSRCH by program:
 
       SUBROUTINE FRAGSRCH(MDOC,FILE_CRD,FILE_OUT,RESULT,IPRROW
      * ,NST,NFN,NL,NLMAX,DLIM,RLIM,RLIM2,RLIM3,MSG,MSGP,MSGG,IPNLT
      * ,ISYM,IPRSYM,IERR)
 
   Parameters:
 
     MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             >= 99 - don't write
     FILE_CRD   - input file-CRD /without extention "crd"/
     FILE_OUT   - output file name /without extention "crd"/
     NST     <from coords>  - first residue
     NFN     <from coords>  - last residue
     NL      <5>,7,9,11,13  - minimal length of search fragment
     NLMAX   5,7,9,11,<13> - maximal length of search fragment
     DLIM:  <1.2>  -  <D>-limit for Ca-Ca
     RLIM   <0.8>  -  rms-limit-1 for Ca-Ca
     RLIM2  <0.8>  -  rms-limit-2 for Ca-Ca
     RLIM3  <2.0>  -  rms-limit-3 for Ca-Ca
     MSG   <Y>,N   -  GLY/PROT/---> GLY/BANK/ ONLY
     MSGP  <Y>,N   -  PRO/PROT/---> PRO/BANK/ ONLY
     MSGG  <N>,Y   - GOMOLOGY COMPARISION
     IPNLT <1>     -  GAP-PENALTY /1 OR 0 ;1 - MIN GAPS, 0 - MIN RMS/
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
     IERR    - output signal of error / =1 -error , =0 - OK /
 
     RESULT /real RESULT(IPRROW)/ - array for output information:
 
       RESULT(1) =
 
 ============================================
 
* FROMBL   writes a contents of internal BLANC file to output CIFile.
           The exit from program suite BLANC.
           This program writes contents of files type of "F  ", "FS  ",
           "PH  ", "ABCD" into formatted output file ( format CIF).
 
    Dialogue and Batch:
 
     FILE_IN:     -        name of input_file.
     FILE_OUT:    -        name of output_file /formatted CIFile/.
 
   Parameters of subroutine FROMBL:
 
      SUBROUTINE FROMBL(MDOC,NAMEI,NAMEO,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     NAMEI  - name of input file.
     NAMEO  - name of output file /formatted CIFile/.
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
 ============================================
 
* GENDEN   generates electron density for the atomic model.
           Also the model may represents atoms as the spheres with
           density equal 1 inside or with density depending on the
           position of model in the unit cell (usefull to study the
           packing of the moleculs in the unit).
           If you want to take into account the surface of area of atoms
           this value must be written instead of the B factors
           ( by the program "surface" )
           Program can generate the distribution of the charges instead
           electron of density. In this case coordinate's file must have
           the atomic charge instead of the occupancy.
 
   Dialogue and Batch:
 
     FILE_C -  input file of coordinates.
     FILE_D -  output file of density
     RESOL  -  resolution. Default = 3A.
     GRID   -  NX NY NZ /defaults are minimal grid spacing for SF calculation/
     LIMZ:  -  MIN MAX numbers of Z-section /default are for SF calculation/
     BADD:  -  <0.0> additional B-factor /default Badd_calc for SF calculation/
               0 means Badd_calc will used
               if MODE = "S" or "U" , atoms with B > BADD will not be used
     H2O:   -  <0.0>  Value of the solvent density which will be added into
               the empty space.
     P1:    -  calculate density for P1 spase group
 
     MODE:  -  <A> - generate electron density from atomic model.
                S  - generates the map for the spheres with density = 1 inside.
                     Centres of sphere are in the centres of atoms with
                     the radius = RAD.
                U  - spheres with DENS = symm.op number and with DENS < 0
                     where overlaping')
                C  - distribution of the charges.
 
            if MODE = "S" or "U" than  "RAD" (value of radii) will be used
            and atoms with B > BADD will not be used
 
     RAD    -  <0.0>  - radius of sphere.
               if RAD > 0 then Radius =  input RAD
                  RAD = 0 then Radius = Van-der-Waals radius
                  RAD < 0 then if SURFACE-AREA=0 then Radius =ABS(RAD)
                                                 else Radius =Van-der-Waals_rad
     TITLE    - title of output file
 
   Parameters of subroutine GENDEN:
 
       SUBROUTINE GENDEN(MDOC,NAMEC,NAMED,TITLE
      * ,RX,NX,NY,NZ,IZMIN,IZMAX,MODE,RAD,H2OBG,BADD,P1
      * ,RESULT,IPRROW,POOL,MEMORY,NCRDMAX,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     MODE   - see above. / character*1 /
     NAMEC  - name of input file without extention "crd".
     NAMED  - name of output file of density.
     RX     -  <3.0> resolution
     NX,NY,NZ - grid /defaults are minimal grid spacing for SF calculation/
     BADD    -  <0.0> additional B-factor /default are for SF calculation/
     H2OBG   -  <0.0> density of solvent
     P1      -  calculate density for P1 spase group. /character*1/
     MODE    -  see above. /character*1/
     RAD     -  <0.0> radius of sphere
               if RAD > 0 then Radius = RAD
                  RAD = 0 then Radius = R-Van-der-Waals
                  RAD < 0 then if SURFACE-AREA=0 then Radius = ABS(RAD)
                                                 else Radius=R-Van-der-Waals
     TITLE  -  title of output file, /character*80/
     IZMIN,IZMAX  -  MIN MAX numbers of Z-section. /if IZMIN=0,IZMAX=-1
                     default values for SF calculation will be taken /
     NCRDMAX - maximal number of atoms.
     POOL    - real array POOL(MEMORY)
     MEMORY  - dimension array POOL.
               MEMORY = MAPMAX + (NCRDMAX/2)*5 , where MAPMAX - maximal
                                                 size of XY-section ( NX*NY)
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
         output information
 
       real RESULT(IPRROW)
 
       NEL    = RESULT(1)  number of electrons
       SUMFI2 = RESULT(2)  sum(Nelectrons**2)
       BAVER  = RESULT(3)  <B>   in the file
       BMAX   = RESULT(4)   Bmax in the file
       BMIN   = RESULT(5)   Bmin in the file
       BAVERW = RESULT(6)   B_water in the file
       BAVERF = RESULT(7)  <B> / including B from atomic scatt. factor /
       SUMDEN = RESULT(8)  sum(DENSITY) =  (sum(D)*volume)/(nx*ny*nz)
       HH2OBG = RESULT(9)  density in the solvent region which was added.
       SOLV   = RESULT(10) % of the solvent.
       BADD   = RESULT(11) additional B-factor which was used.
 
 ============================================
 
* GENDEN_ANISO generates electron density for the atomic model with aniso B's.
           (aniso version of program GENDEN )
 
   Dialogue and Batch:
 
     FILE_C -  input file of coordinates.
     FILE_D -  output file of density
     RESOL  -  <3.0> resolution
     GRID   -  NX NY NZ /defaults are minimal grid spacing for SF calculation/
     LIMZ:  -  MIN MAX numbers of Z-section /default are for SF calculation/
     BADD:  -  <0.0> additional B-factor /default Badd_calc for SF calculation/
               0 means Badd_calc will used
     H2O:   -  <0.0> density of solvent
     ANISO  -  <Y>/N   - N - Biso will used for all atoms')
     TITLE  -  title of output file
 
   Parameters of subroutine:
 
       SUBROUTINE GENDEN_ANISO(MDOC,NAMEC,NAMED,TITLE
      * ,RX,NX,NY,NZ,IZMIN,IZMAX,H2OBG,BADD,ANISO
      * ,RESULT,IPRROW,POOL,MEMORY,NCRDMAX,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writting messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     MODE   - see above. / character*1 /
     NAMEC  - name of input file without extention "crd".
     NAMED  - name of output file of density.
     RX     -  <3.0> resolution
     NX,NY,NZ - grid /defaults are minimal grid spacing for SF calculation/
     BADD    -  <0.0> additional B-factor /default are for SF calculation/
     H2OBG   -  <0.0> density of solvent
     ANISO  -  <Y>/N   - N - Biso will used for all atoms')
     TITLE  -  title of output file, /character*80/
     IZMIN,IZMAX  -  MIN MAX numbers of Z-section. /if IZMIN=0,IZMAX=-1
                     default values for SF calculation will be taken /
     NCRDMAX - maximal number of atoms.
     POOL    - real array POOL(MEMORY)
     MEMORY  - dimension array POOL.
               MEMORY = MAPMAX + (NCRDMAX/2)*5 , where MAPMAX - maximal
                                                 size of XY-section ( NX*NY)
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
         output information
 
       real RESULT(IPRROW)
 
       NEL   = RESULT(1)  number of electrons
       SUMFI2= RESULT(2)  sum(Nelectrons**2)
       BAVER = RESULT(3)  <B>   in the file
       BMAX  = RESULT(4)   Bmax in the file
       BMIN  = RESULT(5)   Bmin in the file
       BAVERW= RESULT(6)   B_water in the file
       BAVERF= RESULT(7)  <B> / including B from atomic scatt. factor /
       SUMDEN= RESULT(8)  sum(DENSITY) =  (sum(D)*volume)/(nx*ny*nz)
       HH2OBG= RESULT(9)  density in the solvent region which was added.
       SOLV  = RESULT(10) % of the solvent.
       BADD  = RESULT(11) additional B-factor which was used.
 
 ============================================
 
* GENGRD   calculates the gradients for atomic model from diff. map.
 
   Dialogue and Batch:
 
     FILE_C -  input file of coordinates.
     FILE_D -  output file of density
     FILE_M
     BADD:  -  <0.0> additional B-factor /default are for SF calculation/
     POS:   - <N>,Y Y -  use only positive density
     MODE   - <D>/O  use only the default
     TEST   - <N>/Y  for testing only
     GRAD   - <G>/D  use only the default
 
   Parameters of subroutine GENGRD:
 
       SUBROUTINE GENGRD(MDOC,NAMEC,NAMED,NAMEM
      * ,H2OBG,BADD,P1,PRINT,POSITIV,MODE,GRAD
      * ,RESULT,IPRROW,POOL,MEMORY,NCRDMAX,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     MODE   - see above. / character*1 /
     NAMEC  - name of input file without extention "crd".
     NAMED  - name of output file of density.
     NAMEM  -
     BADD  -  <0.0> additional B-factor /default are for SF calculation/
     H2OBG   -  <0.0> density of solvent
     P1
     POSITIV
     MODE
     NCRDMAX - maximal number of atoms.
     POOL    - real array POOL(MEMORY)
     MEMORY  - dimension array POOL.
               MEMORY = MAPMAX + (NCRDMAX/2)*5 , were MAPMAX - maximal
                                                 size of XY-section ( NX*NY)
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
         output information
 
 
       RESULT(1)  =CFVOL
       RESULT(2)  =COEF
       RESULT(3)  =SIGMA
       RESULT(4)  =SIGMAD
       RESULT(5)  =SCALEF
       RESULT(6)  =BADD
       RESULT(7)  =SHESSX
       RESULT(8)  =SHESSD
       RESULT(9)  =DRV_RMS
       RESULT(10) =SHFT_RMS
       RESULT(11) =DISPFR
 
 ============================================
 
* GENIND   generates the full list of indices of reflections for
           given resolution limits. Type of file is 'F   '.
           Values of !F! may be equal to 1 for all reflections or represent
           diffraction from a sphere or represent Wilson's plot with
           some B_overal and Scale which may be used for scaling to
           the absolute scale.
       Dialogue and Batch:
 
               Information about CELL and SYMmetry operators will be
               taken from file FILE_INF or FILE_C or FILE_F
 
   FILE_INF:    -  input INF_file /without extention "inf"/.
   FILE_C:      -  input coords_file /without extention "crd".
   FILE_F:      -  input file of structure factors.
 
   FILE_O       -    output_file /" " means without output/
   RESOL      <100,3>    MIN,MAX  - resolution
   MODE       <U>    - all !F! = exp(-btemp*s^2
               S     - !F! : difraction of sphere
               F     - phase for a sphere in the centre
               P     -  F  : difraction of sphere
                             /but type of file  is "COEF"/
               W     -  Wilson"s plot: coef*exp(-btemp*s^2)')
                        /with COEF  = <!F!> = SQRT(NATOM*NSYM)*7
                              BTEMP - temperature factor
                              F(000) = NATOM*NSYM*7     /
   NATOM       <1>      - number of atoms in asymm.part unit cell
   BTEMP       <0.0>
   RAD         <3.0>    -  radius of sphere
   MODEF       <A>      -  write all reflexions
                0       -  only with L=0
 
       SUBROUTINE GENIND(MDOC,IPOOL,NCRES,RAD,COEF,BTEMP,RESMIN,RESMAX
      * ,NATOM,NAME,NAMEI,NAMEC,NAMEF,MODEF,MODE,ISYM,IPRSYM,IERR)
 
   Parameters:
 
       MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             = < 99 - don't write
       IPOOL - integer*2 array (NCRES) for indices.
 
               Information about CELL and SYMmetry operators will be
               taken from file NAMEI or NAMEC or NAMEF
 
       NAMEI   -  input INF_file /without extention "inf"/.
       NAMEC   -  input coords_file /without extention "crd".
       NAMEF   -  input file of structure factors.
 
       RESMIN  - resolution MIN
       RESMAX               MAX
       MODE  : <U> - all reflections with h,k,l and !F! = 1.0
                S  - with !F! ( difraction of sphere )
                F  - phase for a sphere in the centre
                P  - with  F  ( difraction of sphere ),
                     but type of file  is "COEF" ( for FFT program,for example)
                W  - WILSON"S PLOT'
 
   if MODE = 'S' or MODE = 'P' :
 
       RAD   -  readius of sphere
 
   if MODE = 'W'  :
 
       NATOM - number of atoms in asymm. part unit cell / non H /
       BTEMP - temperature factor
 
       MODEF -  <A> - write all reflections.
                 0  - only with L=0
 
       NAME  -  output file
       NCRES = dimension of array IPOOL, NCRES = max number of indices.
       ISYM  - integer*2 array for cryst.symmetry operators /see INF-file/
       IPRSYM- dimension of integer*2 array ISYM(5,3,IPRSYM)
       IERR  - output signal of error / =1 -error , =o - OK /
         output information:
 
       NUMB  - number or reflections.
 
   if MODE = 'W'  :
       COEF  - SQRT(sum of atomic_scatt_factor**2) = <!F!>
       FVOL  - F(000)
 
 ============================================
 
* GETDEN   gets values of electron density for atoms of model
          / by convolution density with atomic distribution /
   Dialogue and Batch:
 
     FILE_C -  input file of coordinates.
     FILE_D -  output file of density
     FILE_M -  input file of model density for comparison /if you want it/
     BADD:  -  <0.0> additional B-factor /default are for SF calculation/
     POS:   -   <Y>,N ,Y means to use only positive density
 
   Parameters of subroutine GETDEN:
 
       SUBROUTINE GETDEN(MDOC,NAMEC,NAMED,NAMEM
      * ,BADD,POSITIV
      * ,RESULT,IPRROW,POOL,MEMORY,NCRDMAX,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     MODE   - see above. / character*1 /
     NAMEC  - name of input file without extention "crd".
     NAMED  - name of output file of density.
     NAMEM  - input file of model density for comparison /if you want it/
     BADD  -  <0.0> additional B-factor /default are for SF calculation/
     POSITIV - <Y>,N ,Y means to use only positive density
     NCRDMAX - maximal number of atoms.
     POOL    - real array POOL(MEMORY)
     MEMORY  - dimension array POOL.
               MEMORY = MAPMAX + (NCRDMAX/2)*5 , were MAPMAX - maximal
                                                 size of XY-section ( NX*NY)
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
         output information
 
       NEL    = RESULT(1,16)
       SUMFI2 = RESULT(2,16)
       BAVER  = RESULT(3,16)
       BMAX   = RESULT(4,16)
       BMIN   = RESULT(5,16)
       BAVERW = RESULT(6,16)
       BAVERF = RESULT(7,16)
       SUMDEN = RESULT(8,15)
       NEL    = number of electrons
       BADD   = additional B-factor wich was used.
       SUMFI2 = sum(Nelectrons**2)
 
 ============================================
 
* GRAD_X   calculates the gradients for atomic model from diff. map.
 
 
   Dialogue and Batch:
 
     FILE_C -  input file of coordinates.
     FILE_D -  input file of observed density
     FILE_M -  input file of density of model
     FILE_O -  output file of gradients.
     FILE_E -  output file of some indicators.
     BADD:  -  <0.0> additional B-factor /default are for SF calculation/
 
   Parameters of subroutine GRAD_X:
 
       SUBROUTINE GRAD_X(MDOC,NAMEC,NAMED,NAMEM,NAMEO,NAMEE
      * ,BADD,SCALEF,BADDF,DISPFR
      * ,RESULT,IPRROW,POOL,MEMORY,NCRDMAX,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     MODE   - see above. / character*1 /
     NAMEC  - name of input file without extention "crd".
     NAMED  - name of input file of density.
     NAMEM  -
     NAMEO  -
     NAMEE  -
     BADD  -  <0.0> additional B-factor /default are for SF calculation/
     NCRDMAX - maximal number of atoms.
     POOL    - real array POOL(MEMORY)
     MEMORY  - dimension array POOL.
               MEMORY = MAPMAX + (NCRDMAX/2)*5 , were MAPMAX - maximal
                                                 size of XY-section ( NX*NY)
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
         output information
 
 
       RESULT(1)  =CFVOL
       RESULT(2)  =COEF
       RESULT(3)  =SIGMA
       RESULT(4)  =SIGMAD
       RESULT(5)  =SCALEF
       RESULT(6)  =BADD
       RESULT(7)  =SHESSX
       RESULT(8)  =SHESSD
       RESULT(9)  =DRV_RMS
       RESULT(10) =SHFT_RMS
       RESULT(11) =DISPFR
 
 
 ============================================
 
* HISTOGRM histogram matching.
           calculates histograms of electron density maps and new
           modified map accoding to histogram of test model map.
       Dialogue and Batch:
 
    FILE_1:   - name of input dens-file_1.
 
    FILE_2:   - input_file_2 name / for test histogram/
                if name_2 = ' ' only histogram of DENS-1 will calculate.
    FILE_O:   - output_file name  / modified dens-1 /
                if output_name=' ' only histograms will calculete.
 
       SUBROUTINE HISTOGRM(MDOC,NAME1,NAME2,NAMEW
      *    ,POOL,MEMORY,RESULT,IPRROW,IPRCOL,ISYM,IPRSYM,IERR)
 
       Parameters:
 
       MDOC  - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
       NAME1  - name of input dens-file_1.
       NAME2  - name of input dens-file_2, if you want it, if not = " ".
       NAMEW  - name of output dens-file, if you want it, if not = " ".
       POOL   -  real array POOL(MEMORY).
       MEMORY -  MEMORY*2/3 is memory for one Z-section of electron
                 density NX x NY.
       ISYM   - integer*2 array for cryst.symmetry operators
       IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM)
       IERR   - signal of error / =1 -error , =o - OK /
       RESULT - real array for output information.
                REAL      RESULT(IPRROW,IPRCOL)
                IPRROW = 100
                IPRCOL = 5
   output:
 
         RESULT(1,1)  = Ntotal
         RESULT(2,1)  = Number of interval
         RESULT(3,1)  = R_MIN
         RESULT(4,1)  = R_MAX
         RESULT(5,1)  = <R>
         RESULT(6,1)  = <R^2>
         RESULT(7,1)  = <R^3>
         RESULT(8,1)  = <R^4>
         RESULT(9,1)  = R_level_1
         RESULT(10,1) = R_level_2
         RESULT(11,1) = Percent of solvent
         RESULT(12)   = NA expected number of atoms
 
         RESULT(i,2)= Dens    - for this interval /low limit/
         RESULT(i,3)= sum(Ni) - cumulative number of points for this interval
         RESULT(i,4)= ratio sum(Ni)/Ntotal
         RESULT(i,5)= Na      - Number of points for this interval
                                (in asymm. part)
 
 ============================================
 
* ISOLINE  draws maps by isolines (Postscript format) with/without atomic model
 
   Dialogue:
 
   FILE_D: input density file
   IX-min,IX-max:
   IY-min,IY-max:
   IZ-min,IZ-max:
   MOD:   <N>,P/S  -  "P" means projection, "S" - stereo
   NEG:   <N>,Y    -  "Y" means to draw negative isolines
   NLEV:  <10>     -  maximal number of isolines ( < 11 )
   LEV1:   <N>,Y   -  "Y" - means to draw this isoline.
   LEV2:   <Y>,N
   LEV3:   <N>,Y
   LEV4:   <Y>,N
   LEV5:   <N>,Y
   LEV6:   <Y>,N
   LEV7:   <N>,Y
   LEV8:   <Y>,N
   LEV9:   <N>,Y
   LEV10:  <Y>,N
   FILE_C: < >
   BALL:   <Y>/S/B   - Y draw balls and sticks, S - sticks, B - balls
   SYMM:   <Y>/N     - Y generate symm. related atoms
   NAME:   <Y>,A,N,W - Y all atom"s name, A only CA_atoms, W only w ater
   FRAME:  <Y>,B,N   - B only box, N without frames.
   DENS:   <Y>,N     - without density.
 
                 Output file is 'isoline.ps'
 
 ============================================
 
* JOINCRD  join two files of coordinates.
 
   Dialogue and Batch:
 
     FILE_C  - input file-1 of coordinates.
     FILE_2  - input file-2 of coordinates.
     FILE_O  - output file.
 
   Parameters of subroutine JOINCRD:
 
       SUBROUTINE JOINCRD(MDOC,NAMEC,NAMEC2,NAMEO
      * ,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     NAMEC  - name of input file-1 without extention.
     NAMEC2 - name of input file-2 without extention.
     NAMEO  - name of output file without extention.
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
 ============================================
 
* JOINFL   joins two file  type of "F   ", "FS  ", "PH  " or "ABCD".
           In the case "F   " or "FS  " program calculates R-factor, RMS
           between two files. Possible to remove (with writing to DOC-file)
           bad pairs. Program is used to join the phase information by
           summing of the  Hendrickson-Lattman coefficients.
 
     Dialogue and Batch:
 
   FILE_1:  name of first file which you want to join with
                      following file.
   FILE_2:  name of second file which you want to join with
                      previos file.
   FILE_O: - output_file /" " means without output/
   ATOP:  <0.0>  if (!F1-F2!/<F>) > ATOP and ATOP > 0
                 reflex will not write to output file
   CODE_1: -  CODE_DERIV (4 chars)
   CODE_2: -  CODE_CRYST (4 chars)
   TITLE:  -  title (40 characters)
 
       Length of CODE_DERIV  and  CODE_CRYST is 4 characters.
       This informations will be writen into output file as title.
            NEW-TITLE = CODE_DERIV // CODE_CRYST // TITLE
       Default title is from FILE_1.
 
        It is possible to use the subroutine JOINFL by program:
 
      SUBROUTINE JOINFL(MDOC,NAME1,NAME2,NAMEO,TITLE,ATOP
     *                 ,ISYM,IPRSYM,IERR)
 
       Parameters:
 
       MDOC  - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
       NAME1 - name of input file-1
       NAME2 - name of input file-2
       NAMEO - name of output file. = " " means without output
       TITLE - new title of output file.
                                    TITLE(1:4) = CODE_DERIV
                                    TITLE(5:8) = CODE_CRYST
       ATOP  - if (!F1-F2! /<F>) < ATOP, this pair will throw out & write
               to DOC-file. The value 0.0 means without this possibility.
 
       ISYM   - integer*2 array for cryst.symmetry operators
       IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM)
                We need not to define contents of arrays ISYM.
                Here is only reservation of memory.
       IERR  - signal of error / =1 -error , =o - OK /
 
 ============================================
 
* LOOKFL   internal files lookup and (as option) output formatted file.
      This programm prints contents of files type of "F  ", "FS  ",
      "PH  ",  "COEF", "ABCD", "RFCF" and writes contents of these files
      into formatted output file (DOC-file):
 
       type:       contents of DOC-file:        format of DOC-file:
 
       "F   "      H,K,L,F                       (3I4,F8.2)
               or  H,K,L,FA,FB                   (3I4,F8.2)
               or  H,K,L,I                       (3I4,F8.2)
 
       "FS  "      H,K,L,F,sd(F)                 (3I4,2F8.2)
               or  H,K,L,FA,sd(FA),FB,sd(FB)     (3I4,4F8.2)
               or  H,K,L,I,sd(I)                 (3I4,2F8.2)
 
       "PH  "      H,K,L,fom,Phi                 (3I4,2F8.3)
 
       "ABCD"      H,K,L,A,B,C,D                 (3I4,4E12.4)
 
       "ALMN"      N,M,L,A,B                     (3I4,2E12.4)
 
    Dialogue:
 
  1) FILE-DOCUMENT - name of formatted output file.
                     type "CR" if you don't want it.
 
  2) INPUT FILE
     FILE :
           Type name of file which you want to write into output file or
           print on the terminal.
 
     If you use document file and type is "F   " or "FS  "
     then next requests will be :
 
     2a)  WRITE FA AND FB/Y/ ONLY FA/<N>/
          OR SQUARED FA AND SIGMA(F**2)-/S/ ?:
              You may choose one of this possibility.
     2b)  WRITE SIGMA(F) /<Y>/N/ ?:
     2c)  WRITE TITLE   /<N>,Y/  ?:
 
   3)  DO YOU WANT TO READ NEXT FILE /<Y>,N/ ?:
              If you want to exit from this programm type N.
 
 ============================================
 
* MODDEN   copies, changes, adds, multiplies ,modifies electron density
           files. Also is the filter for the solvent flattening
           procedure /Wangs's procedure/.
           This program reads one or two files type of "RI" (electron
           density), performs on this file necessary operation and creates
           output file  type of "RI".
           If program use one input file than it performs : to add
           to this information any number, to equal to zero if value on
           this point less than given  number and much more.
           If program use two input files than it performs : to add
           each other, to apply  filtering using second file as mask
           and much more.
       Dialogue and Batch:
 
  FILE_1:   - name of input dens-file_1.
 
  MODE: <A> - add CONST to density. Programm reads from input file
              value D then value D + CONST will be writen into output file.
         C  - CUTTING DENS: D=CMIN IF < CMIN ,D=CMAX IF < CMAX
         U  - CUTTING + ADD:  DENS: D=CMIN IF < CMIN ,D=CMAX IF < CMAX and
                              add (-CMIN)
         T  - sTep function: D=1.0 IF >= CONST , D=0.0 IF < CONST
         P  - XY-projection of density / one output Z-section /.
              IZMIN,IZMAX - numbers of first and
              last Z-section
         M  - multiply DENS * CONST
         3  - DENS ** 3
         *  - DENS ** 2
         Q  - SQRT(DENS)
         L  - LOG(DENS)
         R  - set DENS=0      : for region: R < CMIN and R > CMAX
         B  - soft set DENS=0 : Density of point with distance R will be
              multiplied by (1-exp(-R^2/2*CMIN)*exp(-R^2/(0.5*CMAX))
              R is minimal value of four distancies to current point from eight
              points: 0,0,0; 1,0,0; 0,1,0; 1,1,0; 0,0,1; 1,0,1; 0,1,1; 1,1,1
              CMIN,CMAX - in angstroms
 
            If we use two files:
 
         2  - multiply  DENS-1 * DENS-2
         N  - multiply  DENS-1 * DENS-2,but if DENS-2 < 0 result = 0
         D  - division  DENS-1 / DENS-2
         S  - substract DENS-1 - DENS-2*CONST
         E  - sigma=sqrt(2nd central moment), file_1-D, file_2-D^2
         X  - (<r>^3+3*sigma^2*<r>), file_1-D file_2-sigma
         F  - filter /Wangs's procedure/
             If D1 is value of DENS-1 and D2 value of DENS-2 in the same
             point, program will write Dnew into output file:
                 Dnew = D1  if D2 > CONST
                        0   if D2 < CONST
                                            DENS-2 is mask-file
                                      DENS-1 ----------------> DENS-OUT
                                             if DENS-2 > CONST
                                             else DLEV -------> DENS-OUT
         K  - as "F" with statistcs
 
    FILE_2:   input_file_2 name
    FILE_O:   output_file name
    CONST: <0.0> - for MODE = A - add : DENS + CONST')
                              M - multiply: DENS * CONST')
                              S - subtract DENS-1 - DENS-2*CONST')
                              F - level for mask-file FILE-2')
    CLIM: CMIN,CMAX <0,0> -   C - cutting ---> CMIN < DENS < CMAX')
                                  CMAX=0 means without this limit')
                              R - set DENS=0 : R < CMIN and R > CMAX
                              B - soft set DENS=0
                                  (1-exp(-R^2/2*CMIN)*exp(-R^2/(0.5*CMAX))
                                  CMIN,CMAX - in angstroms
    DLEV: <0.0>     - for MODE = F/K - level of solvent
    ZLIM: ZMIN,ZMAX - numbers of Z-section for projection (MODE=P)')
 
       SUBROUTINE MODDEN(MDOC,NAME1,NAME2,NAMEW
      *    ,POOL,MEMORY,CONST1,CONST2,MSGF
      *    ,RESULT,IPRROW,ISYM,IPRSYM,IERR)
 
       Parameters:
 
       MDOC  - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
       NAME1  - name of input dens-file_1.
       NAME2  - name of input dens-file_2, if you want it, if not = " ".
       NAMEW  - name of output dens-file.
       MSGF   = MODE - function of program, see above / character*1/.
       CONST1 = CONSTANT or = CMIN or = ZMIN  - see above.
       CONST2               = CMAX or = ZMAX
                  or DLEV for MODE=F/K
       POOL   -  real array POOL(MEMORY).
       MEMORY -  MEMORY/2 is memory for one Z-section of electron
                 density NX x NY.
       ISYM  - integer*2 array for cryst.symmetry operators.
       IPRSYM- dimension of integer*2 array ISYM(5,3,IPRSYM)
       IERR  - signal of error / =1 -error , =o - OK /
 
       RESULT( 1) = NUMB
       RESULT( 2) = AVER
       RESULT( 3) = RMS
       RESULT( 4) = NNN1
       RESULT( 5) = DSUMP
       RESULT( 6) = 0.0
       RESULT( 7) = NNN2
       RESULT( 8) = DSUMN
       RESULT( 9) = 0.0
       RESULT(10) = NNNZ
       RESULT(11) = PERCNT
       IF(IPRROW.GT.11) THEN
         RESULT(12) = RMAX1
         RESULT(13) = RMIN1
         RESULT(14) = RMAX2
         RESULT(15) = RMIN2
         RESULT(16) = RMAXD
         RESULT(17) = RMIND
       ENDIF
 
 ============================================
 
* MTZ2CIF  converts some data from MTZ file to CIFile
       Dialogue :
 
      FILE_MTZ:   - input MTZ file
 
      Keywords   Defaults   Please, tape column No or label
 
      F:           <0>       - F or F(+)
      SIGF:        <0>       - sigma F or F(+)
      F-:          <0>       - F(-)
      SIGF-:       <0>       - sigma F(-)
      FC:          <0>       - F_calc
      I+:          <0>       - I(+)
      SIGI+:       <0>       - sigma I(+)
      I-:          <0>       - I(-)
      SIGI-:       <0>       - sigma I(-)
      FREE:        <0>       - Free_flag
      DP:          <0>       - delta(F)
      SIGDP:       <0>       - sigma delta(F)
      PH:          <0>       - phases
      FOM:         <0>       - figure of merit
      FILE_O: <mtz2cif.cif>  - output CIFile name
 
 ============================================
 
* OMIT     for given Fobs and atomic model computes omit-phases which
           corresponds to omit map.
           see blanc/mir/README
 
 ============================================
 
* OMIT_MAP creats total omit map
           see blanc/mir/README
 
 ============================================
 
* PEAKSRCH searchs the peaks in the electron density map or Patterson or
           Rotation Function map.
       Dialogue and Batch:
 
    FILE_D:  input file of density.
    FILE_O:  output file of coordinates of peaks /if you want it/.
    NPMAX:   <all> - max number of peaks to write to output file.
    LEVEL:   <1.0> - times of sigma.
    DIST:    minimal distance between two peaks (in angstrom or grad)
                default is RESMAX
    SPEC: <Y>/N/P/A/S  -  Y  means to use peaks in special  position.
                          N  not use peaks in special position for fourie
                          P  not use peaks in special position for Patterson
                          A  peaks search without interpolation, without
                             DIST and use all peaks
                          S  calc symmetry related peaks for RF (see doc-file)
 
       It possible to use subroutine PEAKSRCH by program:
 
       SUBROUTINE PEAKSRCH(MDOC,NAME,NAMEO,ALEVEL,DIST_LIM,SPEC
      *   ,NPMAX,POOL,MEMORY,ISYM,IPRSYM,RESULT,IPRMAX,IPRROW,IERR)
 
   Parameters:
 
     MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             >= 99 - don't write
     NAME    - input file of density.
     NAMEO   - output file of coordinates.
     ALEVEL  -  <1.0> - times of sigma.
     DIST_LIM - minimal distance between two peaks (in angstrom or grad)
                default is RESMAX
     SPEC    - /character*1/  see above.
     NPMAX   -  max number of peaks to write to output file.
     POOL    - working array / real /. Dimension is equal MEMORY.
     MEMORY  - dimension or array POOL, for 3 sections of density
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
     IERR    - output signal of error / =1 -error , =0 - OK /
 
       RESULT - array for output information:
       REAL RESULT(IPRMAX,IPRROW)  IPRMAX - max number of peaks
                                   IPRROW >= 12
   RESULT(i, 1) IX
   RESULT(i, 2) IY
   RESULT(i, 3) IZ
   RESULT(i, 4) Dens
   RESULT(i, 5) sigma
   RESULT(i, 6) alpha      Xort
   RESULT(i, 7) beta   or  Yort
   RESULT(i, 8) gamma      Zort
   RESULT(i, 9)  Xfrac
   RESULT(i,10) Yfrac
   RESULT(i,11) Zfrac
   RESULT(1,12)  number of peaks
 
 ============================================
 
* PHABCD   calculates Henderickson/Lattman coefficients of Phase_calc
           using Fobs and Fcalc.
               Probability of phase :
                 P =  exp(-2*Fobs*Fcalc/E**2)
                  where E=rms(Fobs-Fcalc)*sqrt(2)/FACTOR, for non centric refls
                        E=rms(Fobs-Fcalc)/FACTOR        , for centric refls
                  FACTOR - takes into account incompleteness of the model.
                           aprox. = Natom_model/Natoms_structure
 
   Dialogue and Batch:
 
   FILE_I:  input_file F_obs
   FILE_F:  input_file F_calc or " "
            " " means without this file. In this case E = 0.15 * Fobs and
                                                      Fcalc = Fobs
   FILE_PH: input_file PH_calc
   FILE_O:  output_file ABCD /" " means without output/'
   RESOL:   MIN,MAX - resolution / default values from input_files /
   BOFF:  <0> , 256 corresponds to RESmin=8A, 900 -> 15A.
   BADD:  <0>
   CENT:   <A>/N/Y - use for calculation E : A - all refls,
                                             N - only acentric,
                                             Y - only centric
   FACTOR <1>   incompleteness of the model ( Natom_model/Natoms_structure )
 
 
   Parameters of subroutine PHABCD:
 
       SUBROUTINE PHABCD(MDOC,NAMEN,NAMEF,NAMEPH,NAMEO,FACTOR
      * ,RESMIN,RESMAX,BOFF,BADD,CENT,ISYM,IPRSYM,RESULT,IPRROW,IERR)
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     NAMEN  input_file F_obs
     NAMEF  input_file F_calc
     NAMEPH input_file PH_calc
     NAMEO  output_file ABCD /" " means without output/'
     RESMIN   MIN,MAX - resolution / default values from input_files /
     RESMAX
     BOFF   <0> , 256 corresponds to RESmin=8A, 900 -> 15A.
     BADD   <0>
     CENT:   <A>/N/Y - use for calculation E : A - all refls,
                                               N - only acentric,
                                              Y - only centric
     FACTOR <1>   incompleteness of the model ( Natom_model/Natoms_structure )
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR    - output signal of error / = 1 -error , = 0 - OK /
 
         output information :
 
 
 ============================================
 
* PHASE    calculate Henrickson-Lattman coefficients for a derivative
           by Blow-Crick method.
       Dialogue and batch:
 
   FILE_C:  - input COORD_file /without extention "crd"/
   FILE_F:  - input file F_obs.
   FILE_D:  - input file F_der.
   FILE_PH: - input file of phase.
   DMAX:  <all> - refls with !Fph-Fp!/Fp > DMAX will not used
   ANOM:  <N>,Y - Y means to use anomalous scattering
   DAMAX: <all> - refls with !F(+)-F(-)!/F > DAMAX will not used
   DAMIN: <0>   - refls with !F(+)-F(-)!/F < DAMIN will not used
   SDLIM: <0>  - limit of sigma: reflections with !F! > sigma*SDLIM will be used
   CENT   <A>/N/Y - use for calculation E: A - all refls, N - only acentric,
                                           Y - only centric
   RESOL:   - MIN,MAX <from file> - resolution
   BOFF:    <0> , 256 corresponds to RESmin=8
   BADD:    <0> , BOFF and BADD mean :
             !F!new = !F!input *EXP(-BADD*RSQ)*(1-EXP(-BOFF*RSQ)
   FILE_O: <phase_abc.dat> - outpit file of phase coefficients
 
   Parameters of subroutine PHASE:
 
       SUBROUTINE PHASE(MDOC,NAMEC,NAMEF,NAMED,NAMEO,NAMEP
      * ,ANOM,BOFF,BADD,DMIN,DMAX,DAMIN,DAMAX,CENT
      * ,SIGMIN,RESMIN,RESMAX,STOP_TER,RESULT,IPRROW,IERR)
 
     MDOC    - mode of writing messages to DOC-file
               0 - only terminal , < - 0 only file, 0 < < 99 - both
               >= 99 - don't write
   NAMEC:  - input COORD_file /without extention "crd"/
   NAMEF:  - input file F_obs.
   NAMED:  - input file F_der.
   NAMEP:  - input file of phase.
   DMAX:  <all> - refls with !Fph-Fp!/Fp > DMAX will not used
   ANOM:  <N>,Y - Y means to use anomalous scattering
   DAMAX: <all> - refls with !F(+)-F(-)!/F > DAMAX will not used
   DAMIN: <0>   - refls with !F(+)-F(-)!/F < DAMIN will not used
   SIGMIN: <0> -limit of sigma:reflections with !F! > sigma*SDLIM will be used
   CENT   <A>/N/Y - use for calculation E: A - all refls, N - only acentric,
                                           Y - only centric
   RESMIN:   - MIN,MAX <from file> - resolution
   RESMAX:
   BOFF:    <0> , 256 corresponds to RESmin=8
   BADD:    <0> , BOFF and BADD mean :
             !F!new = !F!input *EXP(-BADD*RSQ)*(1-EXP(-BOFF*RSQ)
   STOP_TER   - must be = 'N"
   NAMEO: <phase_abc.dat> - outpit file of phase coefficients
 
   IERR    - output signal of error / = 1 -error , = 0 - OK /
 
         output information :
 
      REAL RESULT(IPRROW)
 
      RESULT(1) - number of refls /in output file/
      RESULT(2) - <FOM>
      RESULT(3) - R-factor
      RESULT(4) - R_ST = SUM(!(Fph(exp)-Fph(calc)!)/SUM(!Fph(exp)-Fp!)
      RESULT(5) - Lack of closure of error E = rms(!!Fph(exp)!-!Fph(calc)!!)
      RESULT(6) - rms heavy atom = rms(!Fh!)
      RESULT(7)= NA number of atoms
c      RHMIN=1./RESMIN
c      RHMAX=1./RESMAX
c      DRANG=(RHMAX-RHMIN)/10.
c      RHR(1)=RESMIN
c      DO     I=2,11
c        T=1./RHR(I-1)+DRANG
c        RHR(I)=1./T
c      ENDDO
       E     - (WRZNZ(K),K=1,10)
       rmsHA - (FSZ(K)  ,K=1,10)
       P=FSZ(I)/WRZNZ(I),I=1,10
         RESULT(8) = RESMIN
         RESULT(9) = DRANG
         RESULT(10)= 0.0
         RESULT(10+I)=P,I=1,10
 
 ============================================
 
* PRINTD   show on screen the contents density-file and also can write down
           this to document file.
     Dialogue:
 
     NAME    - input file of electron density.
     INEG    = 0   - only positive value will be used.
             = 1   - negative value will be shown as:
                        -2 > > -4 : '-'
                        -4 > > -6 : '='
                        -6 > > -8 : '#'
                        -8 > >-10 : '$'
                       -10 >      : 'W'
     SCALE   - <1> Level of looking.
     R0      - <0> R0 will be added to actual value of
                   density Rold and divided by (Rlim*SCALE)/10, where
                   Rlim= MAX(!Rmax+R0!,!Rmin+R0!).
                   It means that all values el.dens > SCALE*Rmax will
                   be shown as "*".
     AXMIN,AXMAX - Limits of looking region /in fract. units/.
     AYMIN,AYMAX   Default values :Xmin,Xmax - 0.0,1.0
     AZMIN,AZMAX                   Ymin,Ymax - 0.0,1.0
                                   Zmin,Zmax - 0.0,1.0
     Parameters:
 
     MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             =< 99 - don't write
     IPOOL   - integer*2 array (NCRES) for one Z-section of electron
     NCRES     density NX x NY < NCRES.
     IERR    - signal of error / =1 -error , =o - OK /
 
 ============================================
 
* PSCALE   scaling by origine peak of Patterson.
           Program calculates Boverall factor by Patterson or
           by Wilson plot, calculates parameters of scaling
           Scale & Thermal factor for file_1, restores missing
           reflections in file_1 (to use reflections from file_2),
           defines effective resolution, writes scaled !F! of file_1
           to output file. Without file_2 program just restore missing
           reflections by Faver, B_overal defined by Patterson.
           Can scale two files with different unit cell.
       Dialogue and Batch:
 
      FILE_F: - input file of the modules of structure factors for scaling.
      FILE_2: - input second file / test file/
                without this file program will only restore missing
                reflections by Faver, B_overal defined by Patterson.
      FILE_O: - output file / scaled file /
      RESOL: MIN,MAX  - resolution /default from input file/
      MODE: <P>/W  scaling: "W" by Wilson plot, "P" by Patterson
      REST: <N>/Y/O , Y - restore missing refls to get its from file_2
                      O - restore by Faver, B_overal defined by Patterson
                          Resolution for restoration: 1)input or 2)from file-2
                          without file-2: REST: <N>,O , resolution 1) input
                          or 2) from file-1.
      BOFF:    <0> , 256 corresponds to RESmin=8
      BADD:    <0> , BOFF and BADD mean :
             !F!new = !F!input *EXP(-BADD*RSQ)*(1-EXP(-BOFF*RSQ)
 
        It is possible to use the subroutine PSCALE by program:
 
       SUBROUTINE PSCALE(MDOC,F_NAME,F2_NAME,FO_NAME
      * ,BOFF,BADD,MODE,REST,RFACD
      * ,RESMNI,RESMXI,ISYM,IPRSYM,RESULT,IPRROW,IERR)
 
   Parameters of subroutine:
 
     MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             >= 99 - don't write
     F_NAME  - input file of the modules of structure factors.
     F2_NAME - second input file.
     FO_NAME - output file.
     RESMNI  - resolution MIN
     RESMXI               MAX
     MODE    <P>/W  scaling: "W" by Wilson plot, "P" by Patterson
     REST    <N>/Y/O , Y - restore missing refls to get its from file_2
                       O - restore by Faver, B_overal defined by Patterson
     RFACD    /character*1/ dummy
     BOFF    <0>     - 256 corresponds to RESmin=8
     BADD    <0>     - BOFF and BADD mean :
                        !F!new = !F!input *EXP(-BADD*RSQ)*(1-EXP(-BOFF*RSQ)
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
     IERR    - output signal of error / =1 -error , =o - OK /
 
     RESULT /real RESULT(IPRROW,21) / - array for output information:
 
      i = 1 - information about !F! of file_1
      i = 2 - information about !F! of file_2
 
 
       RESULT(1,i)  =NREF    N_refls
       RESULT(2,i)  =RESMNI  min resolution
       RESULT(3,i)  =RESMXI  max resolution
       RESULT(4,i)  =LAP     sqrt(<s^2*F>)*4*pi^2/VOL for complete data set
       RESULT(5,i)  =DT      <u>_patt
       RESULT(6,i)  =BSUM    B_patt  = 8pi^2*<u>_patt^2
       RESULT(7,i)  =DTR     <u>_res = Resmax/3
       RESULT(8,i)  =BRES    Bres    = 4*<u>_res^2
       RESULT(9,i)  =DTFOUR  <u>_four= <u>_patt/sqrt(2)
       RESULT(10,i) =BEFF    Beff    = 4*RESeff^2
       RESULT(11,i) =RESEFF  RESeff  = <u>_four*2*sqrt(2)
       RESULT(12,i) =SF2     sqrt(<F^2>)/VOL
       RESULT(13,i) =SF4     sqrt(<F^4>)/VOL
       RESULT(14,i) =SH2F    sqrt(<s^2*F>)*2*pi^2/(VOL*A^2) curvature(x)
       RESULT(15,i) =COMPL   completeness
       RESULT(16,i) =RESEFF_COMP  RESeff for complete data set
       RESULT(17,i) =LAP     sqrt(<s^2*F>)*4*pi^2/VOL
       RESULT(18,i) =FSCALE  Scale    for !F! by Wilson plot
       RESULT(19,i) =BTEMP   Boverall for !F! by Wilson plot
       RESULT(20,i) =RESN    Resmin for scaling by Wilson Plot
       RESULT(21,i) =SCALE   P(000) /Patterson/
 
       RESULT(1,3)  =scale1P
       RESULT(2,3)  =btemp1P
       RESULT(3,3)  =scale2P
       RESULT(4,3)  =btemp2P
       RESULT(10,3) =ERR_MIN
       RESULT(11,3) =RFAC_FREE
       RESULT(12,3) =DPI_VAL
       RESULT(13,3) =ERR_MAX
       RESULT(14.3) =NUMGP
       RESULT(15,3) =BOFF
       RESULT(16,3) =BADD
       RESULT(17,3) =RCORR  - correlation factor
       RESULT(18,3) =CSCALE - Scaling F_out = F_2*cscale*exp(-bscale*S^2/4)
       RESULT(19,3) =BSCALE
       RESULT(20,3) =R-FAC  - R-factor
 
       RESULTA(I,4)= RHRP(I)
       RESULTA(I,5)= RES_EFF(I)
       RESULTA(I,6)= RES_EFF_B0(I)
       RESULTA(I,7)= ERR_MIN(I)
 
       RESULTA(I,8)=RHRP(I)
       RESULTA(I,9)=ERR_MAX(I)
  -----------------------
  ---   expected minimal coordinate error     ----
 
 
        sig(Ah) =[ 2pi* sqrt( sum ( h^2 * sig(Fobs)^2 )) ]/ (V* Acell)
 
        Ahh     =[ 2pi^2 * sum(h^2* Fobs )]/ (V *Acell^2)
 
        sig_min(r)  = (sig(Ah)/Ahh) * sqrt(3)
 
      V - volume of cell, A - cell parameter, summation over all reflections.
c
     ---  expected maximal coordinate error --------
c
c         del       = Fobs-Fcalc
c
          sigma(Ah) = [2pi*sqrt(sum(h^2*del^2))]/(V*Acell)
          Ahh       = [2pi^2*sum(h^2*Fobs)]/(V*Acell^2)
          sig_max(r)= sqrt(3)*(sigma(Ah)/ Ahh)
 
          sig_max(r) = 4pi*sqrt(3*sum(h^2*(Fobs-F2)^2*A))/VOL')
 
  --------------------------------------
 
  Width_of_origin_peak_patt                D
c Corresponding Thermal factor:            B_patt    = 8p^2*(D/2)^2
 
c <width> of atomic peaks for              2*<u>_resol = RESmax/3
c resolution only                          B_resol   = 4*RESmax^2
 
c Expected <width> of atomic peaks         2*<u>_four= D/sqr(2) + 0.1*RESmax
c Corresponding B_overall                  B_overall = 8pi^2*<u>_four^2
 
c Resolution_effective                     Res_eff   = <u>_four*2.0
c Corresponding thermal factor             B_res_eff = 4Res_eff^2
c
 
 ------------------------------------
 
 ============================================
 
* RANDCRD  introduces a random errors to coordinates.
 
   Dialogue and Batch:
 
     FILE_C     - input file of coordinates.
     FILE_O     - output file.
     RMS:  <0>  - RMS of output coordinates
     MOD:  <Y>  - all  atoms will be included in output file.
            A   - only CA
            B   - only back bond"s atoms + CB
            P   - only P
     BOV:  <0>  -  Boverall - new value of B_factor for all atoms
                   BOV=0 means not to change
 
   Parameters of subroutine RANDCRD:
 
       SUBROUTINE RANDCRD(MDOC,NAMEC,NAMEO,RMSR,MOD,BOV
      * ,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     NAMEC  - name of input file without extention.
     NAMEO  - name of output file without extention.
     RMS:  <0>  - RMS of output coordinates
     MOD:  <Y>  - all  atoms will be included in output file.
            A   - only CA
            B   - only back bond"s atoms
            P   - only P
     BOV:  <0>   -  Boverall - new value of B_factor for all atoms
                    BOV=0 means not to change
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
 ============================================
 
* RANDF    introduces a random errors to !F!.
       Dialogue:
 
       FILE_I:  - name of input file.
       FILE_O:  - name of output file.
       SCALE:   -   <1>
       MODE:    -   <N> - F"=F*SCALE*ERROR
                     R  - F"=F*SCALE*ERROR*Shkl
                          -0,5 < ERROR < 0.5 - random value
 
       SUBROUTINE RANDF(MDOC,NAME,NAMEO
      *           ,SCALE,RMS,MODE,RESULT,IPRROW,ISYM,IPRSYM,IERR)
 
       Parameters:
 
       MDOC   - mode of writing messages to DOC-file
                0 - only terminal , < - 0 only file, 0 < < 99 - both
                >= 99 - don't write
       NAME   - name of input file.
       NAMEO  - name of output file.
       MODE   - /character*1/
              -   <N> - F"=F*SCALE*ERROR
                   R  - F"=F*SCALE*ERROR*Shkl
       SCALE: -   <1>
       ISYM   - integer*2 array for cryst.symmetry operators /see INF-file/
       IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM)
       IERR   - signal of error / =1 -error , =o - OK /
 
       RESULT - real array RESULT(IPRROW) for additional output information
 
 ============================================
 
* REDUCT   checks asymmetric part, other part will be equaled to zero.
           Program reads file type of "RI" (electron density),
           and writes output file only asymmetric part of unit cell
           and to equal to zero remaining part.
 
   Dialogue and Batch:
 
       FILE_D: - name of input dens-file.
       MODE:   - <R> - /default/  reduct for all space groups.
                  C  -  for C2221
                  P  -  for P212121
                  4  -  for P43212
                  I  -  for I4
       FILE_O: - name of output dens-file /'' '' - means without this file/.
 
       Parameters of subroutine REDUCT:
 
       SUBROUTINE REDUCT(MDOC,NAMED,NAMEO,RESULT
                        ,POOL,MEMORY,MODE,ISYM,IPRSYM,IERR)
 
       MDOC   -  mode of writing messages to DOC-file
                 0 - only terminal , < - 0 only file, 0 < < 99 - both
                 >= 99 - don't write
       NAMED  -  name of input dens-file .
       NAMEO  -  name of output dens-file /'' '' - means without this file/.
       POOL   -  real array POOL(MEMORY).
       MEMORY -  (MEMORY*2)/3 is memory for one Z-section of electron
                 density NX x NY.
       MODE   -  <R> - /default/  reduct for all space groups.
    /character*1/
                  C  -  for C2221
                  P  -  for P212121
                  4  -  for P43212
                  I  -  for I4
       ISYM   - integer*2 array for cryst.symmetry operators
       IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM)
                Number of cryst. symm. operators.
                We need not to define contents of arrays ISYM.
                Here is only reservation of memory.
       IERR   - signal of error / =1 -error , =o - OK /
 
       RESULT /real RESULT(11)/ - array for output information:
 
       RESULT( 7) - number of points
       RESULT( 8) - number of points of asymm. part
       RESULT( 9) - asymm. part for X : NX / NXasym.part
       RESULT(10) - asymm. part for Y : NY / NYasym.part
       RESULT(11) - asymm. part for Z : NZ / NZasym.part
 
 
 ============================================
 
* REFINE   (heavy) atom"s full matrix refinement.
 
               1. If we use files: !Fp! (native) , !Fph! (derivative) and
                  Phases of native structure factors:
 
                 minimize SUM(W*(Fph(obs)-D)**2)  / vector difference /
                 where  D=!Fph!calc=SC1*(Fp+SC2*EXP(-TO*RSQ)*Fh)
                        Fh - structure factors of heavy atoms.
 
               2. If we use files: !Fph! (derivative) and Phases of native
                  structure factors:
 
                 minimize SUM W*(Fph(obs)-D)**2)  / vector difference /
                 where D=!Fph!calc=SC2*EXP(-TO*RSQ)*Fh
 
               3. If we use files: !Fp! (native) and !Fph! (derivative):
 
                 minimize SUM(W*((!Fph(obs)!-!Fp!)-D)**2)
                 where D=!Fph-Fp!calc=SC2*EXP(-TO*RSQ)*Fh
 
                 If we use anomalious scattering:
                 minimize SUM(W*(DEL-D)**2)
                 where DEL = sqrt(DEL_iso^2 + 0.75*DEL_ano^2)
                 DEL_iso = Fph(obs) - Fp(obs)
                 DEL_ano = Fph(obs)(+) - Fph(obs)(-)
 
               4. If number of atoms = 1 and no phases file:
 
                 define SC2 coefficient.
 
       Dialogue and batch:
 
   FILE_C:  - input COORD_file /without extention "crd"/
   FILE_F:  - input file F_obs.
   FILE_D:  - input file F_der.
   FILE_PH: - input file of Phases.
   DMAX:   <all> - refls with !Fph-Fp!/Fp > DMAX will not used
   SDLIM:  <0> - limit of sigma: reflections with !F! > sigma*SDLIM will be used
   RESOL:   - MIN,MAX <from file> - resolution
   NC:     <2> - number of cycles of refinement.
   ANOM:   <N>,Y  - Y means use anomalious scattering
   CENT   <A>/N/Y - use A - all refls, N - only acentric, Y - only centric
   REFS:   - <Y>/N , Y - refine SCALE1(Fph-->Fp), N - no
   REFC:   - <N>/Y/S , Y - refine SCALE2(Fh -->Fp), N - no, S only for 1st cycle
   REFA:   - <N>/Y , Y - refine Boverall, N - no
   REFX:   - <Y>/N , Y - refine coordinates, N - no
   REFB:   - <N>/Y , Y - refine Biso factor, N - no
   REFO:   - <Y>/N , Y - refine occupancies, N - no
   FILE_O:  <refine> - outpit file of refined coords /without extention "crd"/
                       Default file name is 'refine.crd'
   BOFF:    <0> , 256 corresponds to RESmin=8
   BADD:    <0> , BOFF and BADD mean :
             !F!new = !F!input *EXP(-BADD*RSQ)*(1-EXP(-BOFF*RSQ)
 
   Parameters of subroutine REFINE:
 
       SUBROUTINE REFINE(MDOC,NAMEC,NAMEF,NAMED,NAMEO,NAMEP
      * ,BOFF,BADD,ANOM,DMIN,DMAX,DAMIN,DAMAX
      * ,SIGMIN,RESMIN,RESMAX,NCYCL,CENT
      * ,REFS,REFC,REFA,REFX,REFB,REFO,STOP_TER
      * RESULT,IPRROW,IERR)
 
   MDOC    - mode of writing messages to DOC-file
               0 - only terminal , < - 0 only file, 0 < < 99 - both
               >= 99 - don't write
   NAMEC:  - input COORD_file /without extention "crd"/
   NAMEF:  - input file F_obs.
   NAMED:  - input file F_der.
   NAMEP:  - input file of phase.
   DMAX:   <all> - refls with !Fph-Fp!/Fp > DMAX will not used
   SIGMIN: <0> -limit of sigma:reflections with !F! > sigma*SIGMIN will be used
   RESMIN:   - MIN,MAX <from file> - resolution
   RESMAX:
   STOP_TER   - must be = 'N"
   NAMEO:  <refine> - outpit file of refined coords /without extention "crd"/
                       Default file name is 'refine.crd'
   NCYCL:  - number of cycles of refinement.
   ANOM:   <N>,Y  - Y means use anomalious scattering
   CENT   <A>/N/Y - use A - all refls, N - only acentric, Y - only centric
   REFS:   - <Y>/N , Y - refine SCALE1(Fph-->Fp), N - no
   REFC:   - <N>/Y , Y - refine SCALE2(Fh -->Fp), N - no
   REFA:   - <N>/Y , Y - refine Boverall, N - no
   REFX:   - <Y>/N , Y - refine coordinates, N - no
   REFB:   - <N>/Y , Y - refine Biso factor, N - no
   REFO:   - <Y>/N , Y - refine occupancies, N - no
   IERR    - output signal of error / = 1 -error , = 0 - OK /
   DMIN,DAMIN,DAMAX - dummy
 
         output information :
 
      REAL RESULT(IPRROW)
 
      RESULT(1) - number of atoms /in output file/
      RESULT(2) - Lack of closure of error E = rms(!!Fph(exp)!-!Fph(calc)!!)
      RESULT(3) - rms heavy atom = rms(!Fh!)
      RESULT(4) - R-factor
      RESULT(5) - R_ST = SUM(!(Fph(exp)-Fph(calc)!)/SUM(!Fph(exp)-Fp!)
 
 ============================================
 
* RFADD    adds spheric coefficients.
     Dialogue and Batch:
 
    FILE_1 - input ALMN_file
    FILE_2 - input second ALMN_file
    FILE_O - output file
    SCALE  - <1.0>   ALMN_new = ALMN_1 + SCALE * ALMN_2
 
       SUBROUTINE RFADD(MDOC,NAME1,NAME2,NAMEO,SCALE
      * ,POOL,MEMORY,ISYM,IPRSYM,IERR)
 
    Parameters:
 
   MDOC  - mode of writing messages to DOC-file
           0 - only terminal , < - 0 only file, 0 < < 99 - both
           >= 99 - don't write
   NAME1  - input ALMN_file
   NAME2  - input second ALMN_file
   NAMEO  - output ALMN_file
   SCALE
   POOL   - real array(MEMORY)
   MEMORY
   ISYM   - integer*2 array for cryst.symmetry operators.
   IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
            number of cryst. symm. operators.
   IERR   - signal of error / =1 -error , =o - OK /
 
 ============================================
 
* RFCOEF   calculates spherical Fourie coefficients of real function
           using cristallographic Fourie coefficients. Real function
           is Patterson or electron density.
           Output file for this programm is type of "ALMN" (input
           file for program RFRES).
     Dialogue and Batch:
 
   FILE_IN:       - input file of structure factors or furie coefficients
                    ( from program COEF )
   RAD:   <20.0>  - radius of cat-off sphere for Patterson
   LMAX:  <30>/60 - maximal L-index of coefficients Almn.
   RESOL: MIN,MAX - resolution <default from FILE_IN>
   ZSYM:  <0> - symmetry Z-axis in Patterson, 0 - means program computes it
   SH:   <0,0,0>  - shift origin / in frac.units/ of electron density.
                    shift from initial position to new
   BOFF:  <0> , 256 corresponds to RESmin=8A, 400 -> 10A /aprox./
   BADD:  <0>
              BOFF and BADD mean :
         will be used !F!new = !F!input *EXP(-BADD*RSQ)*(1-EXP(-BOFF*RSQ)
   FILE_B: <blanc/dic/bs-zeros.dat>
   FILE_O: - output file of coefficients Almn. / type of file - "ALMN"/
 
       SUBROUTINE RFCOEF(MDOC,NAMEF,NAMEO,NAMEB,BOFF,BADD,LINDEX,NSYMZ
      *    ,RESMIN,RESMXF,ARAD,ISYM,IPRSYM,IERR)
 
    Parameters:
 
   MDOC  - mode of writing messages to DOC-file
           0 - only terminal , < - 0 only file, 0 < < 99 - both
           >= 99 - don't write
   BOFF   -  see above.
   BADD   -
   LINDEX = LMAX see above.
   NAMEF  -  name of input file being type of "F   " or "FS  " or "COEF"
   RESMIN,RESMXF - Reflexes between these resolutions will be included
                   in calculation coefficients.(default values from file)
   NAMEB  - input BESSEL-ZEROS-FILE - for example: "/blanc/dic/bs-zeros.dat"
   ARAD   - radius /sphere of Patterson in angstroms/
   NSYMZ  <0> - symmetry Z-axis in Patterson, 0 - means program computes it
   NAMEO  - name of file where you want to save result
   ISYM   - integer*2 array for cryst.symmetry operators.
   IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
            number of cryst. symm. operators.
   IERR   - signal of error / =1 -error , =o - OK /
 
 ============================================
 
* RFFT     REDUCT + RFT : fast fourie transform: real --> complex.
           If space group isn't P1 program creates the scratch file
                                                       "scratch_rdc"
       Dialogue and Batch:
 
       FILE_D:  -  name of input dens-file.
       FILE_F:  -  name of output file of modules of SF
       FILE_PH: -  name of output file of phases  of SF
       RESOL:  MAX <default from DENS-file> resolution
 
       It possible to use subroutine RFFT by program:
 
       SUBROUTINE RFFT(MDOC,POOL,MEMORY,RESMAX
      * ,NAMED,NAMEF,NAMEPH,ISYM,IPRSYM,RESULT,IERR)
 
       Parameters:
 
       MDOC  - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
       NAMED - name of input dens-file.
               Symmetry operators will be taken from this file.
       NAMEF - name of output file of modules of SF
       NAMEPH- name of output file of phases  of SF
       RESMAX - resolution. Default values from DENS-file.
       POOL   -  real array POOL(MEMORY).
       MEMORY -  (MEMORY*2)/3 is memory for one Z-section of electron
                 density NX x NY.
                      or
                 NCRES= (MEMORY-IPRSYM*9-2)/2 is memory for
                 the one Z-section of electron density NX x NY < NCRES.
       ISYM  - integer*2 array for cryst.symmetry operators
       IPRSYM- dimension of integer*2 array ISYM(5,3,IPRSYM)
       IERR  - signal of error / =1 -error , =o - OK /
 
       RESULT /real RESULT(11)/ - array for output information:
 
       RESULT(1) - number of refls
       RESULT(2) - min resolution
       RESULT(3) - max resolution
       RESULT(4) - F(0,0,0)
       RESULT(5) - <!F!> = sqrt(<I>)
       RESULT(6) - < I >
       RESULT(7) - number of points of density.
       RESULT(8) - number of points of asymm. part
       RESULT(9) - asymm. part for X : NX / NXasym.part
       RESULT(10) - asymm. part for Y : NY / NYasym.part
       RESULT(11) - asymm. part for Z : NZ / NZasym.part
 
       If space group isn't P1 program creates the scratch file
       "scratch_rdc" which is deleted at the end.
 
 ============================================
 
* RFRES    calculates Rotation Function map in Euler coordinate system.
           Rotation is 1.) alpha - about Z, 2) beta - about new Y
                       3.) gamma - about new Z.
           Solution RFRES corresponds to the rotation by RFROT,TRANS programs
           i.e.:   RFRES: (a,b,g) peak for file_1: model1
                                           file_2: model2
           TRANS: model2 --> model1: angle: a,b,g
           RFROT: model2 --> model1: angle: a,b,g
     Dialogue and Batch:
 
    FILE_1 - input ALMN_file /for self-rotation function use one file/
    FILE_2 - input second ALMN_file for cross-rotation function
    LIMITS <0,180,5> /grad/ - BETA-min,BETA-max,BETA-del')
    FILE_O - output file / if you want it/, type of file is "RI  "
                           as DENS file, possible to use PRINTD to look result.
 
       SUBROUTINE RFRES(MDOC,NAME1,NAME2,NAMEO,BETMIN,BETMAX,BETDEL
      * ,POOL,MEMORY,ISYM,IPRSYM,IERR)
 
    Parameters:
 
   MDOC  - mode of writing messages to DOC-file
           0 - only terminal , < - 0 only file, 0 < < 99 - both
           >= 99 - don't write
   NAME1  - Input ALMN_file
   NAME1  - input second ALMN_file for cross-rotation function
   NAMEO  - name of file where you want to save result
   BETMIN - min and max section of Rotation function
   BETMAX
   BETDEL   delta = 0 means default values: <0,180,5>
   POOL   - real array(MEMORY)
   MEMORY
   ISYM   - integer*2 array for cryst.symmetry operators.
   IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
            number of cryst. symm. operators.
   IERR   - signal of error / =1 -error , =o - OK /
 
 ============================================
 
* RFROT    calculates rotated spheric coefficients.
              Rotation is 1.) alpha - about Z, 2) beta - about new Y
                          3.) gamma - about new Z.
 
      Rotation corresponds to solution RFRES and TRANS-program
      i.e.:   RFRES: (a,b,g) peak for file_1: model1
                                      file_2: model2
              TRANS: model2 --> model1: angle: a,b,g
              RFROT: model2 --> model1: angle: a,b,g
 
     Dialogue and Batch:
 
    FILE_I - input ALMN_file
    ANGLE <0,0,0> /grad/ - rotation angles
    LIML: LMIN,LMAX <0,60> - L_limits for spheric coefficients
    FILE_O - output file
 
       SUBROUTINE RFROT(MDOC,NAME1,NAMEO,ALPHA,BETA,GAMMA
      * ,LMINR,LMAXR,POOL,MEMORY,ISYM,IPRSYM,IERR)
 
    Parameters:
 
   MDOC  - mode of writing messages to DOC-file
           0 - only terminal , < - 0 only file, 0 < < 99 - both
           >= 99 - don't write
   NAME1  - Input ALMN_file
   NAMEO  - name of output file
   POOL   - real array(MEMORY)
   MEMORY
   ISYM   - integer*2 array for cryst.symmetry operators.
   IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
            number of cryst. symm. operators.
   IERR   - signal of error / =1 -error , =o - OK /
 
 ============================================
 
* RFT      fast fourie transform: real --> complex.
           Program transforms contents of DENS-file to F and PH files.
           For all space groups.
           Density file has to contain asymm. part of unit cell.
           You neet to use REDUCT before or program RFFT.
       Dialogue and Batch:
 
       FILE_D:  -  name of input dens-file.
       FILE_F:  -  name of output file of modules of SF
       FILE_PH: -  name of output file of phases  of SF
       RESOL:  MAX  resolution <default from DENS-file>
 
       It possible to use subroutine RFT by program:
 
       SUBROUTINE RFT(MDOC,POOL,MEMORY,RESMAX
      * ,NAMED,NAMEF,NAMEPH,ISYM,IPRSYM,RESULT,IERR)
 
       Parameters:
 
       MDOC  - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
       NAMED - name of input dens-file.
               Symmetry operators will be taken from this file.
       NAMEF - name of output file of modules of SF
       NAMEPH- name of output file of phases  of SF
       RESMAX - resolution. Default values from DENS-file.
       POOL   - real array (MEMORY)
       MEMORY - is dimension of real array POOL.
                NCRES= (MEMORY-IPRSYM*9-2)/2 is memory for
                the one Z-section of electron density NX x NY < NCRES.
       ISYM  - integer*2 array for cryst.symmetry operators
       IPRSYM- dimension of integer*2 array ISYM(5,3,IPRSYM)
       IERR  - signal of error / =1 -error , =o - OK /
 
       RESULT /real RESULT(11)/ - array for output information:
 
       RESULT(1) - number of refls
       RESULT(2) - min resolution
       RESULT(3) - max resolution
       RESULT(4) - F(0,0,0)
       RESULT(5) - <!F!> = sqrt(<I>)
       RESULT(6) - < I >
 
 ============================================
 
* ROTFFT   rigid body or multiple domains refinement by FFT.
       Dialogue and batch:
 
   FILE_C:       - input COORD_file /without extention "crd"/
   FILE_F:       - input file F_obs.
   BOFF:   <0>   - 256 corresponds to RESmin=8
   BADD:   <0>   - BOFF and BADD mean :
                   !F!new = !F!old *EXP(-BADD*RSQ)*(1-EXP(-BOFF*RSQ)
   DOM:    <N>/Y - Y means multy domains refinement.
                   Put between domains in coordinates file the string "#DOMAIN"
                   or "#MOLECULE"
   RESOL:  MIN,MAX <from file> - resolution
   SCALE:  <1>
   NC:     - number of cycles of refinement.
   REFA:   - <Y>/N , Y - refine ANGLES of rotation, N - no
   REFX:   - <Y>/N , Y - refine SHIFTS, N - no
   FILE_O:  <rotfft> - outpit file of refined coords /without extention "crd"/
                       Default file name is 'rotfft.crd'
 
   Parameters of subroutine ROTFFT:
 
       SUBROUTINE ROTFFT(MDOC,NAMEC,NAMEF,NAMEO,BOFF,BADD,DOM
      * ,RSMIN,RSMAX,NCYCL,SCALE,REFS,REFB,REFA,REFX
      * ,P1,RESULT,IPRROW,ISYM,IPRSYM,IERR)
 
   MDOC    - mode of writing messages to DOC-file
               0 - only terminal , < - 0 only file, 0 < < 99 - both
               >= 99 - don't write
   NAMEC:  - input COORD_file /without extention "crd"/
   NAMEF:  - input file F_obs.
   BOFF:
   RSMIN:   - MIN,MAX <from file> - resolution
   RSMAX:
   SCALE:  <1>
   NCYCL:     - number of cycles of refinement.
   REFA:   - <Y>/N , Y - refine ANGLES of rotation, N - no
   REFX:   - <Y>/N , Y - refine SHIFTS, N - no
   FILE_O:  <rotFFT.crd> - outpit file of refined coords
                                             /without extention "crd"/
                       Default file name is 'rotFFT.crd'
   ISYM    - integer*2 array for cryst.symmetry operators.
   IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
   IERR    - output signal of error / = 1 -error , = 0 - OK /
 
 
         output information :
 
       REAL RESULT(IPRROW)
 
       RESULT(1) - number of cycles of refinement
       RESULT(2) - Scale
       RESULT(3) - Boverall
       RESULT(4) - R-factor
       RESULT(5) - Correlation
       RESULT(6) - initial R-factor
       RESULT(7) - initial Correlation
       RESULT(8) =TX(1,1)
       RESULT(9) =TX(2,1)
       RESULT(10)=TX(3,1)
       RESULT(11)=THETA(1,1)
       RESULT(12)=THETA(2,1)
       RESULT(13)=THETA(3,1)
       RESULT(14) =TX(1,2)
       RESULT(15) =TX(2,2)
       RESULT(16) =TX(3,2)
       RESULT(17) =THETA(1,2)
       RESULT(18) =THETA(2,2)
       RESULT(19) =THETA(3,2)
       RESULT(20)- number of domains
 
 
 ============================================
 
* ROTLSQ   rigid body or multiple domains refinement.
       Dialogue and batch:
 
   FILE_C:  - input COORD_file /without extention "crd"/
   FILE_F:  - input file F_obs.
   BOFF:    <0> , 256 corresponds to RESmin=8
   BADD:    <0> , BOFF and BADD mean :
                   !F!new = !F!old *EXP(-BADD*RSQ)*(1-EXP(-BOFF*RSQ)
   DOM:    <N>/Y - Y means multy domains refinement.
                   Put between domains in coordinates file the string "#DOMAIN"
                   or "#MOLECULE"
   FMIN:   <0> - minimal value of !Fobs!
   SDMIN:  <0> - limit of sigma: reflections with !F! > sigma*SDLIM will be used
   RESOL:   - MIN,MAX <from file> - resolution
   SCALE:  <1>   Fcalc_used = SCALE * Fcalc * exp( -BTEMP*s**2)
   BTEMP:  <0>
   IPERC: <100> - percent of reflections which will be used
   NC:     - number of cycles of refinement.
   P1:     - <N>/Y , P1 mode refinement
   REFS:   - <Y>/N , Y - refine SCALE, N - no
   REFB:   - <N>/Y , Y - refine BTEMP, N - no
   REFA:   - <Y>/N , Y - refine ANGLES of rotation, N - no
   REFX:   - <Y>/N , Y - refine SHIFTS, N - no
   FILE_O:  <rotlsq> - outpit file of refined coords /without extention "crd"/
                       Default file name is 'rotlsq.crd'
 
   Parameters of subroutine ROTLSQ:
 
       SUBROUTINE ROTLSQ(MDOC,NAMEC,NAMEF,NAMEO,BOFF,BADD,DOM
      * ,FMIN,SIGMIN,RSMIN,RSMAX,NCYCL,SCALE,BTEMP,REFS,REFB,REFA,REFX
      * ,P1,RESULT,IPRROW,ISYM,IPRSYM,IERR)
 
   MDOC    - mode of writing messages to DOC-file
               0 - only terminal , < - 0 only file, 0 < < 99 - both
               >= 99 - don't write
   NAMEC:  - input COORD_file /without extention "crd"/
   NAMEF:  - input file F_obs.
   BOFF:
   FMIN:   <0> - minimal value of !Fobs!
   SIGMIN: <0> - limit of sigma:reflections with !F! > sigma*SDLIM will be used
   RSMIN:   - MIN,MAX <from file> - resolution
   RSMAX:
   SCALE:  <1>   Fcalc_used = SCALE * Fcalc * exp( -BTEMP*s**2)
   BTEMP:  <0>
   NCYCL:     - number of cycles of refinement.
   REFS:   - <Y>/N , Y - refine SCALE, N - no
   REFB:   - <N>/Y , Y - refine BTEMP, N - no
   REFA:   - <Y>/N , Y - refine ANGLES of rotation, N - no
   REFX:   - <Y>/N , Y - refine SHIFTS, N - no
   P1:     - <N>/Y , P1 mode refinement
   FILE_O:  <rotlsq.crd> - outpit file of refined coords
                                             /without extention "crd"/
                       Default file name is 'rotlsq.crd'
   ISYM    - integer*2 array for cryst.symmetry operators.
   IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
   IERR    - output signal of error / = 1 -error , = 0 - OK /
 
 
         output information :
 
       REAL RESULT(IPRROW)
 
       RESULT(1)- number of cycles
       RESULT(2) - Scale
       RESULT(3) - Boverall
       RESULT(4) - R-factor
       RESULT(5) - Correlation
       RESULT(6) - initial R-factor
       RESULT(7) - initial Correlation
       RESULT(8)  =TX(1,1)
       RESULT(9)  =TX(2,1)
       RESULT(10) =TX(3,1)
       RESULT(11) =THETA(1,1)
       RESULT(12) =THETA(2,1)
       RESULT(13) =THETA(3,1)
       RESULT(14) =TX(1,2)
       RESULT(15) =TX(2,2)
       RESULT(16) =TX(3,2)
       RESULT(17) =THETA(1,2)
       RESULT(18) =THETA(2,2)
       RESULT(19) =THETA(3,2)
       RESULT(20) - number of domains
       RESULT(21) - number of refls /in output file/
 
 ============================================
 
* RSOLINE  draws maps of self-rotation function by isolines (Postscript format)
 
   Dialogue:
 
    FILE_D:    - input file of self-rotation function ( result of RTRANS )
 
                 Program shows maximal value of SF and sigma : D_max,D_sigma
                 New maximal value for drawing is D_max_new = D_sigma * COEF
 
    COEF:  <2> - for D_max_new /times of sigma/')
    SCALE: <1> - scale of picture / from 0 to 1 /')
 
                 Output file is 'risoline.ps'
 
 ============================================
 
* RTRANS   transforms Rotation Function map from Euler coordinate system
           to polar coordinates system.
 
   Dialogue:
 
      FILE_R:       - input file (result of RFRES)
      FILE_O:       - output file
      CHI:    <180> - output file is one section RF(theta,phi,chi)
                      Look result by program "printd" or "risoline"
 
 ============================================
 
* SCALE    Wilson's plot scaling. Program calculates the scale and the
           thermal factor by Wilson's plot scaling method.
           F_new = scale * exp(-B * R^2) * F_old,  R=sin(theta/lambda)
           This program scales files of type 'F   ', 'FS  '.
       Dialogue and Batch:
 
      FILE_F: - input file of the modules of structure factors /for scaling/.
      FILE_T: - input file of the modules of structure factors /test file/.
      RESOL:  MIN,MAX  - resolution for scaling / default value from files/
      SHELL:   <10>    - number of shells /sin(theta)/lambda/
      FILE_O:         - output_file /" " means without output/
 
        It is possible to use the subroutine SCALE by program:
 
       SUBROUTINE SCALE(MDOC,F_NAME,FN_NAME,FO_NAME
      *          ,NUMGP,RESMNI,RESMXI,ISYM,IPRSYM,RESULT,IERR)
 
   Parameters of subroutine:
 
     MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             >= 99 - don't write
     F_NAME  - input file of the modules of structure factors /for scaling/.
     FN_NAME - input file of the modules of structure factors /test file/.
     FO_NAME - output file /" " means without output/
               Name of file where you want to save result of this progaram
               new scaling modules structure factors.
               F_new = scale * exp(-B * R^2) * F_old,  R=sin(theta/lambda)
     NUMGP   - NUMBER OF SHELLS
               Number of shells in reciprocal space. Program will
               calculate  scale temperature factors by method least
               mean square using these intervals. If you type "1" then BTEMP
               will be 0, and scale will be calculated as following.
                     SCALE = SUM(Ftest**2/F**2)
               If you tape 0 default value will be accepted / = 10 /.
     RESMNI  - resolution MIN  /only for calculation scale/
     RESMXI               MAX
               Interval in reciprocal space where will be calculated
               scale and temperature factors. When scale and temperuture
               factors will be calculated using only those structure factors
               which belong between these resolutions.
               I you type "0" and "0" program will define this values.
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
               number of cryst. symm. operators.
     IERR    - output signal of error / =1 -error , =o - OK /
 
     RESULT /real RESULT(11)/ - array for output information:
 
     RESULT(1) - number of refls for calculation Scale,Btemp
     RESULT(2) - min resolution  for calculation Scale,Btemp
     RESULT(3) - max resolution  for calculation Scale,Btemp
     RESULT(4) - number of shells
     RESULT(5) - scale
     RESULT(6) - btemp
 
 ============================================
 
* SELFROT  calculates self-rotation function
           see blanc/molrep/README
 
 ============================================
 
* SF_CALC  computes !F! and phases for atomic model (with/without)
           aniso B factors by conventional method (not FFT)
       Dialogue:
 
   FILE_C:                      - input COORD_file /without extention "crd"/
   FILE_F:  <phase_f.dat>       - output file F_calc.
   FILE_PH: <phase_ph.dat>      - output file of phase.
   ANOM:      <N>,Y             - Y means to use anomalous scattering
   ANISO:     <N>,Y             - Y means to use aniso B factors
   RESOL:     <3.0>             - resolution
 
   Parameters of subroutine SF_CALC:
 
       SUBROUTINE SF_CALC(MDOC,NAMEC,NAMEF,NAMEPH
      * ,ANOM,RESMAXR,RESULT,IPRROW,POOL,MEMORY,ISYM,IPRSYM,IERR)
 
     MDOC    - mode of writing messages to DOC-file
               0 - only terminal , < - 0 only file, 0 < < 99 - both
               >= 99 - don't write
   NAMEC:          - input COORD_file /without extention "crd"/
   NAMEF:          - output file F_calc.
   NAMEPH:         - output file of phase.
   ANOM:  <N>,Y    - Y means to use anomalous scattering
   ANISO: <N>,Y    - Y means to use aniso B factors
   RESMAXR: <3.0>  - resolution
   IERR            - output signal of error / = 1 -error , = 0 - OK /
 
         output information :
 
      REAL RESULT(IPRROW)
 
 
 ============================================
 
* SHIFTCRD calculates shifts of atoms from the gradients and
           writes new coordinates to output file.
 
 
   Dialogue and Batch:
 
     FILE_C  - input file of coordinates.
     FILE_G  - input file of gradients.
     FILE_O  - output file.
 
   Parameters of subroutine SHIFTCRD:
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     NAMEC  - name of input file without extention.
     NAMEO  - name of output file without extention.
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
     REAL RESULT(IPRROW)
 
       RESULT(1)=N_SHFT
       RESULT(2)=SHFT_RMS
       RESULT(3)=SHFT_AVER
       RESULT(4)=SHFT_MAX
        Shifts for non-solvent atoms :
       RESULT(5)=N_SHFT
       RESULT(6)=SHFT_RMS
       RESULT(7)=SHFT_AVER
       RESULT(8)=SHFT_MAX
        Shifts for non-H atoms :
       RESULT(9)=N_SHFTA
       RESULT(10)=SHFTA_RMS
       RESULT(11)=SHFTA_AVER
       RESULT(12)=SHFTA_MAX
 
       RESULT(13)=SIGMA
       RESULT(14)=SIGMAD
 
 
 ============================================
 
* SORTMRG  reads, sorts, averages several "BLANC"'s files F or PH.
           Program brings refletions to asymmetric part of reciprical space,
           averages equivalent elements. Program can change setting
           for monoclinic space groups and for No 146/155.
           Use this program only by dialogue. / see also program TOBLANC /
       Dialogue :
 
     FORM  -  You may choose format of files with which you want to operate.
                input  BLANC-SYSTEM file
              B - / F OR F,SIG(F) /
              H  - / PH /
                input diffractometer file
              D  - DIFFR /unformatted, I,SIG(I) /
             " " - END of reading input-files
 
     FILE_IN - name of input file.
 
     FILE_OUT - name of output file. Type name of file where you want to
                 save result of this programm.
 
     ANOM     - <N>,Y -  If you are going to use ANOM. SCATT. tape "Y".
 
     TOP      - Reflections with !I-<I>! > sd(I) * TOP will be accepted.
                 Here <I> is average value of intensities of on equalents.
 
     SETT      - <N>,Y -  If you are going to change SETTING tape "Y".
 
       only for FORM='D':
 
     CELL     - CELL PARAMETERS - A,B,C,ALPHA,BETA,GAMMA/degrees/
     N_SG     - SPACE GROUP NUMBER /from <1> to 230 /
     SETT     - SETTING NUMBER <1> /for monoclinic group/
     PDB      - PDB_code of structure (any 4 characters).
     CODE     - CODE_structure (any 4 chars). Here you may type name of
                 your derivatives or crystals.
 
 
 ============================================
 
* SURFACE  calculates area on Van-der-Waals surface accessible to solvent.
           writes to the file B_iso = SURFACE*10.0 + B_constant
 
       Dialogue:
 
    FILE_I       - input file-CRD   
    FILE_O:      - output file name 
                    default - <surface.crd>
    RAD:  <1.40> - radius H20 /angstroms/
    DEL:  <0.10> - delta between points /angstroms/
    BLIM:  <15>  - program writes to output file:
                              B_iso = SURFACE*10.0 + BLIM
 
       It possible to use subroutine SURFACE by program:
 
      SUBROUTINE SURFACE(MDOC,NAMER,NAMEO,RH2O,DEL,BLIM,POOL,MEMORY
     * ,RESULT,IPRROW,IERR)
 
   Parameters:
 
     MDOC    - mode of writing messages to DOC-file
               0 - only terminal , < - 0 only file, 0 < < 99 - both
               >= 99 - don't write
     NAMER   - input file-CRD   /without extention "crd"/
     NAMEO   - output file name /without extention "crd"/
                    default - <surface.crd>
     RAD: <1.40> - radius H20 /angstroms/
     DEL: <0.10> - delta between points /angstroms/
     POOL    - real array POOL(MEMORY)
     MEMORY  - dimension of array POOL, maximal number of atoms = MEMORY/5
     IERR    - output signal of error / =1 -error , =0 - OK /
 
     RESULT /real RESULT(IPRROW)/ - array for output information:
 
       RESULT(1) = N      - number of atoms
       RESULT(2) = SURFA  - Total Accessible Surface Area
       RESULT(3) = SURFC  - Total Contact    Surface Area
       RESULT(4) = XSH
       RESULT(5) = YSH    - coordinates of the centre / in angstrom/
       RESULT(6) = ZSH
 
 ============================================
 
* TOBLANC  converts PDB file or CIFile of Structure Factors to BLANC file.
           Reads formatted file ( CIF or PDB ) which contains indices
           and aplitudes or intensities or phases.
           Also simple (without titles) formatted file with "h,k,l,!F!"
           or "h,k,l,!F!,sig(F)" is acceptable.
           Program sorts, brings to asymmetric part of reciprical space,
           averages equivalent elements.
           The entrance to program suite BLANC.
       Dialogue and Batch:
 
     FILE_IN  - name of formatted input SF_PDB_file or CIFile.
                For PDB_file program will try to make scratch CIFile:
                "toblanc.cif" and to convert it to the internal BLANC format.
     FILE_OUT - name of output file. Type name of file where you want to
                save result of this programm.
 
     FILE_C:  - information about CELL and SYMMetry operators will
                be taken from this file of coordinates.
                /without extention "crd"/
     FILE_INF: - information about CELL and SYMMetry operators will
                be taken from this INF_file.
                /without extention "inf"/
     FILE_F:  - information about CELL and SYMMetry operators will
                be taken from this file of structure factors.
                If FILE_C = " ",FILE_INF = " " and FILE_F = " " then the
                information about CELL and SYMMetry operators will
                be taken from this FILE_IN.
 
     ANOM     - <N>,Y -  Y - if you are going to use ANOM. SCATT.
 
     TOP      - Reflections with !I-<I>! > sd(I) * TOP will be accepted.
                Here <I> is average value of intensities of on equalents.
 
     SLIM     -  <0.0> - Reflections with I > sd(I) * SLIM will be accepted.
 
     FORM_I   -  <F>/C/P - get: F - Fobs, C - Fcalc, P - Phase')
 
                                                  "toblanc.cif" only.
        It is possible to use the subroutine TOBLANC by program:
 
       SUBROUTINE TOBLANC(MDOC,POOL,MEMORY,NAME_IN,NAME_OUT
      * ,NAME_C,NAME_F,NAME_I,RESCRD,FORM_I,CIF,SETT
      * ,ANOM,ATOP,SD_LIM,ISYM,IPRSYM,RESULT,IPRROW,IERR)
 
             Parameters of subroutine:
 
     MDOC     - mode of writing messages to DOC-file
                0 - only terminal , < - 0 only file, 0 < < 99 - both
                >= 99 - don't write
     POOL     - working array /real/. Dimension is equal MEMORY.
     MEMORY   - maximal number of reflexions is MEMORY/4.
     NAME_IN  - name of input file.
     NAME_OUT - name of output file.
     NAME_C   - name of input file of coordinates. /see above/
     NAME_F   - name of intput file of structure factors. /see above/
     NAME_I   - name of input INF_file. /see above/
     FORM     -  <F>/C/P /character*1/- get: F - Fobs, C - Fcalc, P - Phase'
     CIF      - /character*1/ dummy
     ANOM     - <N>,Y - /character*1/, Y - if you are going to use ANOM.SCATT.
     ATOP     - Reflections with !I-<I>! > sd(I) * ATOP will be accepted.
     SD_LIM   -  <0.0> reflections with I > sd(I) * SD_LIM will be accepted.
     RESCRD   - high resolution limit. 0 means all rflections.
     SETT     - now is dummy.
     ISYM     - integer*2 array for cryst.symmetry operators
     IPRSYM   - dimension of integer*2 array ISYM(5,3,IPRSYM)
                We need not to define contents of arrays ISYM.
                Here is only reservation of memory.
     IERR    -  output signal of error / =1 -error , =0 - OK /
 
     RESULT /real RESULT(IPRROW)/ - array for output information:
 
   RESULT(1) - number of refls in output file.
   RESULT(2) - min resolution
   RESULT(3) - max resolution
   RESULT(4) - R-merge
   RESULT(5) - number of refls after symm. average.
   RESULT(6) - number of refls befor symm. average.
   RESULT(7) - N_gt_3sig
 
   RESULT(8)
   RESULT(9)   space group / 12 characters/
   RESULT(10)
 
   RESULT(11) - R-mult
   RESULT(12) - number of refls after average.
   RESULT(13) - number of refls before average.
   RESULT(14) - R-st(I)
   RESULT(15) - number of refls with I > sig.
   RESULT(16) - number of refls in input file.
   RESULT(17) - NBAD_SD
   RESULT(18) - NSYM
   RESULT(19) - NBAD_ABS
                NBAD = NBAD_SD + NBAD_ABS + ( F < 0.0 ; H=K=L=0 ; H,K,L > LIM )
   RESULT(20) = SD_LIM
   RESULT(21) = NOUT OUT FROM RESOLUTION
 
   RESULT(I,2) - R-merge
   RESULT(I,3) - number of symm. refls
 
 ============================================
 
* TRANS    ortogonal transformation of atomic coordinates.
             X"-new = [R] * ( X-old + sh1 ) + sh2
               [R]      - rotation matrix
               sh1, sh2 - vectors of shift
           Gives also information about position of molecule and radius
           of inertia.
            Rotation corresponds to solution RFRES and RFROT-program
            i.e.:   RFRES: (a,b,g) peak for file_1: model1
                                            file_2: model2
              TRANS: model2 --> model1: angle: a,b,g
              RFROT: model2 --> model1: angle: a,b,g
 
    Dialogue and Batch:
 
     FILE_IN:       - name input_file  / without extention "crd"/
     FILE_O: <" ">  - name output_file / without extention "crd"/
     SH1:   <0,0,0> -  vector of shift /before rotation/
     SH2:   <0,0,0> -  vector of shift /after rotation/
             Rotation:
     MODE:  <E>/P/R -  E - for input Eiler angles
                       P - for input polar angles
                       R - for input rotation matrix
     ANGLE: <0,0,0> -  angles of rotation
             [R]    -  rotation matrix
     R1:    <1,0,0> -  R(1,1),R(2,1),R(3,1)
     R2:    <0,1,0> -  R(1,2),R(2,2),R(3,2)
     R3:    <0,0,1> -  R(1,3),R(2,3),R(3,3)
 
   Parameters of subroutine TRANS:
 
       SUBROUTINE TRANS(MDOC,NAME1,NAME2,SH1,SH2
      *     ,MOD,AM,ALPHA,BETA,GAMMA,RESULT,ISYM,IPRSYM,IERR)
 
     MDOC  - mode of writing messages to DOC-file
             0 - only terminal , < - 0 only file, 0 < < 99 - both
             >= 99 - don't write
     NAME1             - input file name, without extention.
     NAME2             - output file name, without extention.
     SH1 /real(3)/     -  vector of shift /before rotation/
     SH2 /real(3)/     -  vector of shift /after rotation/
     MOD /character*1/   <E>/P/R -  E - for Eiler angles
                                    P - for polar angles
                                    R - for rotation matrix
     AM  /real(3,3)/   - rotation matrix
     ALPHA,BETA,GAMMA  - angles of rotation
     ISYM              - integer*2 array for cryst.symmetry operators
     IPRSYM            - dimension of integer*2 array ISYM(5,3,IPRSYM)
                         You need not to define contents of arrays ISYM
                         Here is only reservation of memory.
     IERR              - output signal of error / =1 -error , =o - OK /
 
     real RESULT(11) - array for output information:
 
       RESULT(1) = NTOT
       RESULT(2) = XMIN
       RESULT(3) = XMAX
       RESULT(4) = YMIN
       RESULT(5) = YMAX
       RESULT(6) = ZMIN
       RESULT(7) = ZMAX
       RESULT(8) = XS
       RESULT(9) = YS
       RESULT(10)= ZS
       RESULT(11)= RI
 
         NTOT       - number of atoms
         XMIN,XMAX  - MIN and MAX value of X,Y,Z
         YMIN,YMAX
         ZMIN,ZMAX
         XS,YS,ZS   - center of atoms: XS = Sum(X)/N
         RI         - Radius of inertia
 
 ============================================
 
* TRFUN    calculates translation and packing function
           see blanc/molrep/README
 
 ============================================
 
* TRPACK   translation function and/or packing function algorithm for one
           or two models. Phased translation function for one or two models.
           Function:
              T - usual translation function for Patterson or Diff.Patt.
                  For Patterson search use !F!, for Difference Patterson
                  search use coefficients (!F2!-!F!)^2 which are produced by
                  program COEF. For example F2 may be the structure factors of
                  some derivative and with model as a shere or a gaussian you
                  can try to solve heavy atom structure.
              P - packing function search good position of model with minimal
                  overlapping. Higher value corresponds better position.
              M - modified translation function ( TRANS and PACK )
                  for Patterson or Diff.Patt. Program computes usual translation
                  function for each pair of cryst. symmetry operators and
                  gather its by summation or by multiplication or keep only
                  minimal value /not tested yet/. Finally multiplies result by
                  packing function to remove incorrect position with bad
                  packing.
              D - translation function for density or for difference density
                  for one or two models.
              F - only FFT with coef_file of previous run of TRPACK.
                  It is useful when you to repeat the calculation of T of TM
                  with other values of parameters.
           Model:
                  files of !F! and phases computed for space group P1 with the
                  unit cell the same as searching structure are represent a
                  model. But searching model may by just a sphere or gaussian.
                  This model may be used, for example, for searching heavy
                  atom position in the Difference Patterson.
                  You can use second fixed model with correct orientation and
                  position.
           Result:
                 is a map of translation or packing function. Use program
                  PEAKSRCH to find maximal values or program PRINTD to look at
                  the map.
                Input files for this programm are type of "F  ", "FS  ","COEF"
                "PH  " and output file's type  is "RI  " (density) or "COEF"
                (input file for TRPACK or FFT ).
 
   Dialogue and Batch:
 
   MODE:  <T>  - translation function for Patterson or Diff.Patt.
           D   - translation function for density
           P   - packing function
           M   - modified translation function ( TRANS & PACK )
           F   - only FFT with coef_file of previous run.
 
     MODE='T'
 
   FILE_I:  - input_file of F-obs or DELTA**2 /from program COEF/
              File containing experimental modules of structure factors
              /unknown structure/ or (Fder-Fobs)**2.
   FILE_F1: - name of file of modules of model_1 /" " meas model is a sphere/
              File containing modules of structure factors calculated from model
              for space group P1 with cell parameters of unknown structure.
   MODEL_2: - <N>,Y,2 - "Y" if you want to use model_2 with known position,
                        "2" model_2 is two spheres
   FILE_F2: - name of file of modules of model_2  /if MODEL_2="Y"/
                       / " " meas model_2 is a sphere /
   RAD1:    <2.5> - /angstrom/ radius of sphere /model_1/
   RAD2:    <2.5> - /angstrom/ radius of sphere /model_2/
   GAUSS:   <N>/Y - Y means to use gaussian instead of sphere
   FILE_PH1: - name of file of phases of model_1
              File containing phases of structure factors calculated from model
              for space group P1 with cell parameters of unknown structure.
   FILE_PH2: - name of file of phases of model_2/
   SH1:     <0,0,0> - /u.c./ vector of shift model_2 to new position
   SH2:     <0,0,0> - /u.c./ vector of shift additional spheres of model_2
                      to new position (when model_2="2").
   PERC:    <50> - % of unknown structure_2
   REMOV:   <N>,Y - "Y" if you want to remove self-vectors of model from Fobs
   RESOL:   MIN,MAX - resolution / default values from Fobs_file /
   BOFF:  <0> , 256 corresponds to RESmin=8A, 900 -> 15A
   BADD:  <0>
   FILE_C:  <trpack_cf>  - name of coef_file, type of file is COEF
   FILE_S:  <trpack.scr> - name of SCRATCH_file
   FILE_D:  <trpack_dns> - name output DENS_file
   GRID:    NX,NY,NZ  - grid spacing /default value calculated from resolution
   LIMZ:    <0,0>     -  MIN MAX numbers of Z-section; "0,-1" means defaults.
 
      MODE='M'
 
   FILE_I:  - input_file of F-obs or DELTA**2 /from program COEF/
   FILE_F1: - name of file of modules of model_1 /" " meas model is a sphere/
              File containing modules of structure factors calculated from model
              for space group P1 with cell parameters of unknown structure.
   MODEL_2: - <N>,Y,2 - "Y" if you want to use model_2 with known position,
                        "2" model_2 is two spheres
   GAUSS:   <N>/Y - Y means to use gaussian instead of sphere
   FILE_F2: - name of file of modules of model_2  /if MODEL_2="Y"/
                       / " " meas model_2 is a sphere /
   RAD1:    <2.5> - /angstrom/ radius of sphere /model_1/
   RAD2:    <2.5> - /angstrom/ radius of sphere /model_2/
   FILE_PH1: - name of file of phases of model_1
              File containing phases of structure factors calculated from model
              for space group P1 with cell parameters of unknown structure.
   FILE_PH2: - name of file of phases of model_2/
   SH1:     <0,0,0> - /u.c./ vector of shift model_2 to new position
   SH2:     <0,0,0> - /u.c./ vector of shift additional spheres of model_2
                      to new position (when model_2="2").
   PERC:    <50> - % of unknown structure_2
   REMOV:   <N>,Y - "Y" if you want to remove self-vectors of model from Fobs
   RESOL:   MIN,MAX - resolution / default values from Fobs_file /
   BOFF:  <0> , 256 corresponds to RESmin=8A, 900 -> 15A
   BADD:  <0>
   FILE_C:  <trpack_cf>  - name of coef_file, type of file is COEF
   FILE_S:  <trpack.scr> - name of SCRATCH_file
   FILE_D:  <trpack_dns> - name output DENS_file
   GRID:    NX,NY,NZ  - grid spacing /default value calculated from resolution
   LIMZ:    <0,0>     -  MIN MAX numbers of Z-section; "0,-1" means defaults.
   FUNC:  <Y> - use trans.function for all symm.operators and packing function
           2 - only for two symm. operators
           N  - without Packing function
           P  - only Packing function
   SYMM_OP: <1,2> - two operator"s numbers, which will be used.
   ACCUM:   <M>,A - M - multiplication different functions, A  - summation
                    N - minimal function.
 
     MODE='D'
 
   FILE_I:  - input_file of FOUR-COEF /from program COEF/ - coefficients of
              observed electron density.
   FILE_F1: - name of file of modules of model_1 /" " meas model is a sphere/
              File containing modules of structure factors calculated from model
              for space group P1 with cell parameters of unknown structure.
   MODEL_2: - <N>,Y,2 - "Y" if you want to use model_2 with known position,
                        "2" model_2 is two spheres
   FILE_F2: - name of file of modules of model_2  /if MODEL_2="Y"/
                       / " " meas model_2 is a sphere /
   RAD1:    <2.5> - /angstrom/ radius of sphere /model_1/
   RAD2:    <2.5> - /angstrom/ radius of sphere /model_2/
   GAUSS:   <N>/Y - Y means to use gaussian instead of sphere
   FILE_PH1: - name of file of phases of model_1
              File containing phases of structure factors calculated from model
              for space group P1 with cell parameters of unknown structure.
   FILE_PH2: - name of file of phases of model_2/
   SH1:     <0,0,0> - /u.c./ vector of shift model_1 to new position
   SH2:     <0,0,0> - /u.c./ vector of shift additional spheres of model_2
            to new position (when model_2="2").
   PERC:    <50> - % of unknown structure_2
   INVERS: <N>,Y - "Y" if you want to use invers_density
   RESOL:   MIN,MAX - resolution / default values from Fobs_file /
   BOFF:  <0> , 256 corresponds to RESmin=8A, 900 -> 15A
   BADD:  <0>
   FILE_S:  <trpack.scr> - name of SCRATCH_file
   FILE_D:  <trpack_dns> - name output DENS_file
   GRID:    NX,NY,NZ  - grid spacing /default value calculated from resolution
   LIMZ:    <0,0>     -  MIN MAX numbers of Z-section; "0,-1" means defaults.
 
     MODE='P'
 
   FILE_P: - name of INF-file /will use only CELL parameters and symm.operators/
                       /created by program CREAT_INF,without extention "inf"/
        or
   FILE_I: - input_file F-obs /will use only CELL parameters and symm.operators/
   MODEL_2: - <N>,Y,2 - "Y" if you want to use model_2 with known position,
                        "2" model_2 is two spheres
   FILE_F2: - name of file of modules of model_2  /if MODEL_2="Y"/
                       / " " meas model_2 is a sphere /
              File containing modules of structure factors calculated from model
              for space group P1 with cell parameters of unknown structure.
   RAD1:    <2.5> - /angstrom/ radius of sphere /model_1/
   RAD2:    <2.5> - /angstrom/ radius of sphere /model_2/
   GAUSS:   <N>/Y - Y means to use gaussian instead of sphere
   FILE_PH1: - name of file of phases of model_1
              File containing phases of structure factors calculated from model
              for space group P1 with cell parameters of unknown structure.
   FILE_PH2: - name of file of phases of model_2/
   SH1:     <0,0,0> - /u.c./ vector of shift model_1 to new position
   SH2:     <0,0,0> - /u.c./ vector of shift second sphere of model_2 to new
                             position (when model_2="2").
   PERC:    <50> - % of unknown structure_2
   RESOL:   MIN,MAX - resolution / default values <500,3> /
   BADD:  <0>
   FILE_C:  <trpack_cf>  - name of coef_file, type of file is COEF
   FILE_S:  <trpack.scr> - name of SCRATCH_file
   FILE_D:  <trpack_dns> - name output DENS_file
   GRID:    NX,NY,NZ  - grid spacing /default value calculated from resolution
   LIMZ:    <0,0>     -  MIN MAX numbers of Z-section; "0,-1" means defaults.
 
      MODE='F'
 
   FILE_C: <trpack_cf>  - name of input coef_file /from program TRPACK/
   FILE_D: <trpack_dns> - name output DENS_file
   GRID:    NX,NY,NZ  - grid spacing /default value calculated from resolution
   LIMZ:    <0,0>     -  MIN MAX numbers of Z-section; "0,-1" means defaults.
   FUNC:  <Y> - use trans.function for all symm.operators and packing function
           2 - only for two symm. operators
           N  - without Packing function
           P  - only Packing function
   SYMM_OP: <1,2> - two operator"s numbers, which will be used.
   ACCUM:   <M>,A - M - multiplication different functions, A  - summation.
                    N - minimal function.
 
   Parameters of subroutine TRPACK:
 
       SUBROUTINE TRPACK(MDOC,NAME,MODE,MOD2,FUNC,REMOV,INVER
      * ,ACCUM,NX,NY,NZ,IZMIN,IZMAX,IOP1,IOP2,BADD,BOFF
      * ,RAD1,RAD2,SH2,SH1,GAUSS,PERC,RESMIN,RESMAX
      * ,POOL,IPRTOT,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     MODE   - see above. / character*1 /
     NAME   - /character NAME(10)*80 /
     FILE_F1   = NAME(1)
     FILE_PH1  = NAME(2)
     FILE_F2   = NAME(3)
     FILE_PH2  = NAME(4)
     FILE_I    = NAME(5)
     FILE_INF  = NAME(6)
     FILE_C    = NAME(7)
     FILE_S    = NAME(8)
     FILE_D    = NAME(9)
     IOP1,IOP2 -  two operator"s numbers, which will be used.
     MOD2 = MODEL_2 - see above. / character*1 /
     BOFF:  <0> , 256 corresponds to RESmin=8A, 900 -> 15A
     BADD:  <0>
     FUNC:   - see above. / character*1 /
     GAUSS:
     PERC:    <50> - % of unknown structure_2
     POOL    - real array POOL(IPRTOT)
     IPRTOT  - dimension array POOL.
     ISYM    - integer*2 array for cryst.symmetry operators.
     IPRSYM  - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR    - output signal of error / = 1 -error , = 0 - OK /
 
         output information
 
 
 ============================================
 
* WATPEAKS water's peak search or/and water replacing.
 
   Dialogue and Batch:
 
    FILE_D - input file-DENS /'' '' means without this file, only replacing/
    FILE_C - input-COORD-file /tape name without extention "crd" or '' ''/
    FILE_O - output-COORD-file /tape name without extention "crd"/
    POS:  <Y>,N   Y means to use only positive electron density
    PERC: <100>   % of maxmal value of electron density for storing
                  Higher density will be truncated.
    ROC:  <.25>   only D > ROC*Dmax will be used
    DIST: MIN,MAX H-bond distancies <2.6,4.0>
    NHB:  <0>     minimal number of H-bonds
 
   Parameters of subroutine WATPEAKS:
 
       SUBROUTINE WATPEAKS(MDOC,NAMED,NAMEC,NAMEW
      *    ,POSITIV,PERCENT,ROCRIT,DISTMIN,DISTMAX,NHBMIN,MODE
      *    ,POOL,MEMORY,ISYM,IPRSYM,IERR)
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     POOL    - real array POOL(MEMORY)
     MEMORY  - dimension array POOL.
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
 
 ============================================
 
* readPDB  convert of cooordinates with PDB-format to BLANC-system format.
 
   Dialogue and Batch:
 
     FILE_I  - input PDB file of coordinates, without extention "pdb".
               output file will have the same name with extention "crd".
 
       SUBROUTINE READPDB(MDOC,FILE,ISYM,IPRSYM
      *  ,STR_TITLE,STR_DATE,RESULT,IPRROW,PDB,IERR)
 
   Parameters of subroutine READPDB:
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     FILE   - name of input file without extention "pdb".
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
     output information:  RESULT(IPRROW)
 
       PDB   /character*1/ "Y".
       RESULT(1) - PDB_code
       RESULT(2) - number of atoms
       RESULT(3) - number of water molecules
       RESULT(4) - reported resolution
       RESULT(5) - reported R-FAC
       RESULT(6)-(11) - CELL parameters
 
       RESULT(12)
       RESULT(13)  Space group
       RESULT(14)
 
       RESULT(15) - number of H-atoms
       RESULT(16) - number of chains
       RESULT(17) - NCS , number of NCS  operators.
       RESULT(18) - IGIVEN
       RESULT(19)=NRES_TOT
 
 ============================================
 
* writePDB converts cooordinate file from "BLANC"-system to "PDB";
 
   Dialogue and Batch:
 
     FILE_IN  - input file of coordinates.
     FILE_OUT - output file.
 
   Parameters of subroutine WRITEPDB:
 
       SUBROUTINE WRITEPDB(MDOC,NAME1,NAME2,ISYM,IPRSYM,IERR)
 
 
     MDOC   - mode of writing messages to DOC-file
              0 - only terminal , < - 0 only file, 0 < < 99 - both
              >= 99 - don't write
     NAME1  - name of input file without extention.
     NAME2  - name of output file without extention.
     ISYM   - integer*2 array for cryst.symmetry operators.
     IPRSYM - dimension of integer*2 array ISYM(5,3,IPRSYM),
              number of cryst. symm. operators.
     IERR   - output signal of error / = 1 -error , = 0 - OK /
 
 ========================================================================

 Appendix E.

   Subroutines:

 --- 
 --- -----   SUBROUTINES DEPENDED ON SYSTEM --------------------
 --- 
 ---  OPENDOC -  open file-document iunit=DOC_FILE  =48
 ---  OPENFR  - open formatted file for read /with extentiom and path/
 ---  OPENUR  - open unformatted file for read /with extentiom and path/
 ---  OPENFW  - open formatted file for write /with extentiom and path/
 ---  OPENFW  - open unformatted file for write /with extentiom and path/
 ---  DISPL   - write message to terminal and stop cursor at the end of line.
 ---  GETNOS  - get name of operating system
 ---  GET_PATH - call getenv / get BLANC - path of blanc directory /
 ---  CPU - write CPU information to DOC_FILE or/and terminal,return CPU time.
 ---  CLOCK - get date to --> array IH()
 --- 
 ---  ----   SUBROUTINES INDEPENDED ON SYSTEM --------------------
 --- 
 --- ----- subroutines for all programs  --------------------
 --- 
 ---  RD_INF - read information from inform-file ( UNIT=49)
 ---           and put into common/CRYSTL/
 ---  INFORM - read information from inform-file (old format)( UNIT=49)
 ---           and put into common/CRYSTL/
 ---  START - initialization common/COMLIB/,/CRYSTL/,.., open DOC-file.
 ---  CHECK_BAT - return info about mode / dialogue (0) or batch (1)/.
 ---  CLEAR_DEF - return dialogue mode.
 ---  WRT_BATCH - write message to BATCH-FILE.
 ---  SET_DEFAULT - write info about the defaults, get the defaults and go to
 ---                batch mode.
 ---  ASK - write key_word (input LINE) and get the default (output LINE).
 ---  FINISH - close DOC-file and EXIT.
 ---  CLOSE_DOC - close DOC-file.
 ---  MSGDOC - writes message to terminal or/and DOC_FILE
 ---  MSGERR - writes message about error to terminal or/and DOC_FILE
 --- 
 --- ----- control information in the internal common blocks  ---
 --- 
 ---  SET_CELL - put parameters to common/CRYSTL/
 ---  GET_CELL - get parameters from common/CRYSTL/
 ---  SETLNL   - /old, don't use now /put NAME to --> common/COMLIB/..,LINEL,..
 ---  C_RD_CR  - copy information from common/COMRDF/ to common/CRYSTL/
 ---             also using CELL parameters from common/CRYSTL/ calculates
 ---             reciprocal cell parameters,volume and calc matrix 
 ---             FRTOCR and CRTOFR
 ---  C_CR_WR  - copy information from common/CRYSTL/ to common/COMWRF/
 ---  C_RD_WR  - copy information from common/COMRDF/ to common/COMWRF/
 ---  GET_TITLE  - get information from /COMRDF/
 ---  SET_TITLE  - set information to   /COMWRF/
 ---  SET_WRF    - put N_SpGr, N_SETT, CODE_SpGr, CODE_PDB to common/COMWRF/
 ---                    NAME_PDB, DATE_PDB , TITLE_PDB
 ---  REPCELL  - using CELL parameters from common/CRYSTL/ calc reciprocal
 ---             cell parameters and volume and put its to common/CRYSTL/
 ---             calc matrix FRTOCR and CRTOFR
 ---  DSTARF - calculate reciprocal cell parameters and volume
 ---           old version, now use REPCELL.
 ---  FRORTH - calc transformation to orthogonal angstroms from fractional
 ---           cell FRTOCR and back - CRTOFR
 --- 
 ---  C_CR_AT  - copy information from common/CRYSTL/  to common/CRDINF/
 ---  C_AT_CR  - copy information from common/CRDINF/  to common/CRYSTL/
 ---             also using CELL parameters from common/CRYSTL/ calculates
 ---             reciprocal cell parameters, volume and calc matrix 
 ---             FRTOCR and CRTOFR
 ---  C_CR2_AT - copy information from common/CRYSTL/  to common/CRD2INF/
 ---  C_AT_CR2 - copy information from common/CRD2INF/ to common/CRYSTL/     
 ---             also using CELL parameters from common/CRYSTL/ calculates
 ---             reciprocal cell parameters, volume and calc matrix 
 ---             FRTOCR and CRTOFR
 ---  C_CR3_AT - copy information from common/CRYSTL/  to common/CRD3INF/
 ---  C_AT_CR3 - copy information from common/CRD3INF/ to common/CRYSTL/
 ---             also using CELL parameters from common/CRYSTL/ calculates
 ---             reciprocal cell parameters, volume and calc matrix 
 ---             FRTOCR and CRTOFR
 --- -----  subroutines of rotation matrix  --------------------
 --- 
 ---  EULERM - calc euleran matrix AM[] <-- from euleran angles A,B,G /rad/
 ---  FTPMAT - calc transform matrix AM[] <-- from angles PHI,THETA,PSI/rad/
 ---  MTOANG - calc from rotation matrix AMAT[] --> Eiler angles /degree/
 ---           ALPHA,BETA,GAMMA
 ---  MTOPOL - from rotation matrix TRMAT[] --> polars - THETA PHI CHI /degree
 --- 
 --- ----- useful crystallographical subroutines  --------------------
 --- 
 ---  FTOO   - transform fractional coords X(3) to orthoganal Y(3).
 ---  OTOF   - transform orthogonal coords X(3) to fractional Y(3).
 ---  DSTAR  - give value of (4pi*sin(theta))/lambda for H,K,L
 ---  LIMHKL - using CELL parameters from common/CRYSTL/
 ---           and information about resolution RESMAX defines
 ---           IHMAX,IKMAX,ILMAX - maximal values of indeces and
 ---           NXMIN,NYMIN,NZMIN - minimal grid spasing acceptable
 ---           for calculation structure factors
 ---  SETBADD  - give Badd.
 ---  SET_LIMZ - return limit of Z (IZmax) for given NZ.
 ---  SYSABS   - check systematic absent for h,k,l: 1 - absent, 0 - no.
 ---  SPEC_POS - check spec.position. Return MULT = 1 or 2,3,..(i.e 1,1/2,1/3)
 ---  INIT_CENTR - initialization for subroutine CENTR.
 ---  CENTR  - Determine whether a reflection (IH,IK,IL) is centric (ICENT=1)
 ---           or not (ICENT=0)
 ---  ANOMSC - transforms h,k,l to asymmetrycal part of reciprocal space.
 ---           before used ANOMF - make the firts call :
 ---           CALL ANOMF(MDOC,NSYM,ISYM)
 ---  ASCELL - transforms:  XI,YI,ZI  /in frac. units/
 ---           to asymmetric part of cell -->  XO,YO,ZO,
 ---  ASYM   - convert indeces to asymm. part reciprocal space
 ---  INDGEN - generates symmetry related indeces:
 ---  GEE    - calc structure factor of scattering from Sphere
 --- 
 --- ----- others useful subroutines  --------------------
 --- 
 ---  CHKSMB  - check symbol.
 ---  PACK    - pack indices h,k,l --> IND
 ---  UNPACK  - unpack IND --> indices h,k,l
 ---  HSRD    - gives A - random variable / -0.5 =< A =< 0.5 /
 ---  CHCLOCK - converts clock and data to characters string /LINE*20/
 ---  LENSTR  - gives length of string.
 --- 
 --- ----- vector-matrix subroutines --------------------
 --- 
 ---  VMOD   - D=!X!  X(3) - vector
 ---  VUNIT  -  Y=X/!X!    if !X!=0 then Y=(1,0,0) and IERR=1
 ---  VSCALE - Y=S*X  S - coefficient
 ---  VADD   - Z=X+Y
 ---  VSUB   - Z=X-Y
 ---  VPROD  - S = (X.Y)  S=X(1)*Y(1)+X(2)*Y(2)+X(3)*Y(3)
 ---  VCOPY  - Y <= X
 ---  VMULT  - Z = X*Y
 ---  MCOPY  - [Y] <= [X]
 ---  MATMLT - [Z] =[X] [Y]
 ---  MVMULT -  Y =[AM] X
 ---  MTRANS - matrix transposition
 ---  INVERT - invertion matrix S(3,3) , result marix SS(3,3)
 --- 
 --- ----- read/write subroutines  --------------------
 --- 
 ---  ORCRD  - 1. open file for read.
 ---           2. reads title of file to common/CRDINF/
 ---  OWCRD  - 1. open file for write.
 ---           2. writes title from common/CRDINF/ to file
 ---  RD_TTL_CRD - reads title of file to common/CRDINF/
 ---  WR_TTL_CRD - writes title from common/CRDINF/,/CRDATM/ to file
 ---  RDCRD - reads coordinates to common/CRDATM/
 ---  RDCRD - reads coordinates to common/CRDATM/
 ---  WRCRD - writes coordinates from common/CRDATM/ to file.
 ---  ORCRD2 - OPEN OF FILE-CRD-2 FOR READ
 ---  OWCRD2 - OPEN OF FILE-CRD-2 FOR WRITE
 ---  RD2_TTL_CRD - reads title of file to common/CRD2INF/
 ---  WR2_TTL_CRD - writes title from common/CRD2INF/,/CRD2ATM/ to file
 ---  RDCRD - reads coordinates to common/CRD2ATM/
 ---  RDCRD2 - reads coordinates to common/CRD2ATM/
 ---  WRCRD2 - writes coordinates from common/CRD2ATM/ to file.
 ---  ORCRD3 - OPEN OF FILE-CRD-3 FOR READ
 ---  RD3_TTL_CRD - reads title of file to common/CRD3INF/
 ---  RDCRD3 - reads coordinates to common/CRD3ATM/
 ---  WBLOCK - writes (unformatted) data block to file
 ---  RBLOCK - reads (unformatted) data block from file
 ---  ORFILE - 1.open file.
 ---           2.reads title of file and copy file_parameters to /COMRDF/.
 ---  OPFILE - 1.don't open file, rewind file 
 ---           2.reads title of file and copy file_parameters to /COMRDF/.
 ---  OWFILE - 1.open file.  
 ---           2.writes title to file from common /COMWRF/
 ---  RD     - read from file; type of file :"F   ","PH  ","COEF","ALMN"
 ---  RRD    - read from file; type of file :"FS  "
 ---  RD1    - read from file; type of file :"F   ","PH  ","COEF","ALMN"
 ---  RRD1   - read from file; type of file :"FS  "
 ---  RD2    - read from file; type of file :"F   ","PH  ","COEF","ALMN"
 ---  RRD2   - read from file; type of file :"FS  "
 ---  RD3    - read from file; type of file :"F   ","PH  ","COEF","ALMN"
 ---  RRD3   - read from file; type of file :"FS  "
 ---  RD4    - read from file; type of file :"F   ","PH  ","COEF","ALMN"
 ---  RRD4   - read from file; type of file :"FS  "
 ---  RABCD  - read from file; type of file :"ABCD"
 ---  RABCD1 - read from file; type of file :"ABCD"
 ---  WRT    - write to file; type of file :"F   ","PH  ","COEF","ALMN"
 ---  WWRT   - write to file; type of file :"FS  "
 ---  WRT1   - write to file; type of file :"F   ","PH  ","COEF","ALMN"
 ---  WWRT1  - write to file; type of file :"FS  "
 ---  WABCD  - write to file; type of file :"ABCD"
 ---  WABCD1 - write to file; type of file :"ABCD"
 ---  BYTARR - reads electron-dens-file into byte-array IR
 ---  GETDNS - get DENS from array IR-"byte"
 ---  ENTRY SETDEN - set DENS from array IR-"byte"
 ---  RDENS - reads file-dens to --> array POOL (real)
 ---  IRDENS - reads of file-dens --> array IPOOL /integer*2/
 ---  RDENS2 - reads file-dens to --> array POOL (real)
 ---  IRDNS2 - reads of file-dens --> array IPOOL /integer*2/
 ---  WDENS - writes next plan(x,y)
 --- 
 --- ----- sort subroutines  --------------------
 --- 
 ---  I2SORT1 - sorts array A(integer*4) with aray TAG(integer*2)
 ---  ISORT1 - sorts array A(integer*4) with aray TAG(real or integer*4)
 ---  ISORT0 - sorts array A (integer*4)
 ---  ISORT3 - sort array A(integer*4) with aray TAG,TAG1,TAG2
 ---  ISORT2 - sort array A (integer*4) with aray TAG,TAG1
 ---  SORT1 - sort array A (real) with aray TAG
 ---  SORT0 - sort array A (real)
 ---  SORT3 - sort array A (real) with aray TAG,TAG1,TAG2
 ---  SORT2 - sort array A (real) with aray TAG,TAG1
 --- 
 ---  ------------ FFT ----------------------
 --- 
 ---  MDHFT  -
 ---  MDCFT2 -
 --- 
 --- ----- others useful subroutines  --------------------
 --- 
 ---  GET_SYMM - generate cryst.symm. oparators from space group name or space
 ---             group number.
 ---  GET_NSYMZ - computes symmetry Z-axis in Patterson
 ---  CHECK_REF check possibility to refine coords: for x IFX = 1 - yes, 0 - no
 ---  CHECK_LINE - check and convert symbols of line.
 ---  GETLINE - reads one record of file to string STR (80 chars maximum).
 ---  GETCIF - reads the records from file and get information from records
 ---           by CIF_style.
 ---  GETCIF_CRD - reads the records from file and get information from record
 ---           by CIF_style.
 ---  FRD_PARM_CIF - free format reading of the string of characters.
 ---  GETCIF_2CRD - reads the records from file and get information from recor
 ---           by CIF_style.
 ---  FRD_PARM_2CIF - free format reading of the string of characters.
 ---  GETCIF_3CRD - reads the records from file and get information from recor
 ---           by CIF_style.
 ---  FRD_PARM_3CIF - free format reading of the string of characters.
 ---  FRD_PARM - free format reading of the string of characters.
 ---  FRD_PARM - free format reading of the string of characters.
 ---  WTODIG   - convert string to integer and real.
 ---  CHTOINT  - convert a character to integer
 ---  CLEAR_STR - put blancs to the string.
 ---  WRTSTR  - writes a string to file. /max 80 chars/
 ---  GET_SFA - gets atomic scatt.factor coefficients for atomic type.

 ======================================================

 Appendix F.

  ----  TRANSLATION FOR VAX ---

   Use editor for replacing  "CVX" --> "   "

   $F LIBUTILS.FOR
   $LIB/CREATE LIBUTILS LIBUTILS

   $F PRINTD.FOR
   $LINK PRINTD,LIBUTILS/L

  ---  TRANSLATION FOR MS-DOS ---

   Use editor for replacing 1. "CMS$" --> "$"
                            2. "CMS"  --> "   " 
   fl /c /Gt libutils.for  
   fl /c /Gt libutil1.for  
   fl /c /Gt libutil2.for
   lib libutils+libutil1+libutil2 libutils  

   fl /c /Gt printd.for
   link printd,,,libutils,,

  ---  TRANSLATION FOR NDP-FORTRAN-386 ---

   prelib  
   sh batchl
   ar -r libutils.a *.o  

   #doscp A:/ftn1/printd.ftn /usr/ndpblnc/for/printd.f
                or
             program  "prefor"
 
   Use editor for replacing  "CDP" --> "   "

  mf77 -o printd printd.f -lutilsC             or
  mf77 -o printd printd.f /usr/ndpblnc/lib/libutils.a 

 ==================================================================
