BLANC - program suite for macromolecular crystallography

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. 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.


CONTENTS


References

   Authors:      A.A.Vagin, G.N.Murshudov, B.V.Strokopytov
                email: alexei@ysbl.york.ac.uk

   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

   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

Installation

Copy file blanc.tar.gz

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, start, sfcheck, molrep, makecif, contact, mir directories and file README

Compilation.

1. go to directory: blanc/start
2. setenv BLANC_FORT
define compiler with options,for example:
for linux and mac:
setenv BLANC_FORT "f77 -fno-globals -fno-automatic -O1 -w"
for linux intel compiler:
setenv BLANC_FORT "ifort -static -O1"
for mac ibm compiler:
setenv BLANC_FORT " xlf -qextname -qarch=auto -qtune=auto -qstrict -O3"
else
setenv BLANC_FORT "f77 -O1"
3. csh setup.unx

All executable files will finish up in the exe directory. CCP4 version of some programs will be prepared automaticly if ccp4 is installed. For details look at BLANC manual in the file: blanc/doc/blanc_descr.txt Also useful program BLANC_HELP which gives list of blanc's programs with short description.

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.

Basic concept

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.

Most of BLANC programs do not require large memory. All BLANC programs are written in standard FORTRAN codes and can be running at least by VMS VAX, UNIX.

Original features

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.

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

List of 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 
      BLANC_HELP            gives list of blanc's programs with short description.
      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
      BLANC2MTZ             creates new MTZ file with Fobs, Fcalc and Phases
      PEAKSRCH              performs map peak search
      PHABCD                calculates Henderickson-Lattman coefficients
                            for calculated  phases using observed and
                            calculated amplitudes
      SFVSUM                sum two vectors of structure factors:
                            (F1 + scale*F2) or convolution: F1(h)*scale*F2(-h)
      SURFACE               calculates solvent accessible surface area
      RANDCRD               introduces a random errors to coordinates. 
      RANDF                 introduces a random errors to !F! 
      TWIN                  perfect and partial hemihedral twinning test,
                            can create output file with detwined data.  
      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

List of super-programs

       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       restrain maker.
                     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      restrain checker.
                     reads CIFiles of coordinates and restraints,
                     gives information about restraints (to DOC_file),
                     writes PDB_file or/and CIFile of coordinates.

       LIBCHECK      PDB/CIFiles, library manager.
                     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.

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.

Three levels of programming

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.

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.

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" .
              !             
              !
              +-- lib       libraries:  "libutils.ftn"( -->"libutils.a")
              !                         "libsubr.ftn" ( -->"libsubr.a") 
              !                         "bl_graph.f"  graphics subroutines  
              !                       
              !               
              +-- dic       "bank.frm"    - for program "fragsrch"
              !             
              !
              +-- start      "presubr.f"
              !              "prelib.f"
              !              "setup.unx"  
              !              "compl.bat" batch_file for compilation all 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
                             "ccp42dns" - converts CCP4 density map to BLANC map
                             "dns2ccp4" - writes a contents of BLANC files to MTZ file
                             

       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  -   blanc/sfcheck/README
       MOLREP   -   blanc/molrep/README
       CONTACT  -   blanc/contact/README

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


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

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/

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.

1. There is common block for general structure description: /CRYSTL/
   with cell parameters, space group definition, matrix to convert
   fract. coordinetes to orthogonal and vice versa (FRTOCR,CRTOFR)

   Some subroutines to control the content common block /CRYSTL/:      

     SET_CELL - put parameters to common/CRYSTL/,
               calc reciprocal cell parameters,volume and calc matrix 
               FRTOCR and CRTOFR

     GET_CELL - get parameters from common/CRYSTL/
 

     REPCELL -  using CELL parameters from common/CRYSTL/ calc reciprocal
                cell parameters,volume and calc matrix FRTOCR and CRTOFR





2. Subroutines to read/write files of F, phases, ABCD, Almn coefficients.

   This subroutines uses common blocks /COMRDF/ and /COMWRF/   
   for read/write title of file.

   Some subroutines to control the content this common block:      

   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

   read/write subroutines:


   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"




3. Subroutines to read/write density file:

   Subroutines to read open file and use common block /COMRDF/ to keep
   title

    RDENS  - reads density file, put current section of map to real array. 
    RDENS2 - reads density file, put current section of map to real array. 
    IRDENS - reads density file, put current section of map to integer array. 
    IRDNS2 - reads density file, put current section of map to integer array. 

   Subroutine to write does not open file and you have to control content
   of common block/COMWRF/ ( subroutines C_CR_WR,SET_TITLE) and to use  
   subroutine: OWFILE before.

    WDENS  - write current section of map to file 



4. Subroutines to read/write coordinate files:

   This subroutines uses common blocks: /CRDINF/,/CRD2INF/,/CRD3INF/,
   /CRDATM/,/CRD2ATM/,/CRD3ATM/ for read/write title of file and coordinates.

   Some subroutines to control the content this common blocks:      

   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

    read/write subroutines:


    ORCRD  - 1. open file for read.
             2. reads title of file to common/CRDINF/
    RDCRD  - reads coordinates to common/CRDATM/

    ORCRD2 - 1. open file for read.
             2. reads title of file to common/CRD2INF/
    RDCRD2 - reads coordinates to common/CRD2ATM/

    ORCRD3 - 1. open file for read.
             2. reads title of file to common/CRD3INF/
    RDCRD3 - reads coordinates to common/CRD3ATM/

    OWCRD  - 1. open file for write.
             2. writes title from common/CRDINF/ to file
    WRCRD  - writes coordinates from common/CRDATM/ to file.

    OWCRD2 - 1. open file for write.
             2. writes title from common/CRD2INF/ to file
    WRCRD2 - writes coordinates from common/CRD2ATM/ to file.



5. 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.

   Programs use include files from "blanc/for" directory:

     nsym-max.fh
     atom-com.fh

Connection with CCP4

    There are four programs: 

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

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

        3) BLANC2MTZ writes a contents of internal BLANC files: 
           Fobs, Fcalc, Phases to new MTZ file.

        4) CCP42DNS convert CCP4 density map to BLANC density map

    You can find these programs in directory: blanc/ccp4

    For compilation 
 
       1.define compiler setenv BLANC_FORT ...
       2. give command: ccp4.setup

Memory control

       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.