NAME
     mardigras (Matrix Analysis of Relaxation for DIscerning  the
     Geometry of an Aqueous Structure)

SYNOPSIS
     mardigras [file.PARM]

DESCRIPTION
     mardigras is a FORTRAN program for calculating proton-proton
     distances and error bounds from cross-peak intensities meas-
     ured from a 2D or 3D NOESY (ROESY) spectrum. MARDIGRAS algo-
     rithm converts the intensity matrix (non-observable intensi-
     ties are supplied from a model) to a relaxation rate matrix,
     which  is  improved by an iterative procedure. Distances are
     then calculated from the final cross relaxation  rates.  The
     error  bounds  are  estimated  by  adding noise and relative
     errors to the intensities converted  from  the  final  rates
     assuming a two-spin approximation.

     mardigras provides a more logical way to determine the  dis-
     tance error bounds used as the input to restrained molecular
     dynamics and distance geometry programs: the standard devia-
     tions  of  the  distances obtained from N MARDIGRAS calcula-
     tions using intensities that are modified  by  adding  simu-
     lated random noise and relative errors to the original input
     intensities.  This procedure has also been termed the  RAND-
     MARDI approach.

     The molecular motions which affect the relaxation rates  are
     described  as either isotropic, local (scaled using the tem-
     perature factors), or model-free.   Local  motions  such  as
     methyl  rotation  and  ring  flipping  are modeled as N site
     jumps.  Chemical exchange of the  exchangeable  protons  are
     taken  into account by adding an exchange rate matrix to the
     relaxation rate matrix.

     "Preprocessing" is required to convert homo or heteronuclear
     3D  NOESY  data into 2D intensities before they are input to
     mardigras. The program 3Dcorma  provides  a  procedure  that
     deconvolutes  the input homonuclear 3D data into two sets of
     asymmetric 2D data for the two  mixing  periods.  Using  the
     program symm, the asymmetric data can be converted to inten-
     sities that are equivalent to 2D NOESY intensities  for  the
     two  mixing  times.  Partially relaxed NOESY intensities may
     also be corrected using symm to obtain fully relaxed  inten-
     sities.


FILES
     mardigras uses some of the  following  files,  described  in
     detail later:
               INPUT:
                 file.PARM
                 pdbfile
                 intensity file
                 constrain.dat
                 chemical shift file (ROESY)
                 J-coupling constant file (ROESY)
                 exchange rate file (chemical exchange)
                 order parameter file (model free)
                 distance file (optional)
               OUTPUT:
                 prefix.BNDS or prefix.bnds
                 prefix.DSTXX or prefix.dstxx
                 prefix.CNSTRNT
                 prefix.DSTREJ
                 prefix.BNDSREJ
                 prefix.OUT
                 prefix.ERRORS
                 prefix.ROEFCTR (ROESY)

     NOTE: The input and output file names should not  exceed  20
     characters.

