xtalview

a complete package for solving a macromolecular crystal structure by isomorphous replacement, including building the molecular model


Window-based Applications:



Nonwindow-based Applications:











colorbyb



NAME

     colorbyB - prepare a vu file from a PDB file colored  by  B-
     value



USAGE

     colorbyB pdbfile xfit.vu -n[ormalize]



DESCRIPTION

     The input pdb file is converted to colored lines  using  the
     same  routines  as in xfit except that the lines are colored
     by Bvalue. If the -normalize flag is  present  then  the  B-
     values are normalized before coloring. This is highly recom-
     mended for comparison purposes as it scales out  any  effect
     of  the  overall B. Unnormalized Bs are colored in intervals
     of 5 on B-value from cool to hot with  the  following  color
     scheme:

                     0 -  5        cyan
                     5 - 10        blue
                    10 - 15        orchid
                    15 - 20        pink
                    20 - 25        red
                    25 - 30        gold
                    30 - 50        yellow
                    >50            white

     Normalized Bs are colored based on the sigma deviation  from
     the mean using the following color scheme:

                    < -2.0         cyan
                    -2.0 - -1.0    blue
                    -1.0 - -0.5    orchid
                    -0.5 -  0.0    pink
                     0.0 -  0.5    red
                     0.5 -  1.0    gold
                     1.0 -  2.0    yellow
                    >  2.0         white

     The B-value coloring can be very useful for comparing  muta-
     tions  with  the native structure. This same coloring can be
     done in xfit under View.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), xfit(1)

cvtpdb

cvtpdb



NAME

     cvtpdb - converts a pdb file  between  Cartesian  and  frac-
     tional  coordinates,  vice-versa, and coordinate transforma-
     tions.



USAGE

     cvtpdb crystal [-f | -c |  -t  |  -r  |  -e]  <  file.pdb  >
     newfile.pdb


     -f   convert from fractional to Cartesian.

     -c   convert from Cartesian to fractional.

     -t vx vy vz
          translate by the amount specified in vx vy vz.

     -r r11 r12 r13 r21 r22 r23 r31 r32 r33
          rotate by matrix

     -e q1 q2 q3
          rotate by the Eularian angles q1, q2, q3.



DISCUSSION

Note the nonstandard use of crystal on the command line instead of reading from the environment. This forces you to think carefully, since it is critical for correct operation. Converting to fractional coordinates is especially useful when applying crystallographic transformations. After transformation, convert back to Cartesian. You can pipe the output of one cvtpdb into another to chain operations together. For example to generate the second symmetry related molecule in P21 (-x, y+1/2, -z) and translate it to the unit cell at +1, 0, -1:

cvtpdb crystal -f < molecule1.pdb |\ !to fractional


cvtpdb crystal -r -1 0 0 0 1 0 0 0 -1 |\ !rotate by -x,y,-z


cvtpdb crystal -t 0 .5 0 |\ !translate by x, y+1/2, z)


cvtpdb crystal -t 1 0 1 |\ !translate by +1, 0 -1


cvtpdb crystal -c > molecule2.pdb !convert back to Cartesian


     Such a complicated command is best done in a shell file  and
     is very handy for generating packing diagrams.



VERSION

     Release 3.0 of XtalView




SEE ALSO

     xtalview(1)


















































cvtvu

cvtvu



NAME

     cvtvu - convert a vu file between Cartesian  and  fractional
     coordinates



USAGE

     cvtvu crystal -f < fractional.vu > Cartesian.vu

     cvtvu crystal -c < Cartesian.vu > fractional.vu



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), xfit(1)






cvtxyz

cvtxyz



NAME

     cvtxyz - convert  x,y,z  between  Cartesian  and  fractional
     coordinates



USAGE

     cvtxyz [-f|-c] [x y z]|[< file.xyz > newfile.xyz]

     -f   convert from fractional to Cartesian

     -c   convert from Cartesian to fractional

     The environmental  variable  CRYSTAL  must  be  set  to  the
     correct crystal file.



DISCUSSION

     If x y z are given, then these are converted and the  output
     is  reported  to  stdout.   Otherwise  stdin is converted to
     stdout. The file format is three floats on  each  line.   An
     example  use  of cvtxyz is converting fractional bounds from
     xcontur into the Cartesian bounds expected by xfrodomap.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), xcontur(1)





deh

deh



NAME

     deh - remove hydrogens from a pdb file.



USAGE

     deh < pdb_with_hydrogens > pdb_without_hydrogens



DESCRIPTION

     The output of XPLOR contains hydrogen atoms  at  some  posi-
     tions and often it is desirable to get rid of them. A hydro-
     gen is decided on if either column 12 or 13  is  'H'.   This
     also  will  remove HG+2. Does anyone know of a more reliable
     way to find hydrogens? (Note: xfit  handles  hydrogens  from
     XPLOR  and  if you leave them on, you will not have to rerun
     generate.inp.)



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), xfit(1)






deriv

deriv



NAME

     deriv - calculate the derivative of a difference map at each
     atom.



USAGE

     deriv file.pdb refl.phs out.vu [resmin] [resmax]



DESCRIPTION

     The input is a PDB file (.pdb) and a phase file  (.phs)  and
     the  output  is  a  vu  file,  suitable for xfit, containing
     arrows showing the direction and relative magnitude  of  the
     gradient.  If  one resolution limit is given then it is con-
     sidered the  minimum  resolution.  If  two  are  given  data
     between  them  are  used,  and if none are given all data is
     used.



PURPOSE

     This function is also provided within xfit.   It  calculates
     the derivative of the difference electron density of the two
     amplitudes given in the phase file.  If  the  file  contains
     Fobs and Fcalc this is Fobs-Fcalc.  Another useful construct
     is Fmutant-Fnative.  An arrow is drawn at this  position  in
     the direction of the gradient of the difference map with the
     length indicating the steepness normalized for the atom type
     (do not take these literally, they are only relative indica-
     tors).  This is the direction  a  refinement  program  would
     move  the atom in the first cycle if no stereochemistry were
     taken into account.  Also, this is not very useful at  reso-
     lutions  far  from atomic resolution (say below 2.5A).  This
     program is provided for those who want to use it  with  some
     other   program   (converting   the   vu   file   is   their
     responsibility--remember it is x1 y1 z1 x2 y2 z2 color), and
     also  because  performing  this  calculation  for  an entire
     molecule would take quite a long time and  would  stop  xfit
     while  it  was  being  done.   Since xfit does not provide a
     mechanism for saving the vectors it calculates, if you  will
     be  using  them  over  several  sessions they should be pre-
     calculated with deriv.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), xfit(1)



dumpphasit

dumpphasit



NAME

     dumpphasit - reformat phasit format output files to XtalView



USAGE

     dumpphasit phasit_file > xtalview.phs



AUTHOR

     PHASIT is Bill Furey's (University  of  Pittsburgh)  phasing
     program from his PHASES package.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1)






grinchbones

grinchbones



NAME

     grinchbones - convert a GRINCH ASCII format  file  to  a  vu
     file



USAGE

     grinchbones < grinch.ASCII > xfit.vu



DISCUSSION

     The input is a University of  North  Carolina,  Chapel  Hill
     Graphics Lab GRINCH ASCII format file (made with the command
     ASCII save filename in interp or use  the  ASCII  option  in
     mkskel)  and  the output is an xfit vu file. The output uses
     the standard GRINCH color scheme for interpreted edges (i.e.
     main chain is green, side chain is violet, etc.) except that
     unknown edges are colored in bins of density  from  blue  to
     red (the same as the default color scheme for the 1st map in
     xfit). This can be used as a background guide  for  building
     the  model  in xfit. Contours can be used for close-up views
     and detailed fitting and ridge lines can be used for  larger
     views  allowing  a  larger portion of map to be viewed since
     ridge lines require fewer lines than contours.

     The coloring scheme is close to that of GRINCH's except  for
     unknown edges:

               M (main)                 green
               B (bridge)               brown
               S (side)                 purple
               O (carbonyl)             red
               F                        cyan
               G                        yellow
               R (residue)              blue
               U (unknown)              0-14 blue, 15-28 purple, >28 orchid



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), xfit(1)





hercules

hercules



NAME

     hercules - searches for heavy atom sites.  This is  a  brute
     force  application  of Patterson correlation methods.  It is
     slow, but extremely robust.



USAGE

     hercules control-file print-file



DESCRIPTION

     control-file

     The control-file describes what you want  done.   The  input
     data  descriptions  are  listed below.  The first five lines
     are string values for file names and the crystal  name,  and
     the rest of the lines in the file contain numeric data.


          1.   fin file with (merged native and derivative data)

          2.   solution file (NONE  for  the  first  round,  then
               solution  file  output from xheavy or xpatpred for
               the second round)

          3.   correlations file (output)

          4.   correlation map file (output in xcontur/xfit  for-
               mat)

          5.   crystal (crystal name)

          6.   grid  (should  be  1/4  to   1/6   resolution   in
               Angstroms)

          7.   resmax, resmin (resolution limits  on  diffraction
               data)

          8.   xmin, xmax (in fractions of  unit  cell,  x  asym-
               metric unit)

          9.   ymin, ymax (in fractions of  unit  cell,  y  asym-
               metric unit)

          10.  zmin, zmax (in fractions of  unit  cell,  z  asym-
               metric unit)

          11.  occupancy (see description)




     print-file

     The print-file will contain some of the output from the pro-
     gram.   Other output goes into the correlations and correla-
     tion map files.



DISCUSSION

     If you put "NONE" in the heavy solution file name spot (line
     2),  then  atom  data is read from the control-file.  Other-
     wise, it is read from  the  file  specified  in  that  field
     (which  may  be results from a previous run).  The atom data
     in the solution file is in the same format as that  used  by
     xheavy.

     For example, to use hercules to search for an initial  site,
     enter  "NONE"  for the solution file (line 2), run hercules,
     and select the highest hit.  You can put this  initial  site
     into  a solution file using xpatpred.  Then, to search for a
     second site, enter the new solution file in line  2  instead
     of "NONE" and run hercules again.

     To guess an occupancy for the second site  relative  to  the
     first,  examine  the Patterson map.  It's not very sensitive
     to the occupancy, so numbers like 1, .75,  .5,  or  .25  are
     sufficient.

     Use xpatpred to display the predicted  Patterson  positions.
     To  do  this, enter the site and then write out a prediction
     file.  Read this file into xcontur as a  labels  file.   The
     vectors  are  put  into the volume as 0-1, 0-1, 0-1, so they
     won't show up on negative sections.  For multiple site solu-
     tions, pay particular attention to the cross-peaks.

     The search volume should be the  asymmetric  volume  of  the
     Patterson map.  The input format only allows for rectangular
     asymmetric units.  This may cause some redundant computation
     in  high symmetry space groups.  For single sites there will
     be extra symmetry due to the fact that both  hands  and  all
     origin  shifts  are  valid  interpretations of the Patterson
     map.  For a second site there is a two-fold ambiguity due to
     the  hand  choice.  You can reduce the search volume accord-
     ingly.  If not, note that there will be  several  equivalent
     hits   (They   will  all  give  identical  predictions  with
     xpatpred).

     The solution can then  be  read  directly  into  xheavy  for
     refinement.   If  you  want  to  use the PHASES package from
     Furey, then xheavy can rewrite  the  solution  into  a  file
     that's  more  or  less  ready to use depending on the PHASES
     version you use.

     Hercules writes an fsfour style map  that  may  be  examined
     with  xcontur.   To get the coordinates in xcontur, click on
     the peaks.  Sites are added to the solution file as they are
     found  and  the  program is rerun.  The peaks can be entered
     into xpatpred and displayed on the Patterson map  to  verify
     their correctness.

     Hercules only takes a .fin file, not a .df  file.   You  can
     split off part of the data in a .df file to from a .fin file
     with awk.  If you do this, you can extract the  first  entry
     in the .df file with the command:

            awk '{print $1,$2,$3,$4,$5,$6,$7}' < file.df > file.fin

     You can extract the second entry with the command:

            awk '{print $1,$2,$3,$8,$9,$10,$11}' < file.df > file.fin

     (For information  about  .fin  and  .df  file  formats,  see
     Chapter 3 of the XtalView user guide.)

     You can view the results of a hercules run  with  a  command
     such as:

            sort -nr +3 test.list | head -20 > top20.hits

     This command produces a sorted list of the top 20 hits.