PARAMETER INPUT
     mardigras reads  input  parameters  from  a  parameter  file
     file.PARM. If the default name INP.PARM is used and the file
     is present in  your  working  directory,  mardigras  can  be
     invoked by:

       mardigras

     otherwise the file name needs to be specified:

       mardigras file.PARM

     If the command line arguments are not allowed on  your  sys-
     tem, then the default input file name INP.PARM must be used.

     file.PARM contains the parameters  necessary  for  mardigras
     calculations.  The  parameter  follows  the keyword which is
     always in upper case. Some of the  parameters  are  required
     and   some  are  optional.   Comments  can  be  included  in
     file.PARM as long as they do not begin with the keywords (it
     is  recommended that comments be in lower case). The parame-
     ter lines and comment lines can appear in any order.  mardi-
     gras reads only the first 100 lines in file.PARM.

     The following keywords (upper case) and parameters  (italic)
     are required for all mardigras calculations:

       PDB FILE pdbfile
         Input pdb file prepared by corma.in  (see  more  details
         under pdbfile).

       INT FILE file.INT.1
         Input intensity file (will be described in detail later)
         must  take  the form prefix.INT.n and must not exceed 20
         characters.

       OUT FILE junk
         Prefix for the output files is specified here.

     The following line is required if the model-free  option  is
     used when preparing the pdbfile using corma.in:

       ORD FILE file.order
         The order parameters required by the model-free calcula-
         tion  are  contained  in  a file with arbitrary name (in
         this example file.order). Default value  for  the  order
         parameters is 1.0 (which can be specified or modified in
         the order parameter file). Only those differing from the
         default value need to be included in the order parameter
         file.

     The following lines are required for  calculating  distances
     from ROESY intensities:

       ROESY
         The keyword ROESY is necessary to invoke ROESY  calcula-
         tions.

       PPM FILE file.ppm
         Chemical shifts in ppm are required for the  calculation
         of the offset dependence of the transverse relaxation in
         the rotating frame. The assignment need not to  be  com-
         plete.  Default value for unassigned protons is the car-
         rier frequency.

       JCP FILE file.jc
         J-coupling constants are required for HOHAHA  correction
         of  ROESY  intensities.  It is not necessary to know all
         the J-coupling  constants.  Only  strong  couplings  are
         important. As an option, a program jcoup is available to
         calculate the J coupling constants from a pdbfile or  an
         ensemble of pdbfiles.

       CARRIER FREQUENCY 5.12
         Carrier frequency is in ppm.

       SPIN-LOCK FIELD 45.4545
         Spin lock field strength is defined in terms of the  90-
         degree   pulse   width   t90  and  is  in  microseconds:
         t90=1.0e6/(4.0*B1), where B1  is  the  spin  lock  field
         strength in Hz.

     The following  lines  are  optional  and,  if  missing  from
     file.PARM,  default parameters (which may not be appropriate
     in some situations) will be assumed:

       FREQUENCY 600.0
         Spectrometer frequency is in MHz,  and  the  default  is
         500.0 MHz

       RANDMARDI 50
         The RANDMARDI procedure is invoked by the keyword  RAND-
         MARDI. If a number N (for example 50) follows, the input
         intensities will be randomly  modified  n-1  times  (the
         original  input intensities without any modification are
         used as the first set of  data)  within  the  limits  of
         input  noise  level  and  relative errors, and N sets of
         distances will be calculated. If the number is  missing,
         N=30 will be assumed. If N=1, the distances will be cal-
         culated one time without modifying  the  input  intensi-
         ties.  The  keyword  RANDMARDI  also invokes a different
         output format from the regular mardigras.  If  RANDMARDI
         is   missing,   the  regular  mardigras  calculation  is
         assumed, which is equivalent to RANDMARDI  of  N=1,  but
         with the original output format (see OUTPUT FILES).

         An estimate of experimental noise level specified by the
         keyword  NOISE  is taken as an absolute error in experi-
         mental intensities. The relative  intensity  errors  are
         included  in the file.INT.1 file described later. mardi-
         gras calculates error bounds for  distances  using  both
         absolute and relative input intensity errors.

       MINITN 3
         MINITN is the minimum number  of  mardigras  iterations,
         which improves the relaxation rate matrix calculated for
         a set of input intensities. The default is 2.

       MAXITN 8
         MAXITN is the maximum number  of  mardigras  iterations,
         the default is 10.

       DELTA6D 0.0001
         DELTA6D is the minimum value of the shift in  the  sixth
         root R factor between experimental and calculated inten-
         sities. mardigras iteration stops after  either  DELTA6D
         or  R6THD  (described  next) is reached.  The default is
         0.0005.

       R6THD 0.0001
         R6THD is the minimum value of the sixth root  R  factor,
         the default is 0.0005.

       METHYL JUMP 2
         The  following  options  are  available  for  intra-  or
         interresidue methyl interactions (default is 3):
          [1] 3-site for intra-residue, 18-site for inter-residue
          [2] 18-site for all methyl relaxation
          [3] 3-site for all methyl relaxation
         A 3-site jump model is more realistic for hindered rota-
         tion,  and an 18-site jump model is an approximation for
         free rotation.  Methyl-methyl relaxation is modeled with
         an n-squared-site jump model.

       EXCHANGE RATE FILE file.exch
         The exchange rate file is optional. It may  contain  the
         kinetic exchange rates which need to be converted to the
         elements of the exchange rate matrix in the program,  or
         it may contain directly the exchange matrix elements (or
         any arbitrary elements, such as the leakage  terms,  the
         user  wishes  to  add  to the relaxation matrix, such as
         additional direct relaxation contributions).

       ARBITRARY
         This keyword indicates that the exchange  file  contains
         non-zero  elements  of  the exchange rate matrix (or any
         arbitrary elements), and will be read  as  is  from  the
         exchange file and is not modified in any manner.  Other-
         wise (this is the default), the file  contains  exchange
         rates  and will be converted to exchange matrix elements
         (See INPUT FILE section).

       DST FILE file.dst
         contains distances that are known and should be fixed in
         the  mardigras  calculation.  These input distances will
         overwrite the distances calculated from the pdbfile.

     There are three options for  entering  the  noise  level  in
     file.PARM.  The noise (and optionally the relative errors of
     the intensities) is used to  determine  the  distance  error
     bounds  by  regular or RANDMARDI mardigras calculations.  If
     NOISE is omitted, the noise is zero.  The  appropriate  key-
     words must precede the noise level estimate.  Here are exam-
     ples of the input for each option:

       NOISE ABSOLUTE NORMALIZED 0.0025

         The keyword ABSOLUTE indicates  that  the  noise  is  an
         absolute, and not a relative quantity.  The keyword NOR-
         MALIZED means that this value  has  been  normalized  so
         that  the  2D  NOE intensity of a diagonal peak extrapo-
         lated to mixing time 0 is equal  to  1.0.   So  in  this
         case,  the noise was estimated to be 0.25% of the diago-
         nal peak intensity at mixing time 0.

       NOISE ABSOLUTE UNNORMALIZED 11000.

         The keyword UNNORMALIZED means that the value is in  the
         same  units as the input experimental intensities.  This
         value, then, will depend on the integration routine used
         to  calculate  peak  volumes.  This is probably the most
         useful option, since one can get at least  a  reasonable
         estimate  of  the spectral noise level by looking at the
         size of the smallest observable cross-peak.   The  noise
         level is some fraction of this smallest peak intensity.

       NOISE RELATIVE PERCENT 1.0

         The keyword RELATIVE means that the noise should be con-
         sidered  as  a  constant  percentage  of  the cross-peak
         intensity.  That is, the error in a given cross-peak  is
         proportional  to its magnitude.  This is rarely applica-
         ble.

     There are three options of how  mardigras  should  normalize
     the  input  experimental  intensities relative to the calcu-
     lated absolute values:

       NORMALIZE ALL
         The keyword NORMALIZE means that the experimental inten-
         sities  need  to  be  normalized.  The keyword ALL means
         that the normalization factor should  be  computed  from
         the sums over all cross-peaks which have observed exper-
         imental intensities as follows:
                            |
                 ____Icalc__|
          fnorm12 = |   ij  |2
                    |S Iexpt|
         This is the|recommended option when the  starting  model
         is reasonably good.

       NORMALIZE FIXED
         The keyword FIXED tells mardigras to perform the normal-
         ization  summation only over those experimental intensi-
         ties  which  correspond  to   fixed   distances,   e.g.,
         methylene proton distances and aromatic ring proton dis-
         tances, which are  listed  in  constrain.dat  file  (see
         INPUT FILES). This option is recommended when the start-
         ing model is very poor, e.g., an extended  chain  struc-
         ture of a protein.

       NORMALIZE NON-COUPLED
         The keyword NON-COUPLED indicates that the summation  is
         over  all  intensities  that  do  not  involve strong J-
         coupling.  This option is for ROESY intensities, and the
         J-coupling constant file is required.

         If the normalization has already  been  carried  out  by

         omitted. Intensities should be normalized to be a  frac-
         tion of the diagonal peak intensity (of a single proton)
         at mixing time 0.


INPUT FILES
  pdbfile
     pdbfile is a modified PDB  (Protein  Data  Bank)  coordinate
     file  and  is  prepared by using corma.in. (See corma.in man
     pages.) A HEADER card should go in line 1  to  describe  the
     source  of the coordinates.  This file must also contain the
     keyword ISOTROPIC, LOCAL or MODELFREE on line two (2) in the
     format:

     REMARK CORRELATION TIME: ISOTROPIC

     ISOTROPIC assumes a single effective  isotropic  correlation
     time TAUc for all interactions.  TAUc for the H-H vectors is
     defined as

          1/TAUc=1/TDIFF(i)+1/TDIFF(j)

     where TDIFF(i) and TDIFF(j) is "atomic diffusion  time"  for
     proton  i  and  j  respectively.  For ISOTROPIC, all protons
     should have the same TDIFF.

     LOCAL assumes that  each  interaction  can  be  assigned  an
     effective  isotropic  correlation time that is a function of
     the local motion or diffusion time (TDIFF) determined by the
     average  temperature  factor  for  each residue. The program
     corma.in will read a PDB file that contains temperature fac-
     tors and calculate an appropriate TDIFF value for each resi-
     due.

     MODELFREE assumes  the  model-free  approach  for  molecular
     motions  (Ref.:  Lipari,  G. and Szabo, A. J. Am. Chem. Soc.
     104, 4546, 4559 (1982)). The appropriate parameters will  be
     generated by corma.in.

     The atomic coordinates are entered in PDB  format  beginning
     on line 3.  There is no need to eliminate non-hydrogen atoms
     from the PDB file, the program can handle stripped  or  full
     coordinate  sets.   All  atoms  starting with "H" or a digit
     followed by "H" are assumed to be protons.

     All METHYL PROTONS are labeled  in  the  order  Hxy1,  Hxy2,
     Hxy3,  or  1Hxy,  2Hxy, 3Hxy, and must be placed in the same
     order in the PDB file. IF MORE THAN ONE METHYL GROUP APPEARS
     IN  A RESIDUE, THEIR NAMES MUST BE DISTINCT. Protons forming
     other pseudo-protons such as  unresolved  methylene  geminal
     protons and symmetric ring protons follow the same rules.

     acids  as  long as they follow the name of the atom to which
     they are bonded. Other types of pseudoprotons defined in the
     input  intensity file are recognized by following the naming
     convention for pseudo-protons described later.

     The OCCUPANCY factor, the first field after the coordinates,
     is  used  to turn protons "on" or "off" for the case of deu-
     teration or alternate conformations (enter a value  of  1.00
     or  0.00).  To  specify  fractional  occupancy, use a number
     between 0.0 and 1.0. This may be appropriate,  for  example,
     in the case of partial amide exchange for a deuteron.

     The atomic diffusion times (TDIFF; in  nanoseconds)  substi-
     tutes  the  last field which usually contains the crystallo-
     graphic B factors in a PDB file.

     For ISOTROPIC, TDIFF should be the same for all protons, but
     the  program allows the user to to specify different overall
     correlation times for different parts of the  molecule  when
     it  is  felt  to  be appropriate. It has been suggested, for
     example, that base-moiety protons in DNA  may  have  a  dif-
     ferent effective correlation time than sugar protons.

     For LOCAL, the TDIFF value of the first H atom in each resi-
     due  is  used in calculating the correlation times involving
     all the protons in that residue.

     For MODELFREE, the last four columns are tau1, tau2/tau1, A,
     and  taue  for  each  H  atom,  where  tau1 and tau2 are the
     overall correlation times (they would be equal for a spheri-
     cally  symmetric molecule, but may differ if the molecule is
     elongated), A is  anisotropy  parameter,  and  taue  is  the
     internal motion correlation time.



  file.INT.1
     file.INT.1  is an experimental intensity file in the format:

     line #
     1    HEADER Whatever you like can go here.
     2    REMARK Whatever you like can go here.
     3    MIXING TIME: 0.275  (sec.)
     4    ATOM1   ATOM2   INTENSITY
     5    HB2  11 HG1  32   0.020
     6    (etc.)
       or
     1    HEADER Whatever you like can go here.
     2    REMARK Whatever you like can go here.
     3    MIXING TIME: 0.275  (sec.)
     4    ATOM1    ATOM2    INTENSITY   ERROR%   NORM

     6    (etc.)


     More than one line is allowed for REMARK, HEADER or  MIXING,
     but  the  total  (not  include ATOM line) must not exceed 6.
     Only one line should begin with ATOM,  and  this  line  must
     immediately precede the data.

     The   format   for   atom   names   is    strictly    fixed:
          (a4,i3,x,a4,i3)

     The  protons  are  identified  by  atom  names  and  residue
     numbers.   Atom  names  are  up  to 4 characters and residue
     numbers should be smaller than 999. The atom  pairs  for  an
     intensity is separated by a space.

     The intensity column and optional relative  intensity  error
     and normalization flag columns are in free format. The error
     column is used in RANDMARDI procedure and the calculation of
     distance  error bounds. The normalization flag takes integer
     the 0 or 1. Zero indicates the  corresponding  intensity  is
     not  used  for intensity normalization.  NOTE: THE ERROR AND
     NORMALIZATION FLAG COLUMNS  ARE  OPTIONAL.  IF  THE  KEYWORD
     ERROR OR NORM IS IN THE LINE BEGINING WITH ATOM, THE PROGRAM
     EXPECTS DATA IN THE COLUMN.

     Unresolved peaks may be entered in the  experimental  inten-
     sity file, but they must be assigned to a pair or a group of
     cross-peak intensities.  This can be done in two ways:

     1) For methyl, methylene  and  symmetry-equivalent  aromatic
     ring  protons, the unresolved peaks may be entered simply by
     referring to the group by a general name.  The general names
     are as follows

     For methyls, use the character "M":
     HD11, HD12, HD13 of LEU  ---->  MD1 of LEU

     For methylenes, use the character "Q":
     HB1, HB2 of LYS  ---->  QB of LYS

     For amino proton pairs, also use the character "Q":
     HN21, HN22 of GUA  ---->  QN2 of GUA

     For ring protons, use the character "R":
     HD1, HD2 of PHE  ---->  RD of PHE

     Note, for methyls in residues other  than  'standard  amino-
     acid'  and  THY,  the  nomenclature of methyl protons in pdb
     file has to start with "HM" instead  of  "H".  For  the  two
     unresolved  geminal  protons,  for example, HB1 and HB2, the


     Other problems can arise if a  methyl  is  expected  by  the
     built-in  naming rules and only one or two protons are actu-
     ally found in the pdb file, e.g. the structure is a high  pH
     structure  and  side-chain  amines are not protonated.  This
     will result in unpredictable results.

     2) 'UNRESOLVED' intensities (see man pages  for  corma)  are
     read but not used by mardigras.


  constrain.dat
     constrain.dat (the name is  strictly  fixed)  defines  fixed
     distances  in the spin system. If a pair of protons from the
     pdbfile or input intensity file matches the atom and residue
     names  in  the constrain.dat file, the pair is considered as
     having a fixed distance.  A list is then made  for  all  the
     fixed  distances in the system.  The distance values appear-
     ing in  constrain.dat  are  not  used  in  the  calculation;
     instead,  the  corresponding  distances  calculated from the
     pdbfile are used.  The list of  fixed  distances  plays  two
     roles in the calculation: defining fixed distances for fixed
     distance normalization, and  defining  constraints  for  for
     mardigras iteration procedure.

     constrain.dat contains fixed distances for standard  nucleo-
     tides  and  amino  acids  with conventional atom names.  The
     user must modify the file for non-standard residues or  non-
     conventional  nomenclature,  following  the  correct format.
     For example, there is one fixed  distance  in  CYS  (residue
     name is up to three characters). If we wish to include three
     possible nomenclatures, the constrain.dat file  should  have
     the following lines:

     CYS   3
     1HB    2HB         1.772
     HB1    HB2         1.772
     QB     QB          1.772
     The first line indicates that there are three possible fixed
     distances  (or one fixed distance with three possible names)
     in residue CYS. The following three lines  define  the  atom
     names for the fixed distances.


  chemical shift file
     Chemical shift file has the same format as PDB file for  the
     first  5  columns  (record  type,  atom numbers, atom names,
     residue names and residue numbers). The 6th  column  is  the
     chemical  shift  in  ppm.   In  the case that chemical shift
     assignment is incomplete, the unassigned  proton  resonances
     by default take the value of carrier frequency.

     J-couplings are in Hz. The file has the same format  as  the
     input intensity file, i.e.,
     (a4,i3,x,a4,i3) for the atom names and free format  for  the
     data  column.   It is found that only the strong scalar cou-
     plings are important in HOHAHA corrections. As an option,  a
     program  named  jcoup  is provided for simulating J coupling
     constants from a pdbfile or an  ensemble  of  pdbfiles.  For
     more details, see man pages for jcoup.


  exchange file
     The program handles two type of exchanges. The exchange with
     H2O  solvent  is  described  by  the  diagonal matrix K with
     K(i,i)=k, where k is the exchange rate  of  proton  i.   The
     exchange  between two protons is described by matrix K' with
     K'(i,j)=-k' and k'(i,i)=K'(j,j)=k' where k' is the  exchange
     rate  between  proton  i and j. The total exchange matrix is
     K"=K+K'.  The relaxation matrix R is modified by R'=R+K".

     The exchange file contains  atom  names  in  (a4,i3,x,a4,i3)
     format  and a column of data that can be either the exchange
     rate k (ATOM1 and ATOM2 are the  same)  and  k'  (ATOM1  and
     ATOM2 are different), or the elements of the exchange matrix
     K". If ARBITRARY is not present in file.PARM, the input data
     are  exchange rates and will be converted to the matrix ele-
     ments in the program.  Otherwise if  ARBITRARY  is  present,
     the exchange matrix is read as is from the exchange file and
     is not modified in any manner.


  order parameter file
     Order parameters are also  defined  for  proton  pairs.  The
     order parameter file has the same format as the intensity or
     exchange rate file. A default order parameter  is  used  for
     proton pairs which do not have an input order parameter. The
     default value is 1.0, but it can be modified at  the  begin-
     ning  of the order parameter file by including the following
     line before the data (for example):
     DEFAULT ORDER PARAMETER S^2 = 0.8
     The file may then contain only  order  parameters  that  are
     different from the default.


  distance file
     Distances which are determined previously  can  be  used  as
     input  constraints  for  mardigras  calculations, i.e, these
     distances are fixed in  the  iterations.  The  corresponding
     intensity  (if  there  is  one)  should  be removed from the
     intensity file, otherwise the input distance is  changed  to
     fit  the  intensity  in the iterations. distance file serves
     different purpose from constrain.dat. It provides additional

     iterations, but does not alter the fixed-distance  list  for
     normalization      using     fixed-distance     intensities.
     distance.file has the same format  for  the  atom  names  as
     file.INT.1, with free format for the distance column.