EXAMPLES

     Example control-file

     The following is an example control-file.

          NONE

          ex.list

          ex.map

          cvccp

          2.5

          1000.0, 6.0

          0.0 0.5

          0.0 0.3

          0.0 0.05

          1.0

     On an SGI workstation, you may need to enclose each  of  the
     first  five  lines  in  double quotes to make your file look
     like this:

          "ccpniau1.fin"

          "NONE"

          "ex.list"

          "ex.map"

          "cvccp"

          2.5

          1000.0, 6.0

          0.0 0.5

          0.0 0.3

          0.0 0.5

          1.0


NOTES

     Runs can take several hours  and  are  proportional  to  the
     number of sites that are input.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), xhercules(1)







matrices

matrices



NAME

     matrices - dump the XtalView Cartesian/fractional conversion
     matrices



USAGE

     matrices crystal



DESCRIPTION

     This routine returns the Cartesian to  fractional  and  vice
     versa  matrices  used  by XtalView. This is provided because
     there is more than  one  way  this  can  be  done  for  non-
     orthogonal  space  groups  (i.e.  a*bc  vs.  abc*)  and when
     importing/exporting coordinates it may  be  useful  to  have
     these  (like  when  you send your brand new structure off to
     the databank). The output is self-explanatory. The  matrices
     are  meant  to  be the same as the conventions used by XPLOR
     and FRODO but I give no guarantee.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1)





mkskel

mkskel



NAME

     mkskel- performs skeletonization on an electron density  map
     (mkskel  is  part of the University of North Carolina GRINCH
     skeletonization package).



USAGE

     mkskel mainname [-maxlen length -minden density  -range  low
     high]



DESCRIPTION

     mkskel looks for  mainname.mi  (map  information  file)  and
     mainname.map (density map file).  You can create these files
     yourself or use the program xskel to  create  them  for  you
     (see xskel man pages).

     mkskel produces ridgeline files in ascii, binary or "edges",
     depending on the output file format specified.


     Options
          -maxlen takes a specific  length  in  angstroms  as  an
          argument.  This length corresponds to the longest legal
          bond length in the molecule.  The default length is 2.0
          angstroms.

          -minden takes a specific node density in density  units
          as  an  argument.   This  density  corresponds  to  the
          minimum density after range mapping 0-31 that  will  be
          used to make a ridge line.  The default density is 10.0
          density units.

          -range take two arguments:  the highest and lowest den-
          sity  for  the  map  range in density units for mapping
          onto range 0-31 for interp.  The default is  0  density
          units for the low and 99 density units for the high.

     For instructions on writing map information  files  see  the
     README  file in $XTALVIEWHOME/README.mkskel.  mkskel ignores
     file lines that are blank or that start  with  a  "#".   The
     following elements are mandatory:

          1. order - XYZ (or XZY, YXZ, ZYX, ZXY)
               The slowest dimension is  the  first,  the  medium
               dimension  is second, and the fastest dimension is
               third.


          2. dimension - slowsize middlesize fastsize
               slowsize is the size of the data in number of sam-
               pling  points  in  the  slow direction ("number of
               planes").  middlessize is the size in  the  middle
               direction  ("number  of  rows").   fastsize is the
               size in the fast direction ("number of columns").


          3. spacing - slowspace midspace fastspace
               All spacings are in angstroms.


          4. origin - sloworigin middleorigin fast origin

     The following elements are optional:

          1. title - name
               The name of the map.


          2. mapinformat - XXX
               Default mapinformat is character.  Other  possible
               values are:

               ASCII, CHAR, EBCDIC - character format

               FLOAT4, FLOAT - 4-byte floats

               FLOAT8, DOUBLE - 8-byte floats

               INT1, BYTE - 1-byte integer

               INT2 - 2-byte integer

               INT4 - 4-byte integer

          All float and integer values are signed.

          Sample test.mi file

               #################################
               # test.mi

               mapinformat    CHAR
               rloutformat    EDGES

               # name of the molecule
               title          Bovine ferricytochrome b5 fragment
               order          XYZ
               dimension 27 17 17

               #other stuff
               spacing        1.00844 0.959167 0.934687
               origin         -27 -15 -15

               #################################


                    The ridgeline code mkskel was written by  Tom
                    Williams,  and is supplied with Xtalview with
                    permission from the author and  the  Computer
                    Science Department, University of North Caro-
                    lina at Chapel Hill.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), xskel(1)





SEE ALSO
     xtalview(1), xprepfin(1)







pdbfit

pdbfit



NAME

     pdbfit- align two PDB objects using rotation and translation



USAGE

     pdbfit [-v] <input-file



DESCRIPTION

     pdbfit rotates one PDB file onto another.  You can either do
     all the residues in both proteins or set up groups.  You can
     also specify atom types to include and a weight.

     The -v  option  switches  to  verbose  mode  which  provides
     descriptions of residues and matches.

     The input-file data descriptions are listed below.

          1.   name of the file to rotate (file 1)

          2.   name of the target file to rotate onto (file 2)

          3.   output coordinates

          4.   atom types to use and their weights

          5.   the number of groups

     The input file must also have the following information  for
     each group in the indicated order:

          1.   length of group 1

          2.   number of the starting residue in file 1

          3.   number of the starting residue in file 2

          4.   file 1 chain identification.  "*" indicates ignore

          5.   file 2 chain identification.  "*" indicates ignore



EXAMPLES

     Example input-file

     The following is an example input-file.

          2ccy.A.pdb

          cvccp.A.pdb

          rmoncv.pdb
          CA 1.0

          (blank line marks end of atom type list)

          1

          27

          2

          2

          *

          *


VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1)





rescalc

rescalc



NAME

     rescalc - calculates resolution of an index for the  crystal
     in the CRYSTAL environment variable.



USAGE

     rescalc



DESCRIPTION

     rescalc gets crystal index values from the environment  cry-
     stal  information  file  and  calculates  the  resolution in
     angstroms.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1)






stfact

stfact



NAME

     stfact  - calculate structure factors from a PDB file.



USAGE

     stfact pdbfile refllist output.phs [reslimit] [reslimit]



ENVIRONMENT

     The value of CRYSTAL must be set to the correct crystal  for
     the unit cell and space group (see xtalmgr(1)).

     If one limit is given, it is considered the minimum  resolu-
     tion;  if  two are given, then the data between them is used
     and if none are given all input reflections are  used.   The
     input  is  a  PDB  file  (.pdb) and a list of reflections in
     phase file format (.phs). The value of Fobs in the input  is
     passed  to  the  output  and  Fcalc  phi can have any value,
     including zero (but not blank). The output is  a  new  phase
     file  and will be on an absolute scale (i.e., Fobs is scaled
     to Fcalc) and is suitable for use in xfit  for  making  maps
     including omit maps.



DESCRIPTION

     This is a completely general  structure  factor  calculator.
     This is the same structure factor calculator as used in xfit
     and is atom based. Since this can be quite slow compared  to
     an FFT structure factor calculation this program is provided
     for doing the calculation offline (perhaps as the last  step
     in  a  command  file  of a refinement job). If you are using
     XPLOR, it is faster to calculate the structure factors using
     XPLOR's  FFT.  If  you use a command file, be sure to setenv
     CRYSTAL  (e.g.  setenv  CRYSTAL  miraclase)  before  running
     stfact.




VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), xfit(1), xtalmgr(1)





urf2xfit

urf2xfit



NAME

     urf2xfit - convert an XENGEN urefls file to a  vu  file  for
     display in xfit.



USAGE

     urf2xfit [urefls]  [xfit.vu]



DESCRIPTION

     If no files are given,  then  the  program  uses  stdin  and
     stdout; if one name is given, then that file is converted to
     stdout.



ENVIRONMENT

     CRYSTAL is the crystal file. It is used to get the unit cell
     for  scaling  the  axes. The present version does not handle
     non-orthogonal space-groups correctly  but  always  displays
     h,k and l as orthogonal axes. Still, this may be useful.



PURPOSE

     By converting a urefls file to a vu file it can be displayed
     in three dimensions with xfit. The three axes H,K, and L are
     displayed as well as a jack at the position of each  reflec-
     tion.  Data  that is missing becomes apparent as well as the
     curved nature of Ewald sphere which is  often  neglected  in
     data collection strategies. Each run can be turned into a vu
     file and displayed in a different color (using the  recolor-
     ing  option  in  xfit) to see how multiple runs overlap. The
     output is colored in 4 bins of intensity from  min  to  max:
     blue, cyan, yellow, white. The color scheme needs expanding,
     and coloring by phi value would be useful.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), xfit(1)





volume

volume



NAME

     volume - calculates and displays the  volume  of  a  crystal
     unit cell



USAGE

     volume crystal



DESCRIPTION

     The argument for volume  is  the  XtalView  crystal  keyword
     name.   The  unit  cell dimensions for the indicated crystal
     are extracted from the crystal file and used to compute  the
     volume of the unit cell.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1)






xcontur

xcontur



NAME

     xcontur - a page-based  contouring  program  for  crystallo-
     graphic maps



USAGE

     xcontur file.map



METHOD

     The map is contoured in sections of x, y, or z.  The  output
     appears  in a window that is the same size as an 8-1/2 x 11"
     page.  The program produces Postscript output which  can  be
     used  on  any  Postscript compatible printer.  The output is
     fairly WYSIWYG with  the  exception  that  nicer  fonts  are
     available  on  the  laser-printer.   Stereo  is available by
     shearing and labels and bonds (lines) can be added  or  read
     from files.  No interpolation is used in the contouring.  If
     smoother sections are desired calculate the map on  a  finer
     grid.



MAIN WINDOW

     Crystal
          The cell information is used from the crystal file.


     Cell The  unit  cell  is  used  to  scale  the  axes.   Non-
          orthogonal  axes  are  properly  handled.  The rows are
          always horizontal and the column is at alpha,  beta  or
          gamma depending upon the plane being sectioned.


     NX, NY, NZ
          This is read from the input map and cannot be changed.


     Planes
          This sets the sectioning direction in either x,  y,  or
          z.  If you change this, then the rows and column direc-
          tions are also changed so that they  do  not  conflict.
          No  attempt  is  made  to detect left-handed configura-
          tions.  If you stack up sections for  a  mini-map,  you
          may  need  to  stack  downwards  or  upwards to get the
          proper handedness.


     Plane
          There are 3 fields here.  The first is a numeric  field
          which  can  be  used to increment/decrement the section
          where contouring starts.  The second is  the  value  of
          this  plane in fractions of the unit cell.  If you edit
          this value and enter it, the nearest plane section will
          found.   The third is a pull down menu for choosing the
          three sections 0.0, 0.5 and 1.0.  If the number of sec-
          tions  is  odd,  the  nearest section will be given for
          0.5.


     Slab The number of sections to contour.  They  will  all  be
          overlaid  onto  each  other on the screen although when
          they are plotted they can be either overlaid or plotted
          on  separate  sheets.   The slab always starts at plane
          and increases.


     Rows Rows go horizontally  across  the  screen.   This  sets
          whether this direction is x, y, or z.  It overrides the
          columns when changed if it conflicts, and can be  over-
          ridden by planes.


     Row min
          The first value is in terms of grid points in nx, ny or
          nz  and  the second is fractions of the unit cell.  You
          must enter fractional values for them to take effect.


     Columns
          This sets the direction of the  columns.   It  has  the
          lowest priority and so can't actually be used to change
          the column direction but does  indicate  the  direction
          being used.   Both row and plane direction changes will
          override the column direction if there is a conflict.


  CONTOUR LEVELS
     Number
          The number of contour levels is set here from a minimum
          of 1 to a maximum of 20.


     Interval
          The interval between successive levels.  From a minimum
          of 1 to the maximum value of the map.


     Start
          The level of the first contour level.  May be negative.
          The  slider  ranges  from the minimum of the map to the
          maximum.  Upon loading a map both start and the  inter-
          val are set to the root-mean-square value of the map.


     Draw The screen is redrawn when this button is pressed.


     Picking in the Canvas
          If you pick with the mouse button the fractional  coor-
          dinates  of that point are returned in the message win-
          dow.   Holding down  the  SELECT  (left)  mouse  button
          causes  the  outline  of the section to drag so that it
          can be  positioned  on  the  page.   When  using  slabs
          greater than 0 the vertical coordinate with the maximum
          density value will be printed.  This allows finding the
          x,  y,  z  coordinate  of  a  peak.   The density value
          printed is an interpolated value and as such is  almost
          always lower than the peak value.