OUTPUT FILES
   If RANDMARDI is not applied, the program  creates  one  output
   file for each iteration cycle, plus five other files:

  prefix.DSTXX
     prints out all distances calculated for iteration cycle  XX.
     It  prints  out  experimental and calculated intensities for
     comparison, as well as a comparison of model  and  mardigras
     distances.   Because  it is fairly time-consuming, iterative
     distance fits for methyl  and  other  pseudoatom  distances,
     which are defined to the geometric center of the protons are
     only calculated for the final cycle, and reported  distances
     for  earlier  cycles  are simple isotropic-motion-only esti-
     mates.


  prefix.OUT
     prints out  various  informational  messages.   Particularly
     important  are  methylene and aromatic ring pseudoatoms that
     have been recognized in  the  input  intensity  file.   Very
     importantly,  this  file  reports  when  an atom name in the
     input intensity file is not recognized.  This is often indi-
     cative of a nomenclature difference between the PDB file and
     the intensity file or a failure to follow  pseudoatom  name-
     formation  rules.   This file also contains the proton pairs
     which have been classified as fixed-distance  pairs  due  to
     connectivity  constraints (for a list of possible fixed dis-
     tances, see the file constrain.dat).


  prefix.BNDS (used to be called prefix.DG)
     prints  out  distance  constraints  suitable  for   distance
     geometry  or  flatwell-restrained  molecular dynamics input.
     This file contains lower bounds, upper bounds, widths,  dis-
     tances  calculated  by  mardigras,  and the input model dis-
     tances.  The upper and lower deviations  are  not  generally
     symmetric since measured errors are in intensities (not dis-
     tances) and the transformation is not linear with intensity.
     prefix.BNDS  for  different  input parameters can be used to
     determine the final bounds. The program avgbnds is available
     to  average  (or  find the minima and maxima) of a number of
     prefix.BNDS files.




     prints out parameters for constraints in molecular  dynamics
     simulations,  including  the  force constant for a parabolic
     potential pseudoenergy curve for deviations from  this  dis-
     tance.   The  smaller  the  estimated error in distance, the
     larger  the  value  of  this  constant.   The  constant   is
     currently  scaled  to yield an energy of 1/2kT when the dis-
     placement is equal to the estimated distance error.  Prelim-
     inary  results  suggest that this is probably too high. This
     file is compatible with very old AMBER format, which is  not
     used anymore at UCSF.


  prefix.ERRORS
     prints out any errors which may  have  occurred  during  the
     run.   Quite importantly, mardigras prints out a list of any
     proton pairs which have observed intensities, but  to  which
     mardigras  was  unable  to assign a new relaxation rate (and
     hence a new distance).  This  error  sometimes  occurs  when
     strong  spin  diffusion is present and the weak intensity is
     underdetermined by experimental data, or the model  is  poor
     over  such  a  region  --  the resulting inconsistencies may
     cause physically meaningless  rates  to  appear  upon  back-
     transformation  from  intensities.  Random  variation of the
     intensities within the limits of experimental errors  (RAND-
     MARDI)  may  compensate  the weak intensities and allows the
     distances to be calculated. If the error is due  to  a  poor
     model, after the initial efforts at structure refinement, an
     improved starting model may be available which can eliminate
     many intensities from this errors list.


  prefix.DSTREJ and prefix.BNDSREJ
     print out rejected distances.  Rejected distances are  those
     for which the relaxation rate is very small -- corresponding
     to distances greater than 5 A -- and thus the distances have
     high uncertainty.

  The following files are generated if RANDMARDI is applied:

  prefix.bnds
     is similar to prefix.BNDS, but the distances are the average
     of  N  calculations  using randomly modified intensity data,
     and the distance bounds are the average  distance  plus  and
     minus  the  standard  deviation  (STD) of the distances. The
     width is two times the STD.  The minimum and maximum  values
     of  each  distance  and  the number of times the distance is
     calculated are also included  in  prefix.bnds.  The  program
     avgbnds takes either the SDT bounds or the minimal and maxi-
     mal distances calculated for different input parameters  (or
     intensities  from  spectra  of  different  mixing  times) to
     determine  the  final  distance  constraints  suitable   for


  prefix.dstxx
     contains distances calculated for each  of  the  N  calcula-
     tions.  Distances  of  the  first  10  calculations  are  in
     prefix.dst01,  and  the  next   10   calculations   are   in
     prefix.dst02, and so on. xx increments 1 for every 10 calcu-
     lations. The number N specified in file.PARM  for  RANDMARDI
     does not need to be a multiple of 10; the residual will make
     the last file.

  prefix.OUT
     is the same as described above for  regular  mardigras,  but
     contrains  information  for  N  calculations, where N is the
     number of random variations.

  prefix.ERRORS
     is the same as described above, but for N calculations.

  If the input intensities are ROESY, the following file is  gen-
  erated:

  prefix.ROEFCTR
     is output for ROESY  simulation.   It  contains  information
     about  the chemical shift dependence and HOHAHA  corrections
     of the REOSY intensities. A brief expla- nation can be found
     in  the  header  of  this output  file.  The purpose of this
     file is to give the user a feeling about how much correction
     to  the intensities has  been  made  for  the chemical shift
     dependence and HOHAHA effect, and whether the correction for
     the direct HOHAHA  effect  is  in  the  valid range.

BUGS
     This program was developed at UCSF  on  Sun  SPARC  stations
     with  SunOS  Release 4.1.3 UNIX operating system. It has not
     been fully tested on any  other  system  and  may  therefore
     experience machine- or implementation-dependent problems.

AUTHORS:
     Brandan A. Borgias
     Paul D. Thomas
     He Liu
     Anil Kumar
     Marco Tonelli

REFERENCES
     The general algorithm is described in B. A. Borgias  and  T.
     L.  James,  J. Magn. Reson. 87 (1990) 475-487 and B. A. Bor-
     gias and  T.  L.  James,  Meth.  Enzymol.  176  (1989)  with
     features described in B.A. Borgias, M. Gochin, D.J. Kerwood,
     and T.L. James, In Progress in  Nuclear  Magnetic  Resonance
     Spectroscopy,  J.W.   Emsley,  J. Feeney, and L.H. Sutcliffe

     James, Curr. Opin. Struct. Biol., 1, 1042-1053, (1991).  The
     R factor and the sixth root R factor are considered in  P.D.
     Thomas,  V.J.  Basus  and T.L. James.  Proc. Nat. Acad. Sci.
     USA, 88, 1237-1241 (1991). The description for averaging  of
     pseudoproton  relaxation rates and distances can be found in
     H. Liu, P. D. Thomas and T. L. James, J.  Magn.  Reson.  98,
     163-175 (1992). Effect of internal motion on the interproton
     distances is considered in A. Kumar, T. L. James, and G.  C.
     Levy, Israel J. Chem. 32, 257-261 (1992). Application to the
     chemical exchange problems is described in H. Liu, A. Kumar,
     K. Weisz, U. Schmitz, K. D. Bishop, and T. L. James,  J. Am.
     Chem. Soc., 115, 1590 (1993). An application of the ensemble
     averaging is given in U. Schmitz, A. Kumar, and T. L. James,
     J. Am. Chem.  Soc., 114, 10654  (1992).  ROESY  calculations
     are published in H, Liu, D. L. Banville, V. J. Basus, and T.
     L. James, J. Magn. Reson.  B 107, 51-59 (1995).  The  method
     and  application  of  RANDMARDI  is  found  in H. Liu, H. P.
     Spielmann, N. B. Ulyanov, D. E. Wemmer and T. L. James,
      J.  Biomolecular  NMR,6  390-402  (1995).  Simulation   and
     correction  of  partially relaxed intensities is found in H.
     Liu, M. Tonelli and T. L. James,
      J. Magn. Reson.  B 111, 85-89 (1996).

CONTACT
     Address technical questions and problems to:
     Dr. He Liu
     Department of Pharmaceutical Chemistry
     University of California
     San Francisco, CA 94143-0446
     Tel.: (415) 476-0707
     E-mail: liu@picasso.uscf.edu

     Address other questions to:
     Prof. Thomas L. James
     Department of Pharmaceutical Chemistry
     University of California
     San Francisco, CA 94143-0446
     Tel.: (415) 476-1569
     E-mail: james@picasso.uscf.edu


SEE ALSO
     corma,  3Dcorma,  corma.in,  newhyd,  avgbnds,  mardi2amber,
     jcoup