VIEW POP-UP

     Title
          The title is initially set to the map file  name.    It
          is nice to edit it and put something sensible here.


     Display Type
          You can look at the contours (default) or  at  the  raw
          numbers in the map file.  However, for the  raw numbers
          only a small section can be viewed before  the  numbers
          overlap each other and become unreadable.


     Row, Column Ticks
          The number of grid lines  and/or  tick  marks  to  make
          counting from 0.


     Row, Column Origin
          The position of the upper left corner of  the  section.
          It  is easier to set this by dragging with the mouse in
          the canvas window.


     Scale Angstroms/cm
          You can manually enter a value or pull down a  menu  of
          choices.   The  scale  is  accurate for hardcopy but is
          correct only if you happen to have the right size moni-
          tor.   Remember,  though, that the canvas window is the
          same size as a piece of paper if  you  haven't  resized
          it. And so, if the graph fills the window, it will fill
          the paper.


     Alternate solid and dashed contour
          Check this if you wish to do this.  Every  other  level
          will be dashed lines for an interesting effect that can
          make counting levels easier.


     Draw grid of lines
          If this is checked, a grid of lines  is  drawn  at  the
          frequency specified by the row, column ticks.


     Auto Center
          If this is checked the section is centered on the  page
          automatically.   Must  be  disabled  for stereo to work
          properly.


     Use Line Width for Depth Cue
          While the computer screen does not have enough  resolu-
          tion  for  this  to be useful, it produces a nice depth
          cue on laser printed output and is  highly  recommended
          for  multi  section  slabs.  Best to set it just before
          printing.


     Draw Labels
          Enables/disables the drawing of labels. Labels  can  be
          edited  using  the  Labels pop-up or loaded in the File
          pop-up. They are drawn on the section only if the x, y,
          z coordinate is on that section.


     Draw Jack at Label Position
          Enables/disables the drawing of a jack at the  position
          of the label.  The size of the jack can be changed with
          the slider:


     Draw Bonds
          Bonds can be drawn superimposed on the sections.   They
          are  drawn  only if their x, y, z coordinate is on that
          section.  The line width of the  bond  on  the  printed
          output can be varied from thick to thin to make it more
          obvious.


     Draw side by Side Stereo
          The scale is halved and two images  for  side  by  side
          stereo are drawn by shearing each successive section.


     Stereo Separation
          Sets the distance the two images are  apart  from  each
          other.   Hint:  Set  the  contour level very high while
          fiddling with the stereo parameters so that drawing  is
          quick.  Once you get them right you can lower the level
          for the final picture.


     Stereo Depth
          This sets the shear angle  and  modifies  the  apparent
          depth.


     Apply
          Causes the picture to re-draw.



FILE POP-UP

     Filter
          This sets a filter for the file list box.  It  defaults
          to  *.map  and  all  the files in the current directory
          that match the filter will be  displayed  in  the  file
          list.


     List Forces the file list to be updated. Use after  changing
          the filter or the working directory.


     Directory
          The current working directory.


     Map File
          The source of the map.  This field can be filled either
          from the command line as the first argument, by select-
          ing a file name in the file list, or by typing it in.


     Labels File
          The labels can be loaded from or saved  to  this  file.
          It  has the format of lines of x y z label, where x, y,
          z are the coordinates  and  label  is  a  text  string.
          Xpatpred   produces   a  label-file  that  xcontur  can
          display.


     Bonds File
          Bonds can be loaded or saved.  The bond file has the vu
          format:  lines  of  x1 y1 z1 x2 y2 z2 color.  Where x1,
          y1, z1 are the starting coordinates of a line  and  x2,
          y2, z2 is the end coordinate.  The color is not used by
          current version of xcontur.  Xfit also displays/creates
          vu  files  and  a  number of utilities for producing vu
          files from PDB files and  other  sources  exist  (e.g.,
          grinchbones).


     Number of Bonds
          This is for your information.  It is not editable.


     File List
          To pick a file in the list, click  on  the  file  field
          that  you want to load the input focus into (the little
          triangular cursor). Then select a file name  using  the
          SELECT (left) mouse button.



PRINT POP-UP

     Print to
          You can select a file or a printer.   Very  large  pic-
          tures  may  need  to be sent to a file and then printed
          with the -s option because they are too large to  spool
          directly.


     Printer
          A valid name of a printer connected to  your  computer.
          Leave blank for the default printer.


     File Name of the file.  The directory in the files pop-up is
          added unless the name starts with "./" or "/".


     Print sections separately
          If this option is checked, each section is printed on a
          separate  page.   This  saves  you from having to print
          them one by one by  selecting  the  entire  slab,  this
          option, and then printing.



LABELS POP-UP

     Can be  used  to  edit  the  labels  list.    Functions  are
     insert/replace/delete.  Use the File pop-up to load a labels
     file.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), xpatpred(1), grinchbones(1)


xdf

xdf



NAME

     xdf -  disk full meter



USAGE

     xdf partition



DESCRIPTION

     Xdf can be used to monitor disk usage.  After it  starts  it
     updates the disk usage of the partition it was started with.
     The usage is  shown  on  the  gauge  and  the  partition  is
     displayed on the footer.

     Example:

          xdf /usr

     Shows the amount of /usr that is used.   Since  xdf  updates
     every   three   minutes   (to   avoid  over  using  computer
     resources), a sudden jump in disk usage  will  not  show  up
     immediately.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1)




xedh

xedh



NAME

     xedh - electron density histogram plotter



USAGE

     xedh [file.map]



DESCRIPTION

     xedh is a normalized electron-density histogram plotter.  It
     can  be  used  to  compare histograms between phase sets and
     between different crystals.  The histogram for  a  correctly
     phased  protein  with a given percent solvent and resolution
     range is characteristic.  Any deviations are  due  to  phase
     errors.    By  comparing  your phase set with those of other
     well-refined proteins in the same resolution range  you  can
     guess  the amount of phase error.  For example, when compar-
     ing  right  and  left-handed  maps  that  include  anamolous
     scattering  information  the  correct  hand  will  have  the
     sharper histogram.

     If a solvent mask in B.C Wang format exists, it can be  used
     to  separate  out  the protein and solvent components of the
     histogram.

     The histograms can be saved and loaded in the Files window.

     The methods are still being developed.  In the future  exam-
     ple  histograms  may  be  available  and more information on
     determining phase errors will be available.



POP-UP WINDOWS

     xedh has several pop-up  windows  you  can  use.   They  are
     self-explanatory.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1)





xfft

xfft



NAME

     xfft - calculate an electron  density  map  or  a  Patterson
     function map by the Fast Fourier Transform method.



USAGE

     xfft phasefile mapfile



DESCRIPTION

     Crystal
          A crystal file is needed with the cell and symm records
          present.   Note that symm records should have centering
          expanded explicitly.  (i.e.,  C2  should  have  8  symm
          operators  not  4  with the last 4 1/2+x,1/2+y,z of the
          first 4.)


     Unit Cell
          This is obtained from the crystal file. However, it can
          be overwritten by manually entering a value.  But there
          is no way to overwrite the symmetry operators.


     Defaults
          A defaults file (hardwired  as  xfft.defaults)  can  be
          saved  or  loaded.   Also,  defaults  can  be  reset to
          startup values.  This is  handy  when  you  recalculate
          maps  often  with  the same parameters.   Note that you
          can save a defaults file and then copy it to a new name
          and  then  copy  it  back at a later date.  In this way
          several standard methods can be saved.


     Direction of Planes
          The output can be in x, y, or z planes.  This  is  only
          necessary  for  possible  use of the output map by non-
          XtalView programs as all XtalView programs can read all
          3 sort orders.


     Map Type
          There are several choices of  map  coefficients  avail-
          able.


     Input File
          This file can  have  several  different  formats.   For
          Fourier maps either the phs format (h,k,l,fo,fc,phi) or
          XPLOR format can be used.  For Pattersons these can  be
          used plus fin and df formats.

     Type Specifies the type of input file.  For Pattersons  with
          df  formats  there  are  three choices for defining the
          difference to be used in computing the Patterson  coef-
          ficients.   Which  you use depends upon what is in each
          of the 4 columns in the df file.  Normally,  columns  1
          and  2  are  native data and its sigma's, and columns 3
          and 4 are isomorphous data (a column is a pair of f and
          sigma(f)).  To make an isomorphous difference Patterson
          map use (3+4) - (1+2) which means the average of 1  and
          2  minus the average of 3 and 4 or FPH - FP.  Note that
          when calculating the average missing  observations  are
          not included.


     Resolution Filter
          Set these values to  your  desired  limits.   Order  is
          unimportant  since  computers  are perfectly capable of
          figuring out which number is the min and which  is  the
          max (the other one).


     Outlier Filter
          This gets rid of outliers when making  Patterson  maps.
          Specifically  if  the absolute value  of the difference
          is greater than x percent of the  average  of  the  two
          observations,  the  reflection  is  rejected.   This is
          important when making Patterson maps so that a few  bad
          apples  don't  spoil  the  whole bunch.  A value of 100
          percent is a  conservative  value  to  use.   Note:  On
          numeric  fields  you  must enter return if you edit the
          data with the keyboard to register the edit.


     Read Phase File
          This button reads in  the  data.   It  is  usually  not
          necessary  to use it since the calculate button (below)
          can figure out if the data needs to be read  in.   How-
          ever,  sometimes  you  may  want  to  find out the grid
          before calculating the map, or you may have changed the
          input  data  file  and want to force a rereading of the
          input data. In any case, after reading  the  data  some
          useful information is printed in the message window for
          you to edit.  Also, if you change any of the data above
          this  button after calculating a map, you must use this
          button to have that change take effect.


     Grid Number in X, Y, Z
          This is the number of points in x, y and z to  be  used
          in  calculating  the FFT.  The FFT method used requires
          these to be multiples of 2,3,5 and 7 and nx to be even.
          The  program  restricts  you to these values if you use
          the little arrows by the grid  values  to  increase  or
          decrease  them.   Usually you do not need to set nx, ny
          and nz directly as explained below.


     OR Percentage of minimum resolution
          This sets the grid to the next largest value that  will
          give  a  grid  spacing  that is equal to the minimum d-
          spacing or resolution times the percentage.  For  exam-
          ple:   if the input data had a minimum d-spacing of 2.0
          and 50% is chosen, the grid will be set as close to 1.0
          Angstroms  as  possible.  If the cell edge was say 48.3
          A, then 48.3 is tried, but since this is not an integer
          it  is rounded up to 49.  An FFT requires that the grid
          be at least 50% of the minimum d-spacing  (actually  it
          is has to be twice the maximum index input but it works
          out to the same thing as the reader can  verify).   The
          map  will  be  smoother  if  33% (the default) is used.
          More than this usually has little benefit in  smoothing
          the  map  and requires much more storage since the size
          of the map goes up as the cube of the grid  size.   Set
          this field to zero to prevent overriding the nx, ny, nz
          fields.


     OR approximate spacing in Angstroms
          If both nx, ny, nz and percent  of  minimum  resolution
          are  0  then  this  field  is used to set nx, ny, nz by
          finding the nx, ny, nz that  gives  the  closest  grid-
          spacing  in  Angstroms  that  is also a valid FFT grid.
          For example if you have a 77.77 E cell edge and ask for
          a 1.0 Angstrom grid then 78 is tried, but since this is
          not a multiple of 2,3,5, or 7,  80 is used.


     Output Map File
          The XtalView convention is to use the  extension  .map.
          This file is in FSFOUR binary FORTRAN format.


     Calculate
          This is the "Apply" button.  When it is pressed the FFT
          is  calculated and the map output.  If the FFT is large
          then it may take several minutes to return.   The  pro-
          gram  tries to ascertain if the data needs to be reread
          if you change various values.  It  usually  decides  to
          reread even when it is strictly unnecessary.



ADVANCED USAGE

     If you want a coefficients type that is not  available,  you
     can  always  precalculate them and put them in the Fo column
     and then make an Fo map.

     Example: to make a 3Fo-2Fc map using awk and xfft:


awk '{print $1,$2,$3,3*$4-2*$5,$6}' input.phs | xfft - output.map


     In XtalView, a dash (-) means use stdin for input  files  or
     stdout for output files.  At other times, a binary file with
     the phases is used.  For example,  to  use  a  Furey  format
     phasit  output  file (fort.31) using dumpphasit which writes
     its output on stdout:

          dumpphasit fort.31 | xfft - output.map

     Unfortunately, if you use stdin or stdout for I/O  then  the
     history  file  will know only that stdin was used but has no
     way of picking up the original file used and so  the  thread
     of data files will be broken at this point.



ACKNOWLEDGEMENTS

     The FFT code was supplied by Lynn Ten Eyck.  Andy  Arvai  is
     partly responsible for the FFT driver routine.



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1), dumpphasit(1)





xfit

xfit



NAME

     xfit - display or manipulate models and fit to electron den-
     sity.



VERSION

     xfit v3.0.



USAGE

     xfit [.pdb .vu .phs .map .vp .script .bones]



DESCRIPTION

     All of the files on the command line are loaded according to
     their  extension.   If  you have files with different exten-
     sions, they can be  loaded  using  the  files  option.  xfit
     accepts PDB files, phase files, map files, and vu (vector or
     line) files.

     The -bw flag forces the program to be black and white,  even
     on  a  color  display.  It works on the SUN only. One cannot
     switch to the Accelerated Canvas if one invokes it.

     The -std flag prevents the  Accelerated  Canvas  from  being
     evoked  on  Suns with GX graphics. It works on the SUN only.
     One cannot switch to the Accelerated Canvas if  one  invokes
     it.

     Xfit is a large and complex program with 11 windows and many
     possible  operations.  Some  of xfit's more notable features
     include:

     *    Model-fitting to electron density.

     *    A built-in FFT to calculate density from structure fac-
          tors.

     *    A built-in FFT to calculate structure factors for  mak-
          ing omit maps and updating phases.

     *    Difference-density gradient calculations.

     *    Least-Squares Fitting of models or portions thereof.

     *    On-the-fly omit maps.

     *    Fast contouring of up to 20 maps.

     *    Up to 50 models.  Residues  can  be  edited  and  model
          geometry refined.

     *    Simultaneous refinement  and  fitting  -  the  geometry
          anneals as the model is fit.

     *    100 arbitrary background objects (ridgelines,  ribbons,
          surfaces, etc.).

     *    X11-based interface - runs  on  ordinary  (inexpensive)
          desktop workstations in 8-bit color or black and white.

     *    Anything on the screen can be  printed  with  color  or
          black-and-white PostScript.

     *    A script language for building complicated  figures  or
          saving  viewpoints with multiple objects and for saving
          different defaults.




ENVIRONMENT VARIABLES

     CRYSTAL and XTALVIEWHOME are required.  Optionally, XFITDICT
     can  be  used  to  specify a PDB file for residue prototypes
     (any high-resolution file with all 20 amino acids  plus  any
     prosthetic  groups, waters, etc., you need).  PWD is used to
     override the current directory.  XFITPENTDIR gives the  name
     of  the  directory  containing pentamer data.  It is usually
     $XTALVIEWHOME/data/pdbvec.  You can copy pdbvec  to  another
     location  and  change  the  structures  used in the pentamer
     database by changing this environment variable.

     Control of the buffering  method  is  provided  through  the
     environment   variable  XFIT_DBUF.  Type  'setenv  XFIT_DBUF
     colormap' to get an image  with  less-than-  perfect  depth-
     cueing,  or  'setenv  XFIT_DBUF off' to get a better-looking
     image that flashes badly when you manipulate the view.

     See the README file in the $XTALVIEWHOME/data/pdbvec  direc-
     tory for more information.



COLORS

     xfit determines the screen depth and uses color if the depth
     is  8  bits  or  greater.  The color database is loaded from
     ./colors.dat if  available,  then  from  $XTALVIEWHOME/data/
     colors.dat.  Normally,  the  latter is used, but for special
     purposes the file can be overridden with ./colors.dat.  How-
     ever, none of the built-in default colors will make sense if
     ./colors.dat is completely different.  This option  is  nor-
     mally used to change the shades of the colors to more favor-
     able ones for different display devices.  For  example,  the
     author uses a separate colors.dat for making slides.  A lit-
     tle white has been added to the red, and the blue  has  been
     made closer to cyan in order to show up better on film.
     SUNs with GX cards use color double-buffering  to  make  the
     display  3 times faster. The drawback of this is that only 8
     colors are available and there is no depth-cueing.  See  the
     previous  XFIT_DBUF  description  under  "Environment  Vari-
     ables."

     Note: hardware double-buffering does  not  work  on  TurboGX
     machines.



MOUSE

     The mouse is used for rotations  and  translation,  picking,
     and  model  manipulation.  Your mouse should have 3 buttons:
     <Select> (left),  <Adjust>  (center),  and  <Menu>  (right).
     (You  can change the order of these buttons by editing lines
     in the ~/.Xdefaults file; see an XView or Open  Look  manual
     for more information.)

     To pick something, click the  <Select>  (left)  button.   To
     rotate something, hold the <Select> button down and drag the
     pointer.  Z rotations are done by dragging left and right in
     the upper portion of the screen. (On certain SGIs, the upper
     portion of the screen has a different  color.  In  a  future
     release  of xfit, the cursor will change to indicate whether
     it's controlling z or xy rotation and translation.)

     <Adjust> changes purpose, depending upon the mode (indicated
     in  the  lower  right corner of the screen). At startup, the
     program is in Center  mode;  drag  <Adjust>  to  center  the
     screen.   Drag  near  the  top of the screen to adjust the z
     postions.  To zoom the  image  in  or  out,  hold  down  the
     <Select>  and  <Adjust>  buttons simultaneously and move the
     pointer vertically.

     <Menu> brings up a menu that can be used to change the mode.
     The  modes Translate, Rotate, and Torsion are operative if a
     portion of the model has been selected  for  fitting.   Move
     and  Translate  work by dragging <Adjust> in the same way as
     for <Select> (described above).

     For torsions, you must first pick a vector around which  you
     want  to torsion (using <Select>).  Hit the tail of the vec-
     tor first (bond), then the head, and then select Torsion  in
     the  menu.  All  the  atoms bonded to the head and currently
     selected  are  included  in  the  torsion  group.   Dragging
     <Adjust>  left  and  right  torsions  the  group  about  the
     selected vector.

     Stacked torsions are not supported, although  once  you  get
     used to the "click-atom, click-atom, select-torsion" routine
     you can change torsions quickly. (Note that the pop-up  menu
     can be pinned for easier use).
     Several mouse options are available in the  Control  window.
     There  are  three  mouse  event modes: Fast, Jerky, and Skip
     Contours. Fast assumes the picture can keep  up  with  every
     mouse  event  and  draws each one.  Jerky skips ahead to the
     latest event, ignoring earlier  ones  so  that  the  picture
     "jerks."  Skip  Contours  does just that if the picture gets
     behind, allowing smooth rotation to  the  desired  view  and
     then when the event queue is empty the contours are redrawn.

     Determining which mode to use depends upon the computer  you
     are  using,  so  some  experimentation is in order.  You can
     also use the Control window to  set  the  size  of  a  mouse
     event.



KEYBOARD SHORTCUTS

     If a single residue is selected for fitting, the  side-chain
     torsions  can  be set up by hitting the appropiate number on
     the keyboard while the mouse pointer is in the  Canvas  win-
     dow.   For  example,  hitting  1  sets up chi1 and 2 sets up
     chi2.  This is much faster than picking atoms and  selecting
     Torsion.


     Dialbox
          If your computer is equipped with a  dialbox,  you  can
          use  them instead of the mouse to change the viewpoint.
          The dials are set up as follows:

                    Rotate Y            Translate X
                    Rotate X            Translate Y
                    Rotate Z            Translate Z
                    Zoom                Slab

          Holding down the <Shift>  key  while  rotating  a  dial
          moves  the current atoms in place of the <Adjust> mouse
          button.



SOME DEFINITIONS

     Xfit uses an atom stack for many operations.  All operations
     use  a prefix notation.  First the operands are selected and
     put on the stack; then  the  command  is  given.  Atoms  are
     pushed  onto the stack in two ways: by picking on the screen
     and by picking from the atom list in the Model window.

     Internally, xfit uses the following  hierarchy  to  describe
     models:  a  molecule  is all the atoms given in a single PDB
     file.  A chain is all the atoms with the chain-ID column set
     to  the  same  value  in the PDB file.  A residue is all the
     contiguous atoms with the same residue-ID in  the  PDB  file
     and  an  atom  is  a single line in the PDB file that begins
     with either ATOM or  HETATM.   Additionally,  the  user  can
     specify  a  group  in  the model window that is an arbitrary
     grouping of residues.  Lines derived from bonds  and  points
     are  drawn  on  the  screen.   Any  atoms within a specified
     radius in the same residue are bonded. The exception is pep-
     tide  bonds,  which  are made if the N-C distance is reason-
     able.  If two  adjacent  residues  contain  only  single  CA
     atoms,  they  are  bonded if they are less than 4.5 A apart.
     The leftover points (such as water) are drawn as three short
     orthogonal lines, or a jack.  Other polymers such as DNA and
     carbohydrate are not connected  (well,  this  is  a  protein
     crystallography program...).  Atoms have names such as CA or
     CB, an occupancy, a B-value, and x,y,z  coordinates.   Resi-
     dues  contain an array of atoms and have a name such as 1 or
     152 and a type such as ALA, HEM, or H2O.  Chains are  speci-
     fied by a single character.  Molecules are referenced by the
     original filename.

     PDB files have a  record,  CONECT,  which  can  be  used  to
     specify  a  bond  between any two atoms.  These residues are
     read and the specified bonds put in a special list  so  that
     these bonds are always made regardless of geometry.  This is
     useful for connecting prosthetic groups to the protein  such
     as thio-ether linkages or metal ligand bonds.  If you make a
     bond in xfit, use the Bond command, and then save the model,
     the CONECT information is written at the end of the file and
     will be read the next time the model is loaded.



CONTOURING METHODS

     Contours are iso-values in an  electron  density  map.  Five
     levels  are  provided  in xfit.  The map is scaled such that
     one sigma is equal to 50.  The startup  contour  levels  are
     1,2,3,4,5  sigma  and can be adjusted later.  The contouring
     algorithm is fast but not always  pretty  (for  instance  it
     makes  no  attempts  to  resolve saddle points). To make the
     contours prettier, use a finer map.  Three times the maximum
     h,  k, and l are usually about right. (The maximum index can
     be found from (cell edge)/dmin).  If you have one long axis,
     then this one can be made twice and will still look fine.  A
     large number of contours can  slow  rotations.   One  useful
     option  is to select the Skip Contours option in the Control
     window.  This causes the program to skip drawing contours if
     it  cannot  draw  the contours between mouse events and then
     re-draw them when rotations stop.  Since the model  is  usu-
     ally  being  used as a guide to the eye for rotations, drag-
     ging the map along is not always necessary. In this way, you
     can speed up rotations considerably.

     Contouring Method in the Contour Map window may  be  set  to
     "Cube,"  "Sphere,"  "Different  Axes,"  or "Blob." The first
     three methods define the  density  as  bounded  by  a  cube,
     sphere,  or  oblong  box,  respectively.  "Blob"  (the  name
     derives from an old program of Colin Broughton's that  could
     draw either a box-shaped or a blob-shaped map) specifies the
     density to be rendered as being within a specific radius  of
     any of the current atoms. (The blob map changes whenever the
     current atoms change. This is useful when one wants to  con-
     fine  one's  attention to density near where one is fitting;
     but to preserve a blob map, one should make a vu object from
     it.) "Cube/Sphere Radius" specifies the radius of the sphere
     for the Sphere method, or the half-width of the cube for the
     Cube  method.  A Axis, B Axis, and C Axis specify the dimen-
     sions for the Box method. "Extend blob around current  atoms
     by" specifies the radius for the Blob method.



RIDGELINES

     If you have access to GRINCH, use the mkskel program to pro-
     duce  an  ASCII  ridgeline  file  or  use  the  ASCII  'save
     filename' option in interp. This file can then be  converted
     to  a  form  usable  by xfit with grinchbones (see the grin-
     chbones man page), and is read in as a vu file.

     Xskel is an interface to mkskel and produces output that can
     be  read  directly inthe File window. For xskel to work, you
     must have a copy of mkskel, whose location  is  included  in
     your PATH variable.

     You can also interactively change the contour level and  box
     size.   To  pick  an  edge,  set the Pick mode to edges.  To
     color an edge, select the type you want to color  the  edge,
     select  the Color Edges Pick mode and then pick the edge you
     want to color.  An entire side chain can be colored at  once
     by  setting  the  pick  mode  to edges, then pick an edge to
     place it on the stack and then push Color Side  Chain.   The
     last color side chain can be undone with the Undo Color but-
     ton.  The regular model building features  of  xfit  can  be
     used to build models over the ridgelines.



BACKGROUND OBJECTS

     To build complex background  objects,  layer  individual  vu
     objects in the View window.  Each vu object can be turned on
     and off using the Show window.  For example, you can make  a
     vu  object with side chains and another with mainchain.  The
     sidechains can then be blinked on and off by clicking on the
     appropriate  line  in  the  vu list.  Individual residues of
     interest can be colored individually.  Multi-colored objects
     are composed by building up from individual pieces.  Objects
     with  a  higher  number  overdraw  lower-numbered   objects.
     Models  overdraw  vu  objects,  so turn off the model to see
     coincident vu objects.

     Hint: Use several individual objects instead of a  few  com-
     plicated objects.



COLORING

     1.   Pop up the Color window.

     2.   Select a color by clicking on it.

     3.   Select the correct object (if necessary).

     4.   Apply the color by clicking on the appropriate  button.
          (This sets the object to the current color.)

     There are two places where  the  option  color  C*  only  is
     given. This means that only the carbon atoms are colored and
     the others are colored by atom type in the usual way (i.e. N
     is  blue,  O  is red, H is white, Fe is brown, S is yellow).
     In addition, in the view window the option  color-by-B-value
     is given.  In this case the coloring is according to B-value
     in the same way as described for normalized B-values in  the
     section on colorbyB.

     In the color window you will see 4  shades  of  each  color.
     This  lets  you  see the effect of deth-cueing on the color.
     On 8-bit machines these are  the  depth-cueing  colors.    A
     line  is drawn in 4 different intensities depending upon its
     average z-value.  On 24-bit machines the line is  depth-cued
     by  interpolating  from  the front to back.  Colors.dat con-
     tains 4 intensities for each color.  For instance,  for  red
     there are four entries: red, red1, red2, red3.

     To change the depth-cueing you change the four colors  where
     red  is the foreground and red4 is the color of the farthest
     point. This is probably best done by a computer program from
     a file containing just one entry for each color.  Each color
     display works best with a different amount of depth-cueing.

     Postscript coloring is always done in terms of RGB  triples,
     and  the  color for the foreground is taken from colors.dat.
     Depth-cueing is done by multiplying  the  rgb  values  by  a
     scale  factor from 0.25 to 1.  The value 0.25 can be changed
     in the control window.  The author has found that  different
     color  PostScript  devices  work best with a different value
     for the minimum.  For  instance,  the  dicomed  slide  maker
     needs  a  value  of  about 0.1 and the QMS-100 color printer
     works better with about 0.3.



LEAST-SQUARES FITTING

     This can be used to superimpose two models  or  portions  of
     the models, as a comparison tool, or to speed up fitting. It
     "roughs in" the model using edited residues with only CA  or
     CA  and CB residues (put these in the dictionary with a type
     such as CBA).  Then standard protein pieces such  as  alpha-
     helices,  beta-sheets,  tight-turns,  etc.,  are  read in as
     extra models (up to 49 of these, plus  your  working  model)
     and  then  least-squares-fit  to  the markers.  Overlaps are
     deleted and then read out and concatenated to form the whole
     molecule.   The  initial  geometry  will be better, giving a
     faster  refinement.   More  complicated  fittings  that  use
     unconnected  segments  can  be  done with the program pdbfit
     instead, and then loaded into xfit.



FFT

     xfit includes a reworked FFT routine from Lynn Ten Eyck that
     provides a fast way to calculate electron density and struc-
     ture factors.  The electron density calculation is done with
     the  FFT  pop-up and structure factors are calculated on the
     sfcalc pop-up.  The FFT pop-up  can  be  used  to  calculate
     electron density directly from structure factors using coef-
     ficients such as Fo, Fc, Fo-Fc, 2Fo-Fc.  It is usually  fas-
     ter than reading a precalculated map file and lets you rede-
     fine the grid and the resolution range  at  any  time.   The
     same  phase  file  can  be  used to make both an Fo-Fc and a
     2Fo-Fc map.  It also saves a lot of disk space.   Say  good-
     bye  to  map  files!   The  whole unit cell is available, so
     there is no need to worry about map boundaries.

     Note: Make sure the correct crystal is specified beforehand!

     Structure factors can also be calculated by  FFT.   In  this
     case  the  only information needed to make maps are the Fo's
     and the coordinates of the model.  Make up a phase file with
     h  k  l  Fo 0.0 0.0 and read this in.  Make sure the correct
     crystal is selected before reading.   Then  use  the  sfcalc
     window  and  select  "calculate all and scale".  You can now
     make omit maps and update phases.

     There are two ways to calculate structure factors:  FFT  and
     summation.   FFT  is  fast and introduces an error typically
     about 1%.  In general this is the way to go.  The only  time
     the summation is faster is if you are doing a single atom.

     The FFT is done in two parts:  first, a model of  the  elec-
     tron  density  is  built from the atom coordinates and their
     structure factors; then this map is inverted  by  FFT.   The
     FFT  is very fast, and for the entire model the rho building
     step takes the longest.  However, for a single  residue  the
     rho  building  is very quick and the entire FFT time is less
     than the corresponding summation time.

     The only instances in which summation  is  needed  are  when
     extreme  accuracy  is needed (given the error in our coordi-
     nates, we can't see when this would be needed) and if  there
     isn't enough memory to build the entire unit cell's rho.

     Note:  In centered space groups it is common to  not  calcu-
     late the centered symmetry operations to save computer time.
     If this is done, Fc will be lower than absolute scale.   For
     instance,  in  C2  the Fc will be half of its correct value.
     Use the full symmetry operators as is the case  if  you  use
     the crystal editor with xtalmgr.



OMIT MAPS ON THE FLY

     To make an omit map, select the atoms  to  be  omitted  (see
     "How  to  Select")  and  then  select the omit current atoms
     option in the structure Factor (sfcalc)  window.   Structure
     factors  are calculated for the currently selected atoms and
     subtracted from the model structure factors.  Then  use  FFT
     to make either an Fo map or a 2Fo-Fc map.  This assumes that
     you have read in some phases and that Fc has been previously
     calculated  on an absolute scale (Fo is scaled to Fc).  This
     can be done using Calculate All and Scale.

     Note: Partial models (such as missing  residues  or  waters)
     cannot  be  used to make omit maps with Fo-Fc or 2Fo-Fc maps
     because the  relative  scale  of  Fo  to  Fc  is  incorrect.
     Instead,  use  Fo  maps.   This  is also true of models that
     still have a large amount of error where Fc is still inaccu-
     rate (i.e., R-factors above about 0.25).



UPDATING PHASES ON THE FLY

     As you move the model, its phases change  because  they  are
     calculated  from  the  atom  positions.   You can either re-
     calculate  the  phases  from  all   of   the   model   using
     sfcalc.calculate_all_and_scale,  or  you can update just the
     portion being fit (which is much  faster).   In  this  case,
     after  you  move the currently selected atoms you can select
     sfcalc.update_current and then re-FFT the map.   Update  All
     subtracts the old position from the phases and then adds the
     new position.  As the residue is moved you can calculate the
     corresponding map and compare it.  For example, if there are
     two likely positions for a side chain you  can  move  it  to
     both  positions  and see which matches its corresponding map
     best.  When you are finished fitting, select update  current
     just before applying the fit to match the map.



DIFFERENCE MAP GRADIENT

     At the bottom of the SFCalc pop-up is  a  section  used  for
     calculating  the  gradient  of  the difference density at an
     atom.  This is represented as an arrow in the  direction  of
     the gradient scaled to its steepness or magnitude.  It shows
     the direction an atom will move in  the  first  cycle  of  a
     crystallographic refinement.

     The command implements the equations in  Stout  and  Jensen,
     2nd  ed. pg. 349.  It is useful for such things as analyzing
     mutants to look for the direction of movements and  to  look
     for  concerted movements of groups of atoms.  It uses a slow
     summation method if res < 3 and uses FFT if res > 3, so  can
     take quite a long time for large numbers of atoms.  You must
     first load some  phases.   The  command  works  on  the  map
     currently  selected at the top of the window.  Set the Deriv
     vu number to a free vu object.  The Sign of Delta is usually
     Fo-Fc,  but  to  reverse  the direction of the arrows select
     Fc-Fo.  The Scale Arrows x  100  slider  sets  an  arbitrary
     scale  for  the length of the arrows.  To start the calcula-
     tion, select the Derivatives of Current Atoms button.



SELECTING A MODEL

     A model is selected for fitting or structure factor calcula-
     tion  by  first putting the appropriate atom(s) on the stack
     and then selecting one of the fit options.  To put  an  atom
     on  the  stack,  pick  it  on the screen or select it in the
     Model window (see below).

     If you push Atom, the atom  on  the  top  of  the  stack  is
     selected.  If you push Atoms, all the atoms on the stack are
     selected.  Residue selects the entire residue that  contains
     the atom on the top of the stack. Residues selects all resi-
     dues that contain an atom on the entire stack. Group selects
     all the residues in the same group as the residue containing
     the atom on the top of the stack.  Groups  are  set  in  the
     Model  window.   Molecule  selects  the  entire  model.  The
     selected atoms are referred to as the current group.   Bond-
     ing is irrelevant.

     Use the Clear Stack button before setting up atoms or  resi-
     dues.  If you are dissatisfied with your selection, hit Can-
     cel.  Reset puts you back to your  starting  positions,  and
     Apply  commits  your  fit.  You can undo the last 20 fits by
     pressing Swap.

     When Model is selected for fitting, its  old  positions  are
     saved  in  one  of 20 slots.  Select the slot containing the
     model to be undone and then Swap  will  toggle  between  the
     saved  and fit model.  Judicious users will still save their
     model to disk often with the Save button.



SHOW WINDOW

     Objects can be hidden by selecting them on the list  in  the
     Show  window.   Useful information about each object is also
     given to identify it.  A  difficult-to-identify  object  can
     often  be found by toggling it on and off.  Hide all objects
     that are not needed to increase the rotation speed.   Object
     blinking  is  set up here (see Blinking, below).  Also, con-
     tacts can be cleared in this window.



CANVAS WINDOW

     Objects are draw in the Canvas window.   On  SGIs  and  SUNs
     with  XGL,  the  Canvas  menu  in  the  main  window has two
     options: Accelerated Canvas and PostScript  Preview  Canvas.
     Accelerated  Canvas  is the default. The two canvases differ
     in the following ways:


     *    The Accelerated Canvas has faster graphics.

     *    On SGIs that support z-buffering, the Accelerated  Can-
          vas  is  z-buffered.   In the PostScript Preview Canvas
          (and in actual PostScript output),  models  are  always
          drawn  in front of density maps. In the Accelerted Can-
          vas, the model and the map are interlaced.

     *    The z-clipping of the  picture  is  different.  In  the
          Accelerated  Canvas,  if  a vector crosses a z-clipping
          plane, the part of the vector lying inside the clipping
          box  is shown. In the PostScript Preview Canvas (and in
          actual PostScript output), such a vector appears either
          in its entirety or not at all, depending on whether its
          midpoint is within the clipping box. In both  canvases,
          part  of  a vector will appear if the vector crosses an
          x- or y- clipping plane.

     *    Line thickness depends both on the canvas  and  on  the
          platform. The line thickness of an object is 1,

          --   in the PostScript Preview Canvas on both  the  SUN
               and  the  SGI,  multiplied by 2 if it's the active
               model;

          --   in the SGI Accelerated Canvas, multiplied by 2  if
               it's the fragment of current atoms;

          --   in either SGI canvas, multiplied by the Line Width
               set for that object in the Files->Plot menu.

     *    In actual PostScript output, line thickness is the same
          as  in  the  SGI  PostScript Preview Canvas. In the SUN
          Accelerated Canvas,  the  thickness  of  everything  is
          always 1.

     *    Depth-cueing in the Accelerated  Canvas  is  controlled
          with  the  Depth Cue slider in the Control menu. Depth-
          cueing in the PostScript Preview Canvas (and in  actual
          PostScript  output)  is  controlled  with the Depth Cue
          slider in the Files->Plot menu.

          A ruler is drawn at the bottom of the screen  with  the
          scale in Angstroms.  Objects can be dragged over to the
          ruler for measurement.  In the upper is a  gnomon  that
          shows the laboratory axes.  In the lower right, a small
          advertisement appears.  The <Menu> button  pulls  up  a
          menu  that  can  be  pinned  and left up permanently if
          desired. By using the pull-up menu, you can avoid  con-
          stantly  moving back and forth between the screen and a
          side menu.

          The menu items are:


     Center at pick
          Centers at the last atom or edge picked.


     Center mode
          Puts mouse in center mode where  ADJUST  (middle  mouse
          button) moves the center of screen.


     Translate mode
          Current atoms can be translated with ADJUST.  Note  the
          difference  between  this  and center - they are easily
          confused. A common mistake is to forget to go  back  to
          center mode to move the screen center.


     Rotate mode
          Current atoms can be rotated with ADJUST (middle  mouse
          button).


     Torsion mode
          Two ends of a current bond are first picked.  The atoms
          attached to the second end will become a group that can
          be torsioned around the selected bond.  The atoms  must
          all be in the current group.


     Contour
          Contours at the center of the screen using  the  values
          in the contour window.


     Atom Selects the last-picked atom.


     Atoms
          Selects all of the atoms in the stack.


     Residue
          Selects the residue to which the top atom belongs.


     Group
          Selects the  group  to  which  the  top  atom  belongs.
          (Groups are set up in the model window.)


     Molecule
          Selects the entire molecule of which  the  top  of  the
          stack is a member.


     Rotate X clockwise 90 degrees


     Rotate X counter-clockwise 90 degrees


     Rotate Y clockwise 90 degrees


     Rotate Y counter-clockwise 90 degrees
          The two rotate Y commands  are  especially  useful  for
          centering  an  object  in density.  First center in one
          view  then rotate Y 90 to fix the third  direction  and
          then rotate Y -90 back to the starting view.


     Rotate Z clockwise 90 degrees


     Rotate Z counter-clockwise 90 degrees


     Toggle stereo
          Toggles stereo mode.



MOUSE FUNCTIONS IN THE CANVAS WINDOW

     Use the <Select> (left) mouse button to:

               Click               Pick atom
               Drag                Rotate view x-y
               Drag top of screen  Rotate z
               Drag + <Shift>      Zoom
               Drag + <Ctrl>       Rotate Z

     The function of the <Adjust> (middle) mouse  button  depends
     upon  its  mode,  which is set with the <Menu> (right) mouse
     button. The default translates the view.

     The <Menu> (right) mouse button brings up the  fitting  menu
     to rotate, translate, and change torsion. It also allows you
     to change the mode of the middle mouse button to allow  fit-
     ting  of  the  currently seleced model.  Center restores the
     Translate View mode.

     To scale or zoom the view, press the left and  middle  mouse
     buttons simultaneously.



KEYBOARD SHORTCUTS

     You can use the pointer in the Canvas window for the follow-
     ing keyboard shortcuts.


               i                   Zoom in
               O                   Zoom out
               H/L                 Rotate y
               U/N                 Rotate x
               J/K                 Rotate z
               R                   Rocking ON
               r                   Rocking OFF
               x                   Look down x axis
               y                   Look down y axis
               z                   Look down z axis
               S                   Turn side-by-side stereo ON
               s                   Turn stereo OFF
               <ESC>               Toggle hardware stereo


     If a single residue is being fit, use the following keyboard
     shortcuts.


               1                   Set up torsion CHI1
               2                   Set up torsion CHI2
               3                   Set up torsion CHI3
               4                   Set up torsion CHI4
               5                   Set up torsion CHI5


     To center on an atom, pick the atom and then choose Center @
     with the <Menu> mouse button.

     To go to a specific x,y,z, open the View  window,  edit  the
     center, and click on Set View.



LABELS WINDOW

     Labels can be controlled and edited in  the  Labels  window.
     (The Control window contains the control for labeling picked
     atoms or not.)   For an arbitrary label, pick an  atom  near
     where  you want the label to go and then pick the atom.  The
     new label will show up at the bottom  of  the  list  in  the
     Label  window.  Select the label in the label list.  You can
     then edit the fields for the label string and its offsets in
     x  and  y;  then select Replace.  The offsets in x and y are
     pixels from the x,y,z coordinates  of  the  label  that  are
     independent of the rotation matrix and the scale.  To delete
     a label, select it on the list  and  click  on  Delete.   To
     remove all labels, select the appropiate command in the main
     window.

     To edit a label, select it on the list, edit the  field  you
     wish  to change, and then select Replace.  New labels can be
     entered here.  The current center can be popped and used for
     an  arbitrary  label.   You can also set the label style and
     select the point size  of  the  labels  when  plotted.   All
     labels will have the same size.  The pixel offset on x and y
     is useful for moving labels into clear space so  they  don't
     overlap  other  objects.    When  labels are plotted, a drop
     shadow is plotted around them to make them stand out if they
     do overlap other objects.

     A "contact distance" label changes to  reflect  the  current
     distance  as the model moves. It is not editable.  See "Con-
     trols Window" for more information.



CONTROLS WINDOW

     Several miscellaneous controls are located in  this  window.
     Mouse  Damping  controls  how  far  the model rotates with a
     mouse movement.   The drawing mode Fast  draws  every  mouse
     event.   If  the  computer  is  taking too long to draw each
     event, then the model may keep moving after  the  mouse  has
     stopped.

     The Jerky mode will prevent this by skipping  ahead  to  the
     end  of  the  event  queue. (This mode does not work well on
     some SGI machines.) The Skip Contours mode will skip drawing
     the  contours if the event queue gets too long.  This allows
     the model to be rotated into position and then the  contours
     will re-draw when the event queue empties.

     The Pick mode defaults to only  picking  the  active  model.
     This  allows  picking  of superimposed models by locking the
     others out.  In the Pick  All  mode,  the  closest  atom  is
     picked.   If  two  atoms  are in the same position, then the
     last one in the display list is chosen.  The  Pick  mode  is
     also  controlled by a toggle in the Ridgelines window, which
     switches the Pick mode from Model to Ridgelines.

     To pick symmetry related edges, the mode must be All.

     The Symmetry Radius controls the size of  the  box  searched
     for  symmetry-  related  atoms.  Making this very large will
     slow things considerably, since  the volume increases  as  a
     power of three.

     The Rocking Range and Rocking Rate are  controlled  in  this
     window.   Xfit  uses a timer that is supposed to be machine-
     independent, but it actually isn't; therefore,  the  Rocking
     Rate is different on different machines.

     The Depth-Cueing slider controls how thin the back lines are
     relative  to the front lines when plotting in the depth-cued
     mode.  It also controls the percent saturation of  the  back
     color to the front color when plotting in the Color mode.

     Contacts are also controlled in this pop-up.  A contact is a
     dashed line drawn between two atoms with the distance at the
     mid-point shown in Angstroms.   You can turn on/off  drawing
     contacts  whenever  the distance function is used.   You can
     also enable contacts to be drawn for picked atoms.   A  max-
     imum  radius  for  this  search can be set.  The mode can be
     Off, all atoms within the specified radius  (All),  or  only
     between  atoms  in  a different residue (Inter-Residue).  As
     the model is fit, these distances will update.



BLINKING

     The Show window contains controls that allow you to  set  up
     two blink groups and then alternately blink them on and off.
     First, highlight all the groups you want in one set and make
     sure the others are unhighlighted.  Then select Set Group 1.
     Now, unhighlight group 1, highlight group 2, and select  Set
     Group  2.   Objects  not  included  in either group will not
     appear.  Objects in both groups will stay on all  the  time.
     You  can  turn  on and off blinking and you will not need to
     reset the groups unless you want to change them.  The  speed
     of the blinking is set on the Control window.



REFINE WINDOW

     The Refine window is split into two parts.  The  upper  part
     is  for real-space refinement and the lower part is geometry
     refinement (early versions of xfit lacked  geometry  refine-
     ment).   In  real-space  refinement,  you  select the map to
     refine the active model against.  You  can  select  Transla-
     tional, Rotational, or Torsion search.   The torsion must be
     already selected or nothing will happen.  In good cases, the
     model  will  be moved in the mode specified until the sum or
     electron density at each atom is maximized.  This works well
     for  torsion  searches  with  only one axis (i.e., Phe works
     well but Arg does not)  to  search.   Translate  and  Rotate
     often try to move into density that is connected but already
     belongs to another atom (i.e., the neighboring residue).

     Geometry refinement (minimization) can be done in two  ways.
     The  entire  model can be refined by simply selecting Refine
     Active Model.   Be sure to save the model first, since  this
     cannot be undone.

     The ideal bond distance and angles are taken from the  resi-
     dues  in  the  dictionary  file (see below) by using them as
     guides.  This is done to allow different ideal  lengths  for
     different refinement packages. Also, this allows one to have
     all hydrogens, no hydrogens, or partial hydrogens. The resi-
     dues  in  the dictionary should be refined by the refinement
     program you are using.  This will then maximize  the  agree-
     ment  between  xfit and the refinement program as to correct
     geometry.

     Planes are specified in  the  geometry  file  with  the  PDB
     extension record PLANE.  This specifies the residue type and
     the atom types in the plane. For example:

               PLANE ASP 4 CB CG OD1 OD2

     Since planes are supposed to be flat, it is not necessary to
     specify the ideal value.

     Connectivity is assessed by a variety of  criteria.   First,
     if  in  the  original  PDB file a TER record was found, this
     marks a C-terminus and no attmpt will be made to form a pep-
     tide  bond.  Second,  if the 'chain id' letter changed while
     scanning the file, this also marks a C-terminus.  Third,  if
     the  residues  have recognizable names such as an amino acid
     (e.g., ALA, Ala, ala, or A), then a search will be made  for
     the  proper  atom types for a peptide bond and plane (CA, C,
     O, +CA, +N, [+H]) and if the N and C atom are within 5.0  A,
     a peptide bond, angles and plane are formed.

     The algorithm for drawing lines representing bonds  is  dif-
     ferent and less stringent in order to speed up rebuilding of
     lines for display purposes.  If incorrect bonds are drawn on
     the screen, they will NOT show up in the refinement.

     The second refinement method is to refine a portion  of  the
     model.  Click on (or select) an atom in the model window and
     put two residues on the stack.  Now use each of the pop but-
     tons  to  get  these two residues in the Start At and End At
     fields (you cannot type these values in).  Then  select  Set
     Up  Refinement  Residues  and  the selected residues will be
     highlighted on the screen.  When you press Refine,  a  round
     of  refinement will be done.  If you select the Refine While
     Fitting option, then the selected portion will be refined in
     the background while you fit.  You can then select a residue
     for fitting within the segment being  refined,  and  as  you
     move  it  around,  the rest of the segment will follow along
     and the geometry will anneal as you fit.



DICTIONARY

     The dictionary file is simply a PDB file with an example  of
     each  residue.   If the environment variable XFITDICT is set
     then this file is loaded upon start-up  as  the  dictionary.
     The  dictionary  can  also  be loaded and appended to in the
     File window.  This is not used as  a  geometry  file.    New
     residues  are found by finding the first residue in the dic-
     tionary that has the same name.  When a residue is  replaced
     a  residue  of  the same new type is found in the dictionary
     and least-squares-fit to the old one.    The  standard  dic-
     tionary is in $XTALVIEWHOME/data/dict.pdb.    The dictionary
     can be appended to upon loading, or  replaced.   The  append
     mode  allows you to add a prosthetic group without having to
     mess up the the standard dictionary.   The first residue  in
     the  dictionary is used if there are multiple copies.    All
     of the unique residues in the dictionary appear in  the  the
     model  window  from  a pull-down menu button to the right of
     the residue type field.  Selecting one of these  names  puts
     this  value  in  the  residue  type  field  and  can then be
     accessed with the insert commands.




SCRIPT COMMANDS

     xfit can accept commands from a  script  file.   The  script
     commands  can  substitute for many of the interactive opera-
     tions, and some operations can only be done from the script.
     One  use  of  the  script is to return to a given view.  The
     Save View command writes a script file that when run returns
     xfit to a given viewpoint.  Load View is just another method
     of running this script.

     Another common use is to build  complex  figures  with  many
     parts.  The script also gives more control over line-widths,
     allowing different widths to be set for each object.   There
     are  also some animation commands such as 'roty' that rotate
     the view around y.

     The script window can  be  accessed  from  view.edit_script.
     Scripts  can  be  run  and  edited  by loading them into the
     Script window.  The script can be altered and then re-run to
     see  the effect of the edits.  Every time the script is run,
     it is first saved and the old script moved  to  file.script%
     (the  filename  with  a % added). Scripts can also be loaded
     from the command line if they have the  extension  '.script'
     or '.vp' (for viewpoint), at which time they are run.

     For example, the command 'xfit my.pdb save.vp  my.map'  will
     load  the  PDB file, switch to the new viewpoint in save.vp,
     and load and contour the map.  The size and location of  the
     canvas  can  also  be  saved.   A  line starting with '#' is
     interpreted as a comment.


  GENERAL COMMANDS
     crystal value


     loadpdb modelnumber file


     loadpdbcenter modelnumber file


     loadmap mapnumber file
          load fsfour format maps


     loadmapphases mapnumber file
          load map phases (follow with fftapply)


     plottofilecolor file


     plottofileb&w file


     plottofileb&wdepthcued file


     plottoprintercolor printer


     plottoprinterb&w printer


     plottoprinterb&wdepthcued printer



  OBJECT BUILDING COMMANDS
     color value
          This sets the current color. The value  is  either  the
          xfit  number or a name; i.e., yellow is 56 or "yellow."
          Buildvu uses the current color to paint its  lines,  so
          set the color first.


     colormodel modelnumber
          model modelnumber is recolored to current color


     colormodelatom modelnumber
          as above except that atoms are  colored  by  atom  type
          except C* atoms which are set to current color


     vulinewidth value
          sets the line width in plotted output  for  all  subse-
          quent buildvu commands


     buildvu key modelnumber vunumber first_res last_res  chainid
     atomfilter

          use * to indicate any.

          atomfilter  should  be  separated   by   commas   (i.e.
          "CA,CB,C,N,O")

          key is one of:

               side = protein sidechains

               main = protein mainchain

               other = non-protein

               all = side, main, and other

               link = link CAs

               peptide = peptide planes

               hbond = H-bonds


     Object Building Example: build the backbone of model  1  and
     show 2 key residues:

          color red
          Buildvu link 1 1 * * * *
                    # links CA's of model 1
          color green
          buildvu side 1 2 18 18 * *
                    # side chain of residue 18 in green
          buildvu side 1 3 218 218 * *
                    # side chain of residue 218 in green



  VIEWPOINT TRANSFORM COMMANDS
     zoom value


     frontclip value


     backclip value


     translate x y z


     rotation vxx vxy vxz vyx vyy vyz vzx vzy vzz
          the way to get this is view.save to  a  file  and  then
          read in the file to the script editor


     transform
          the  viewpoint  commands  don't   take   affect   until
          transform  is  given  so  that  all transformations are
          applied at once


     rotx value


     roty value


     rotz value
          These take effect immediately - they are used  to  make
          "movies."


     stereo on


     stereo off


     canvasrect left top width height
          This sets the position and size of the  canvas  window.
          The first two set the position of the upper left corner
          of the window and  the  next  two  set  the  width  and
          height.  The units are pixels.


  SHOW AND HIDE OBJECTS
     showmap mapnumber


     hidemap mapnumber


     showmodel modelnumber


     hidemodel modelnumber


     showvu vunumber


     hidevu vunumber

     bond  modelnumber1  resid1  atomid1  chainid1   modelnumber2
     resid2 atomid2 chainid2

          draws a line between two atoms.  chainid can be *


  ATOM LABELING COMMANDS
     labelpoints value
          sets the point size of label in plotted output


     labelstyle value
          sets the label style according to:

          0 = GLU 100 CA
          1 = GLU 100
          2 = GLU
          3 = 100 GLU CA
          4 = 100 GLU
          5 = 100
          6 = CA
          7 = none


     atomlabel modelnumber resid atomid chainid
          forms a label of the type set by labelstyle (default 0)



  MAP CONTOURING COMMANDS
     maptocontour mapnumber
          sets the map to contour for all subsequent  commands  a
          map load will overwrite


     contourlevels value
          levels are turned on and off by adding numbers as  fol-
          lows:

          1= level 1
          2= level 2
          4= level 3
          8= level 4
          16=level 5

          thus to turn on levels 1 and 3 only is 1 + 4 = 5.


     contour1level value


     contour2level value


     contour3level value


     contour4level value


     contour5level value
          contour level _x_ at value


     contourradius value


     contourcolor value
          set level value of the current map to the current color


     contourmap
          contours current map at current center


  FFT COMMANDS
     resmin value


     resmax value

     coefficents value
          Note misspelling.  Value is one of the following:

          Fo
          Fc
          2FoFc
          Fo-Fc
          Fo*Fo
          Fo*fom
          3Fo-2Fc


     fftnumber mapnumber


     fftnx value


     fftny value


     fftnz value


     fftapply


  COMMAND SCRIPT EXAMPLE 1:

# This script was used to make two electron density


# maps with and without figure of merit weighting to


# illustrate the difference



crystal cvccp



# make the model thicker than the map to aid in


# distinguishing



maplinewidth 0.7


modellinewidth 3.0


loadpdb 1 cvccp.topdb.pdb



#the viewpoint lines are from the save viewpoint option



translation 24.965 34.205 68.649


rotation 0.6916 -0.3000 0.6570 0.6543 0.6455 -0.3941 -0.3059 0.7024 0.6427


zoom 31.10


frontclip 4.60


backclip -3.30


stereo on


transform



#load the map phase and transform


loadmapphases 1 cvccp.mir.phs


resmin 3.0


coefficents Fo


fftapply



# set the contour options and contour the map



contourlevels 1


contour1level 50


contourradius 10


contourmap


plottofileb&w mir.fo.ps



# change the coefficients of the FFT and compute a second map



coefficents Fo*fom


resmin 3.0


fftapply


contourlevels 1


contour1level 50


contourradius 10


contourmap 1


plottofileb&w mir.fofom.ps



  COMMAND SCRIPT EXAMPLE 2:

# this example builds up vu objects. A backbone of


# the A chain is built and then particular side chains


# are displayed and labeled. If a mistake is made it


# is much easier to edit the script than to start over


# in interactive mode. Also the script can be saved


# to re-make the figure at a later time.



stereo on


loadpdb 1 cvccp.pdb


labelstyle 1


hidemodel 1


color 56


vulinewidth 2.0


buildvu side 1 1 * * A *


buildvu main 1 2 * * A *


buildvu other 1 3 * * A *


vulinewidth 0.9


buildvu side 1 4 * * B *


buildvu main 1 5 * * B *


buildvu other 1 6 * * B *


atomlabel 1 16 CG A


atomlabel 1 16 CG B


atomlabel 1 18 CB A


atomlabel 1 18 CG B


atomlabel 1 132 C1A A


atomlabel 1 132 C1C B


atomlabel 1 21 CD1 B


atomlabel 1 21 CZ3 A


translation 30.810 34.796 60.196


rotation 0.8504 -0.5256 -0.0256 0.5256 0.8507 -0.0075 0.0257 -0.0071 0.9996


zoom 19.8


frontclip 2.60


backclip -8.10


transform




MODEL WINDOW

     The currently active model is listed in  the  Model  window.
     When  a  residue is selected, the atoms in that residue show
     up in the atom list.  When an atom is picked in this window,
     it  is  put  onto  the  atom stack.  It can then be used for
     stack-based operations such as 'center' or 'distance.'  This
     is the quickest way to center on a particular residue.

     When a residue is selected, it is  highlighted  and  becomes
     the  focus  residue. Its information is listed in the bottom
     of the window in the Type and Name fields. Several  residues
     can be highlighted, but only the last one is the focus resi-
     due: the one that is in the lower fields. Highlighted  resi-
     dues  can  be  grouped together in a single group. An entire
     group can be moved as  a  unit  after  being  selected  (see
     above). A group number above 0 must be chosen, since 0 means
     ungroup.

     Before selecting a group, it may be wise to clear all selec-
     tions  to  prevent  residues that have scrolled off the list
     from being accidentally added.  Residues may be deleted with
     the  Delete  button.   They  can be undeleted at any time by
     hitting Delete again. The only way  to  clear  the  list  of
     deleted  residues is to write the model out and read it back
     in again. The Insert button has  a  pull-down  menu  with  a
     number  of features. You can insert a new residue before and
     after the focus residue: First select the  insertion  point;
     then edit the name and type of the residue. All of the types
     in the dictionary will be listed in the  pull-down  menu  at
     the  end  of  the  Type  field. Then select Insert.Before or
     Insert.After. The new residue will appear in the  center  of
     the screen.  Insert.Replace is similar, except the new resi-
     due is least-squares fit to the focus residue  and  the  old
     residue  is  deleted.   Thus,  a  replace  can  be undone by
     undeleting the old residue and deleting the new residue.

     At the end of the Insert menu is a Pentamer pull-right menu.
     If  it  is grayed out, the pentamer information and programs
     have not been installed (see above).   The  pentamer  option
     allows  least-squares  fitting  a pentamer with one that has
     the closest geometry from a list of well-refined structures.
     The  middle  three  residues  can  then be replaced with the
     pentamer residues.  The only atoms that need to  be  in  the
     target pentamer are CA atoms.

     The quickest way to build a protein model is to place single
     CA  atoms (type 'MRK' in dict.pdb) in the density.  Keep the
     CAs in order as much as possible, since their order  matters
     for  the pentamer fitting.  Pick the first residue of 5 con-
     tiguous  residues  in  the  residue  list  and  then  select
     Insert.Pentamer.Best_fit_pentamer.  A pentamer should appear
     as a separate model least-squares fit to  the  target  resi-
     dues.

     If possible, select Insert.Pentamer.Replace_middle_three  to
     replace  the new residues in your model.  The side chains of
     the new residues will be whatever was in the structure data-
     base.   You  then  replace  these side-chains by picking the
     residue to be changed in the  residue  list,  selecting  the
     correct  type  with  the little pull-down button by the Type
     field, and selecting Insert.Replace.  The side-chain is then
     torsioned into its density.



VIEW WINDOW

     This window  is used for controlling the viewpoint  and  for
     building alternate representations of the model.  At the top
     of the window are the viewpoint matrices at  the  time  when
     the  View  button in the main window was selected.   It does
     not update as the model is turned, as this  would  seriously
     impede  performance.  Instead, you must select the View but-
     ton again to get the current matrices.

     The views  can  be  saved  and  loaded  from  a  file.   The
     viewpoint  is  saved as script commands, which can be copied
     into a script.  Also, the Load command  actually  just  runs
     the  script  command  on  the file so that you can add other
     script commands to the viewpoint file if you wish.

     You can move to a specific x,y,z by entering these into  the
     Translaton field and selecting Transform.  It is less likely
     that the rotation matrices can be successfully  entered  and
     produce  a  useful  result,  as  errors  will distort things
     severely.  Note that the script commands  for  the  rotation
     are  the  same as those used by the program MOLSCRIPT, by P.
     Kraulis.  The translations are of the opposite sign.

     Plane View splits the view into the  standard  viewpoint  in
     the  bottom  half and the top view in the top half.  This is
     useful for docking operations because you can see  and  con-
     trol  all  three axes and translations at once. (This option
     is not available for all display devices/modes.)

     Stereo turns Split Stereo on and off.   The  stereo  can  be
     made  either  cross-eyed or wall-eyed with the angle slider.
     The separation can also be controlled.  The  separation  can
     be changed better by scaling the Canvas window width.

     You can also select left- and right-eye-only views.    These
     are  used for making stereo slides for photography purposes.
     If hardware stereo is supported, then there will be a fourth
     selection  available:  Hardware.  On SGIs this is done using
     Crystal Eyes or StereoVision glasses.  As they do  not  work
     well  with windows, xfit rearranges the windows to work best
     with these glasses.

     When the <ESC> key is hit the windows return to their origi-
     nal positions.  You can then edit the model, load files, and
     return to stereo viewing again.  The canvas menu  is  avail-
     able in stereo, and a number of functions are available from
     it so that going in and out  of  stereo  can  be  minimized.
     Picking  is  less reliable in hardware stereo due to percep-
     tion problems; therefore, it is best done  in  less  crowded
     views.

     Make Script and Edit Script are  used  for  script  commands
     (see above). Make Script generates a script that returns you
     to where you are.  It will load models and maps and  restore
     the viewpoint.  Unfortunately, becuase the original order in
     which these operations are  done  makes  a  difference,  the
     resulting  script file may need to be edited in order to get
     back what you have. It  provides  a  great  starting  point,
     though, for complicated figures. The biggest problem is that
     loading a model changes the screen center. All  model  loads
     should  be  done  before viewpoint commands. The Edit Script
     window allows you to edit the script and rerun it.  To  save
     the script, use the <Menu> mouse button while in the Editing
     window and select File.Save_New.

     Below this are the controls for build vu.  This  is  a  very
     versatile and useful command. Select which model you want to
     build the vu object from and between which  residues.   use.
     The  default  is to use all of the model. Then select one or
     more options.

     The syntax for setting an atom filter is  a  list  of  names
     separated by spaces, such as "CN CA O," which is the same as
     the Mainchain option (actaully, Mainchain  also  requires  a
     peptide).   An  asterisk can be used as a wild card, meaning
     that the rest of the name  does  not  matter;  that  is,  C*
     matches C, CA, CB, CG1,..., CG* matches CG1, CG2,..., etc.

     In xfit, the model is never changed  for  viewing  purposes.
     Instead, a vu object is built and the original model is hid-
     den if desired. If you want to have seven side  chains,  all
     different  colors,  then  seven vu objects are built.  Up to
     200 vu objects can be built. Long lists of vu objects can be
     saved  in  a  single  file and read in as a single vu object
     later.  By this  means,  you  can  overcome  the  200-object
     limit.

     The script command "buildvu" corresponds to these  controls.
     However, if use a script, you can edit your mistakes without
     starting over.  You can edit the file,  run  it  with  "xfit
     file.script" to find any errors, fix them in the Edit Script
     window, and rerun the  script.   To  save  this,  press  the
     <Menu>  mouse  button in the Scipt Editing window and select
     the Textpane menu.

     The other advantage of using script commands for building vu
     objects  is  that  you  can  change  the  line width between
     objects.  Although  you can't see this on  the  screen,  the
     different  widths  show  up  when you plot it.  This is very
     useful for making  black-and-white  publication  figures  in
     which two objects must be clearly distinguished.



PLOTTING

     The current canvas can be plotted to a  Postscript  file  or
     printer  using  the Plot command in the Files window.  Enter
     the name of the printer or file and then select one  of  the
     two options in the pull-down menu (selected using the <Menu>
     mouse button on the Plot button).

     A number of printing options can be set  in  the  Properties
     window, including Portrait and Landscape.  Additional infor-
     mation can be plotted as  a  second  page  using  the  Stats
     On/Off  option.  This  will  add  a  second  page  with  the
     viewpoint, the names of the objects used, and the  map  lev-
     els.

     You can select to plot in color mode, black and  white,  and
     black  and  white  with  depth  cueing.  In the depth-cueing
     mode, the width of the  line  indicates  the  distance  from
     front to back (objects in back are thinner).

     Color is very useful for making slides that can be sent to a
     commercial  slide  service.  The advantage is that the expo-
     sure is always right and the  resolution  is  usuaully  much
     higher  than  on  the  screen.  The disadvantage is that the
     screen colors and the slide colors may differ substantially.
     Blue  shows  up  especially  dark  on  slides,  so  use cyan
     instead.

     The PostScript file can be edited if desired: it is  a  list
     of PostScript commands set up for easy editing.  Each object
     is bracketed by a "BEGIN type # name" and "END."  You search
     for each object by looking for the string "BEGIN."  The most
     commonly edited field is the linewidth.  You can  also  edit
     the  "setgray  level," in which  0 is black, 1 is white, and
     0.5 is 50% gray.  The labels are at the end of the file.

     It is common to want to move labels around a bit to  prevent
     them  from  overwriting  other objects.  Objects in the file
     are drawn starting from the beginning of the file and  going
     to the end.  Thus, a later object overwrites an earlier one.
     You can change the order in the file if you  wish.    Labels
     have  a  shadow  drawn  around them so they will be readable
     even if they fall on an object of the same color.



MEMORY

     xfit uses dynamic memory  allocation  for  virtually  every-
     thing.   The only limits are the size of memory available in
     your machine (including swap space) and the  largest  number
     representable  by  an  integer  on your machine.  If you get
     "out of memory"  or  "cannot  allocate  errors,"  close  all
     unused  windows.   Every open window takes up memory.  Next,
     re-read over objects that are  not  being  used  instead  of
     creating  new ones and hiding the old ones.  Re-FFTing a map
     with a coarser grid can free up a lot of memory.

     If performance becomes sluggish, suggesting swapping  (often
     you  can  hear  your swap disk chuckling merrily away), then
     more RAM may be the answer.  The cheapest way  to  speed  up
     your  workstation  may  be  to  invest  in more memory.  The
     author gets good performance with 32 Mb.  Less than 16 Mb is
     not  recommended.   If you are calculating structure factors
     by FFT, then at least 32 Mb is  needed.   Most  workstations
     are set up with small swap spaces, which becomes a liability
     later.  If you have a choice set up at least a 100  Mb  swap
     space.



MORE ON COLOR

     It  is  advisable  to  modify  only  the  color  shades   in
     ./colors.dat.  For instance, red may be modified to add some
     white.  It is possible to customize the colors completely if
     you  have  a  minimal  knowledge  of the C language, rewrite
     colors.h and ./colors.dat, and then  recompile.  The  colors
     occur  in groups of 4, which are used for depth-cueing on 8-
     bit color systems.  To change to degree of depth cueing from
     front to back, it is possible to change ./colors.dat to give
     more or less saturation.



IMPORTING OTHER FILE FORMATS

     Vu files
          Any arbitrary line information can be loaded with a  vu
          file.  The format is lines of:
          x1 y1 y2 x2 y2 z2 color

          where x1,y1,z1 and x2,y2,z2 are the  end  points  of  a
          line  and color is either an integer to a corresponding
          entry in colors.dat (see  the  footer  message  in  the
          Color  window)  or an ASCII name such as "red," "yellow
          green," or "white."

          Hint:  break long lines into  short  segments  so  that
          they  will  not be completely clipped when the viewport
          is small.  A "#" as the first character in  a  line  is
          interpreted as a comment.


     MS surface file (.surf)
          Surf files can be converted to .vu files with awk:

  awk '{ print $5,$6,$7,$5,$6,$7," white"}' file.srf > file.vu

          This command prints the 5th, 6th, and 7th fields of the
          surface  file twice and adds a color.  Since the begin-
          ning and end of the vector in the vu file are the same,
          a  dot  the size of a single pixel will be drawn at the
          position of the surface point making a "dot surface".


     Other 3D Arrays
          Arbitrary 3D arrays can be loaded into xfit  by  refor-
          matting  them  into a map file.  These can then be con-
          toured as if  they  were  electron-  density  maps.   A
          corresponding  crystal  entry will be needed.  To write
          this array, you will need to  use  the  information  in
          Chapter  4  of  the XtalView User's Guide, "Programming
          XtalView." One limitation is that the map is assumed to
          start  at  0,0,0  and  extend for one cell edge in each
          direction.  This may mean making an array  bigger  than
          is needed and padding it with 0s.



PDB FORMAT EXTENSIONS

     The extensions to the PDB format use a new keyword  as  fol-
     lows.

     Plane
          PLANE res_type  number_in_plane  atom_name1  atom_name2
          ...

          For example:

          PLANE GLU 4 CD CG OE1 OE2

          This specifies a group of atoms to be restrained  in  a
          plane. The maximum number of atoms in a single plane is
          20. If you need more,  then  use  multiple  overlapping
          planes. For convenience, the PLANE entry is usually put
          next to the corresponding residue and a  leading  minus
          sign  references  the previous residue. Thus, a peptide
          plane is specified as:

          PLANE PEP 6 CA C O +N +H +CA


     Synonym
          SYNONYM res_type atom1 atom2

          For example:

          SYNONYM ILE CD CD1

          This equivalences two residue names so that you can use
          either  one in the PDB file. The most common example is
          "ILE," where "CD" is often called "CD1." In  this  way,
          you  can  use  either name and not have a conflict with
          the xfit dictionary.


     Torsion
          TORSION res_type angle_id atom1 atom2 atom3 atom4

          For example:

          TORSION ARG PHI C- N CA C TORSION ARG PSI N CA C N+

          This specifies a 4-atom torsion.  These  are  not  res-
          trained, but are used for identifying torsions in resi-
          dues for fitting purposes. Note the use of  a  trailing
          plus  or  minus  sign to indicate the next and previous
          residue, respectively. Future versions  may  have  pre-
          ferred rotomers added to the card.

          All bond and angle  information  is  derived  from  the
          coordinates  of  the residue in standard PDB format. If
          you have a new cofactor, you would  generate  an  ideal
          example  (in  a program such as Builder) and then write
          this out in PDB format and append it to the  dictionary
          as  described  above.  Then add any PLANEs. Xfit recog-
          nizes CHI1-CHI5 as special and  assigns  these  to  the
          keys  1-5.  They don't have to be real CHIs, so you can
          specify torsions in the cofactor to be  CHI1-5  as  you
          wish and take advantage of the shortcut key. Or you can
          do torsions by picking two atoms as described elsewhere
          in the fitting section.



ACKNOWLEDGMENTS

     Xfit 3.0 was designed by Duncan McRee. Alex Shaw is  respon-
     sible  for  several  of  the  xfit modules, including the GX
     modules, the PHIGS modules, the AVS interface, and  convert-
     ing  the UNC GRINCH code to work with xfit.  The FFT library
     was supplied by Lynn Ten Eyck,   as  were  the  hierarchical
     molecule  data structures, which are responsible for much of
     xfit's utility.  The matrix routines for rotating the screen
     and  the  dialbox  code  were borrowed from FLEX, written by
     Mike Pique. A number of users have braved many  segmentation
     faults  in  debugging  this code, and the author thanks them
     for their patience.



KNOWN BUGS

     On SGIs, when going into or out of hardware stereo mode,  it
     is  necessary  to  pick  an  atom before the correct view is
     displayed.

     On SUNs with TurboGX+ graphics,  hardware  double  buffering
     does not work. To make xfit usable on such machines, control
     of the buffering method is provided through the  environment
     variable  XFIT_DBUF,  desicribed  under  "Environment  Vari-
     ables."



VERSION

     Release 3.0 of XtalView



SEE ALSO

     xtalview(1)





xheavy

xheavy



NAME

     xheavy - refine heavy atom derivatives and calculate phases.



USAGE

     xheavy [file.sol file.phs]



DESCRIPTION

     xheavy is used to calculate Multiple Isomorphous Replacement
     phases  and to refine heavy atom solutions.  The MIR phasing
     is done in an iterative manner where  SIR  phases  for  each
     derivative  are  first  calculated.  These are combined, new
     errors are estimated based on the combined SIR  phases,  and
     finally,  new  phases  are output using the new E estimates.
     The  refinement  method  used  is  a  recursive  correlation
     search.   Each  heavy  atom  is moved in turn on a finer and
     finer grid until no improvement in the  correlation  between
     the observed and calculated difference is found and then the
     relative occupancies are  refined.   The  B-values  are  not
     currently  refined. Residual maps and difference maps can be
     calculated to locate more heavy atom sites.