The SFTOOLS program is a toolbox of commands to analyze, manipulate, and convert structure factor files. The program has been written with an interactive user in mind and will provide on-line help, suggestions and warnings as appropriate. A list of the currently implemented commands plus descriptions of their use is given in the command reference section at the end of this document. The list of commands can always be obtained by just pressing the return key when the program asks for a command. To get the command descriptions, the user should type the name of a command followed by the keyword HELP.
SFTOOLS is very flexible which gives the user great power to accomplish many tasks. At the same time the program contains many checks to protect you, as far as possible, from using the flexibility inappropriately. This design goal makes it more difficult to write a script to run the program as a batch job. If you have to make a script then you may find it easier to run the program once interactively and paste the commands into the script file as you go. At this moment it is not possible to obtain a log file of your interactive session, you will have to run the program from a script if you really need one. Creating a log file will be implemented in the next release of the program.
SFTOOLS has also some density map functionality. It can read/write, CCP4, BIOMOL and DSN6 maps, and it can create maps from structure factors and vice versa. A very useful combination is to create your map (FFT), cut out a block of density surrounding your protein (MAPLIMIT), and write it out as a DSN6 file (MAPOUT), all in one interactive session.
A lot of the functionality of SFTOOLS is also covered by a large number of other CCP4 programs. The main advantage of using SFTOOLS is that you can do all your manipulations and analyses in one session without having to run multiple programs and create script files and output files with intermediate results. In addition, many users like the interactive and user friendly nature of the program.
The rest of this manual consists of 3 parts:
After starting the program you will want to load data into the data base. In most cases this means reading a structure factor file. To do this use the READ command. If the data base was empty then SFTOOLS will read both the header and the diffraction data. If a non-MTZ file is read the program will prompt for missing header information. If you read in a second structure factor file (or you prepared the header information with the SET ALL command or by reading a density map) then SFTOOLS will compare the header information on the second file with what is in the data base. It will report inconsistencies, but in all cases the information in the data base will be kept. It is useful to have an empty MTZ with header information for your project but no data. When reading a non-MTZ file then you first read the empty MTZ to get the header information. This way you avoid to have to enter the header information and the possible typos that that might introduce.
When a second (or more) structure factor file is read, the program will add new columns to the data base to store the data from the new file. Data for reflections that are already present in the data base will be appended to that reflection. Data for reflections that are not yet present in the data base will be stored in newly created reflections. In this case MNFs are inserted in the old columns (see the 0 0 1 reflection below). When a reflection was present in the data base but not in the new structure factor file, then the columns for the new structure factor file are set to MNF (see the 0 0 3 reflection below). An example is given below.
Assume that you have the following two structure factor files file1.mtz file2.mtz 0 0 2 12.4 3.2 0 0 1 82.7 10.1 0 0 3 68.7 12.1 0 0 2 13.8 3.8 0 1 3 3.2 17.0 0 1 3 4.8 17.2 0 1 5 34.0 5.8 0 1 5 37.1 4.8 in SFTOOLS you type: read file1.mtz read file2.mtz The data base will then contain 0 0 1 MNF MNF 82.7 10.1 0 0 2 12.4 3.2 13.8 3.8 0 0 3 68.7 12.1 MNF MNF 0 1 3 3.2 17.0 4.8 17.2 0 1 5 34.0 5.8 37.1 4.8
SFTOOLS will merge, sort and check your data. For further consistency checks you can give the CHECKHKL command after reading a file. This also gives you a few seconds to think about your next action while CHECKHKL is working.
All data, including integers, are stored as real numbers. Phase information is stored in radians but they will appear in degrees to the user (as long as the column type is set to "P"). RFREE flags follow the CCP4 definition in which the data is divided into N RFREE sets with flags running from 0 to N-1. When reading/writing non-MTZ files, the RFREE flag definitions will be converted to/from the CCP4 definition, respectively. The RFREE set with a flag of 0 is considered to be the actual RFREE set.
When reflections have missing data in one or more of their columns, then this is indicated by a Missing Number Flag (MNF). SFTOOLS uses a value of -1.0E+10 to indicate missing data. When reading/writing MTZ files, the SFTOOLS MNF is converted from/to the CCP4 MNF definition respectively. It is crucial that proper MNFs are present. If you have missing data without MNFs, then you can introduce MNFs easily with the ABSENT command.
Several commands need to know how the asymmetric unit is defined. The default is to use the CCP4 definition and it is highly recommended to stick with it (in the next release SFTOOLS will enforce adherence to the CCP4 definition). If you use a different definition then you can either convert to the CCP4 definition with the REDUCE command or you have to specify the definition each time you use a command that is definition dependent (this is very error prone, that is why it will be changed in the next release).
The program input is analyzed by a parser that divides the input into
words. Words may be delimited by one or more spaces or any of the following
characters ( ) , < > = [ ]. If you need to generate words including any of
these characters or spaces (e.g. in a file name or column label) then the
word(s) must be enclosed in double quotes.
Real numbers can be read in any format acceptable to FORTRAN, examples are:
1234 1234.5 1.2345E+3. Integers should be made up exclusively by digits 0
to 9 except for the first character which may be a minus sign. Character
input is case insensitive except for file names.
The often used keyword COLUMN may be abbreviated to COL. Likewise, RESOLUTION may be replaced by RESOL. A more consistent method for abbreviating keywords will be implemented later.
It is advised for most commands to give the command name and its arguments
on a single line. If you leave out the arguments 3 things
can happen:
SFTOOLS is meant to adhere to the MTZ standard in all respects. However,
the author does not use CCP4 extensively so there may still be some minor
differences (please report them). Specific treatment of multi-record
MTZ files is limited at this point. Most options will probably work fine
with them but this has not been tested.
CCP4 supports maps of several types. SFTOOLS can read and write standard
CCP4 electron density maps. The use of other map types has not been tested.
The user interface of SFTOOLS was developed independently of CCP4 practices and CCP4 parsing routines. Definitions of LABIN, LABOUT, HKLIN, HKLOUT and other common features of the CCP4 user interface are not supported. However, the user interface was designed for interactive use and should be easy to get used to. SFTOOLS can also prepare tabular data. Commands that prepare tables also allow the user some control over the table creation. In the next release of SFTOOLS this table control will be handled by a separate command. In the future tables may also support the use of XLOGGRAPH.
To read a structure factor file, SFTOOLS needs to know the name of the file, the format of the file, and the columns to be read. The name has to be supplied by the user. By default SFTOOLS reads all columns and it stores them in file order. However, the user can use the COLUMN keyword to control the columns to be read and their order in the data base. The file format will in most cases be determined from the file name extension, see below. If the format and extension do not match then the user can explicitly specify the format by a FORMAT keyword.
File format | Extension | FORMAT keyword |
---|---|---|
MTZ (CCP4) | .mtz | MTZ |
MDF (OLD BIOMOL) | .mdf | MDF |
BIOMOL ASCII FORMAT | .snd | SND |
X-PLOR | .xpl | XPL |
TNT | .tnt | TNT |
Phases short format | .31 | 31 |
Phases long format | .31 | 31 |
XtalView fin format | .fin | FIN |
XtalView phs format | .phs | PHS |
XtalView double fin | .df | DF |
Generic ASCII file | .fmt | FMT |
SFTOOLS can read any generic ASCII file if:
Most ASCII files will be readable as is, however, if yours is not well-behaved then you can fix it as follows.
For a detailed description see READ and Filling the data base
To read an electron density file, SFTOOLS only needs to know the name of the file and the format of the file. The name has to be supplied by the user and in most cases the format can be determined from the file name extension, see below. If the format and extension do not match then the user can explicitly specify the format by a FORMAT keyword.
File format | Extension | FORMAT keyword |
---|---|---|
CCP4 map | .map | MAP |
BIOMOL map | .mff | MFF |
FRODO/O map (DSN6) | .dn6 | DN6 |
SFTOOLS always reads the complete density map. Only one map can be in
memory at any time. Use DELETE MAP to remove an old map before reading
a new one. SFTOOLS will use the header information in the input map
and will prompt the user for missing information.
CCP4 and BIOMOL maps can be sectioned in any order, however, SFTOOLS
will internally always store the map in ABC order (sections along C
and rows along B). For CCP4 maps not all map types may be supported,
but the standard electron density maps should work.
Note: DSN6 files use only a single byte per grid point. It may be better to recreate your map from the map coefficients or to re-read the original MFF or CCP4 electron density file.
For a detailed description see MAPIN
To enter the header information without reading it from a file you use the SET ALL command. The program will prompt you for the header information.
For a detailed description see SET
To write a structure factor file, SFTOOLS needs to know the name of the file, the format of the file, and the columns to be written. The name has to be supplied by the user. By default SFTOOLS writes all columns in the same order as they are stored in the data base. However, the user can use the COLUMN keyword to control the columns to write and their order in the output file. The file format will in most cases be determined from the file name extension, see the extensions table. In order to write a generic ASCII formatted file you have to specify the FORTRAN format string. It is absolutely required that the first 3 values are written as integers since these will be the indices. ALL other values MUST be written as reals because that is how they are stored in the program.
Some of the supported file formats are restricted in the number of columns and/or types of data that they accept. The user should use the COL keyword if needed to write the appropriate data. The requirements are detailed in the WRITE description.
For a detailed description see WRITE
To write an electron density file, SFTOOLS only needs to know the name of the file and the format of the file. The name has to be supplied by the user and in most cases the format can be determined from the file name extension, see below. If the format and extension do not match then the user can explicitly specify the format by a FORMAT keyword, see the extensions table.
The current version of SFTOOLS always writes the complete density map. To write a subsection of the map you should use the MAPLIMIT command. In the next release the MAPLIMIT functions will be moved to the MAPOUT command in a more general way. By default, SFTOOLS will write a map in ABC order (sections along C and rows along B). For CCP4 and BIOMOL maps the user can specify a different order by adding the ORDER keyword.
For a detailed description see MAPOUT
The list command is used to list the actual contents of the data base. It accepts the following keywords: TITLE, LABELS, TYPE, CELL, SORT, SPACEGROUP, and REFLECTIONS. Each keyword limits the listing to the indicated information. If no keyword is given all information, except reflections, will be listed. Keywords can be abbreviated to the first 3 characters.
For a detailed description see LIST
CHECKHKL reports potential problems with your data like: presence of systematically absent reflections, centric reflections with illegal phase, reflections outside asymmetric unit, multiple reflections with the same indices etc... It also lists for each column the average, minimum and maximum value, the minimum and maximum resolution, and the number of missing data. It is nice to keep the CHECKHKL output as part of the documentation of a new data set.
For a detailed description see CHECKHKL
The COMPLETE command reports the completeness of your data as function of resolution. It can make bin-wise or cumulative tables and it can list percentage completeness as well as number of observed reflections. This option also reports a "100% criterium". This is the resolution in Angstrom of a 100% complete hypothetical data set with the same number of reflections as your data set. It is nice to keep the COMPLETE output as part of the documentation of a new data set.
The PDB keyword allows you to write a PDB file with pseudo-atoms for each observed and each absent reflection. Visualization with your favorite graphics program can tell you if data is randomly or systematically missing.
For a detailed description see COMPLETE
The CORREL command reports the correlation coefficient between two columns as function of resolution. It also gives an R-value but this only makes sense if the columns are on the same scale.
For a detailed description see CORREL
The PHASHFT command reports the average phase difference between two columns as function of resolution. The keyword COSINE can be used to list the cosine of the phase error.
For a detailed description see PHASHFT
The PLOT command lists the bin-wise average of a column. Bins can be either as function of resolution or as function of another column. In the latter case the reflections are sorted by the other column before binning.
For a detailed description see PLOT
The rms value of a map can be derived from the map amplitudes, i.e. it is independent of the phases. The correlation between two maps can be calculated when the structure factors of both maps are known (amplitudes and phases). In both cases it is not necessary to actually calculate the map.
For a detailed description see MAP
After a map has been read or generated with the FFT command, the MAPSTAT command will list the header information and statistics for the map and individual sections.
For a detailed description see MAPSTAT
If you have missing data then it is crucial for SFTOOLS that they are flagged by Missing Number Flags (MNFs). Old-style CCP4 programs relied on a SIGMA column being zero to indicated missing data. SFTOOLS will warn you when you read such an old-style file. Inserting proper MNFs is easy with the ABSENT command. The basic command structure is
ABSENT COL col_ids IF SELECTIONSELECTION can be any valid selection (see SELECT), whereas COL col_ids is a list of column labels or column numbers. MNFs are inserted in all listed columns for the reflections that fit the selection criterium. It is a good idea to give a SELECT ALL command prior to using the ABSENT command to make sure that all reflections will be used.
For a detailed description see ABSENT
The CALC command is one of the most important commands and it gives you a lot of flexibility to accomplish non-standard tasks. Basically, the CALC command allows you to calculate a column of data based on existing data columns, constants, build-in functions and arithmetic operators. It is worth reading the rather extensive documentation for the CALC command.
For a detailed description see CALC
Just like the CALC command mentioned above, the SELECT command is very important to let you accomplish both common and advanced tasks. Basically the SELECT command allows you to select a subset of the reflections based on the reflection indices, data column values, and some special properties. Multiple SELECT commands can be combined to give even more control. For a full description of all options you will have to read the reference section.
For a detailed description see SELECT
The DELETE command removes maps and data columns to free up space in the data base.
For a detailed description see DELETE
The PURGE command removes reflections to free up space in the data base. Reflections to be removed should be deselected by the SELECT command prior to using purge. See SELECT for more information on the SELECT command.
For a detailed description see PURGE
Sometimes you may want to reduce the symmetry of your space group and explicitly generate the symmetry related reflections. In most cases you will want to expand to P1 and generate data for a full hemisphere of reciprocal space. The EXPAND command allows you to do this while updating your phase and/or Hendrickson-Lattman coefficients as needed. You can even expand to non-P1 space groups as long as it is a proper sub space group.
For a detailed description see EXPAND
The FFT command takes two columns with structure factors and uses them to create a density map using an in-memory fast Fourier transform. The structure factors will be left unchanged. The resulting map will cover exactly a full unit cell.
For a detailed description see FFT
The MAP2SF command inverts a density map to structure factors using an in-memory fast Fourier transform. The map must already be in memory before using the MAP2SF command and the map will be destroyed upon completion of the command.
For a detailed description see MAP2SF
The HLCONV command generates Hendrickson Lattman coefficients from the phase and figure of merit of a reflection. Because the latter represent a unimodal phase distribution, only the A and B coefficients are generated. You should not use this command if your phase and FOM were not derived from a unimodal distribution (e.g. heavy atom phasing). In that case use your original Hendrickson Lattman coefficients.
For a detailed description see HLCONV
The I2F command takes two columns with an intensity and its sigma and produces two new columns with the amplitude and corresponding sigma. Negative intensities are set to MNFs. This command treats weak data reasonably, but it is recommended that you use the CCP4 TRUNCATE program.
For a detailed description see I2F
The MAPLIMIT command allows you to select a subsection of a map. You can specify the new map limits as grid points, fractional, or orthogonal coordinates. Alternatively, you can give the name of a PDB file and the new limits will be set to cover the molecule.
NOTE: The current implementation does not allow the output map to exceed the length of a unit cell axis. This limitation will disappear in the next release of SFTOOLS.
For a detailed description see MAPLIMIT
The REINDEX command can be used to change the reflection indices. All indices will be multiplied by a user-specified matrix. It is up to the user to make sure the matrix is appropriate. The program will also transform the global and dataset cell parameters according to the supplied matrix. However, the user will have to update the space group if needed. Phase columns and Hendrickson-Lattman coefficients will not be updated. The indices will be resorted and reduced to the CCP4 asymmetric unit.
For a detailed description see REINDEX
The RFREE command randomly selects a set of reflections to be used for the Rfree set. Alternatively, the user can ask for thin shells of reflections to be used for the Rfree set. The latter may be of interest in cases with high non-crystallographic symmetry. However, to get a reasonable number of shells, the individual shells are much thinner than one would like.
For a detailed description see RFREE
All header information can be changed with the SET command. The keywords ALL, TITLE, LABELS, TYPES, SORT, CELL, and SPACEGROUP can be given to indicate which header item you wish to change. It is sufficient to type only the first 3 characters of each keyword.
For a detailed description see SET
The SORT command can be used to sort the reflections by index, by resolution or by the value of one of the columns. This can be helpful if you want to look at your reflections with the LIST REF command.
For a detailed description see SORT
The REDUCE command forces all indices to be within the given asymmetric unit definition. By default the CCP4 definition is used and it is recommended not to deviate from that. Phases and Hendrickson-Lattman coefficients will be updated if necessary.
For a detailed description see REDUCE
The MERGE command merges reflections with identical indices. With the exception of multi-record MTZ files, this situation should not occur. In some benign cases the multiple reflections contain identical information in all columns or only one reflection contains valid data for any one column (the rest has MNFs). In the latter case the MERGE command can be applied safely. If two or more reflections contain non-identical data for one or more columns then you can force merging by averaging by giving the MERGE AVERAGE command. However, you most likely have a major problem with your data and MERGE AVERAGE should only be used if you know what caused the problem.
For a detailed description see MERGE
Following is the list of on-line help information. You can get this during interactive use by typing the name of the command followed by the keyword "HELP". E.g. ABSENT HELP will give you the help information for the ABSENT command.
The available keywords/commands are:
ABSENT, CALC, CHECKHKL, COMPLETE, CORREL, DELETE, EXPAND, FFT, FOURPT, FULLMDF, FULLMTZ, HLCONV, I2F, LIST, MAP, MAP2SF, MAPIN, MAPLIMIT, MAPOUT, MAPSTAT, MERGE, MODE, OPTION1, PHASHFT, PLOT, PURGE, READ, REDUCE, REINDEX, RFREE, SELECT, SET, SORT, STOP, WINDOW, WRITE
OPTION: ABSENT COL col_ids IF COL col_id = 0 ============================================ Option to generate Missing Number Flags (MNFs) This command will set the values in the columns specified by col_ids to absent if the value in the column specified by col_id is zero. A column identifier can be either the column number or the column label. The part following the IF keyword can actually be any valid selection expression (give SELECT HELP for more information on selection expressions) Reflections that are already deselected due to a previous SELECT command will not get any MNFs Also note that after this command a SELECT ALL command will be issued automatically. EXAMPLES:(assuming column 2 has label sigma) ABSENT COL 1 2 IF COL 2 = 0 ABSENT COL 1 2 3 4 IF COL sigma = 0 ABSENT COL 3 4 IF RESOL > 3.0
OPTION: CALCulate RESULT = expression ====================================== Command to perform arithmetic on data columns. The expression is evaluated and stored in the column(s) indicated by result. The expression may contain operands and operators and should follow the Polish notation. This means that first the operands are given and then the operator. (e.g. 5+3 becomes 5 3 +). It is the users responsibility to assure that the correct number of operands are given for each operator (see list below). Operands may either be a value, a column_id or some kind of function - VALUE : integer, real or complex value. Complex values consisting of an amplitude and phase must be enclosed in parentheses e.g. i=(1.0 90.0) or square brackets if they represent the real and imaginary parts. e.g. i=[0.0 1.0]. - COLUMN: A COLumn keyword followed by 1 or 2 column_ids (numbers or labels). Give 1 column_id if you wish to use the value in that column. Give 2 column_ids if the columns contain complex data. Enclose the keyword and the ids in parentheses if the columns contain an amplitude and a phase. Use square brackets if they contain the real and imaginary parts. If a column value is absent then the whole expression evaluates to absent. FUNCTION one of the following built-in functions - C : This evaluates to 0 for centric and to 1 for acentric reflections - M : This evaluates to the reflection multiplicity (e.g. 2 on two-fold etc) - P : This evaluates to the phase restriction for centric reflection or MNF for non-centrics - H : Returns the H-index for this reflection - K : Returns the K-index for this reflection - L : Returns the L-index for this reflection - RAN_U : Return a random number from a uniform distribution between 0 and 1. The set of random numbers depends on a seed value which is 1234 by default. To modify the seed value (and hence get a novel set of random numbers) you must issue a command CALC SEED number where number can be any positive integer - RAN_G : Return a random number from a Gaussian distribution with mean 0 and variance 1 (see RAN_U for the SEED value) - RFREE(r) Randomly returns 0 and 1 values for use in RFREE for XPLOR. If 0 < r < 1 then r represents the fraction of data to use for the free R-factor. If r > 1 then it represents the absolute number of reflections to use. - STOL : This evaluates to sin(theta/lambda) - STOLSQ: This evaluates to sin(theta/lambda)**2 RESULT : Indicates where to store the result of the expression. RESULT can be: TYPE COLumn c1, (COLumn c1 c2), [COLumn c1 c2] In the first case a result is stored in column c1 The column type will be set to TYPE or to R if no type is specified. In the second case a complex result is stored in columns c1 and c2 as an amplitude and phase resp. The column types are set by the program. In the third case, the complex result is stored as the real and imaginary parts resp. again with the column types set automatically. The result columns are created if necessary OPERATOR (REAL OPERANDS, COMPLEX OPERANDS) + (2,4) : Summation - (2,4) : Subtraction * (2,4) : Multiplication / (2,4) : Division ** (2,3) : Power. The base may be complex, the exponent not (it can be any! real) SIN (1,-) : Sine COS (1,-) : Cosine TAN (1,-) : Tangent DTR (1,-) : Convert from degrees to radians RTD (1,-) : Convert from radians to degrees ABS (1,2) : Absolute value. For complex values this is the complex vector length LN (1,-) : Natural logarithm EXP (1,-) : Exponent MIN (2,4) : Minimum of two values MAX (2,4) : Maximum of two values EXAMPLES: (assume the data base contains 4 columns named; fobs, sigma, fcalc and phase) CALC COL sigma = 0 set column sigma to 0 CALC COL sigma = COL fobs 10 / set sigma to fobs/10. The result column will keep column type Q CALC COL F/sigF = COL 1 COL 2 / add a column labeled F/sigF and store fobs over sigma in it. The result column will get column type R CALC COL stol = stol add a column labeled stol and store sin(theta) over lambda in it for each reflection CALC COL resol = 0.5 stol / create a column labeled resol and store the resolution in Angstrom {1/(2*stol)} CALC COL 5 = m add a column labeled COLUMN_005 and store the multiplicity for each reflection, e.g. 6 for 00L reflections in hexagonal space group. CALC COL 7 = m identical including label COLUMN_005 CALC COL centric = 1 c - add a column labeled centric that contains 0 for acentrics and 1 for centrics CALC COL fcalc = COL fcalc ran_g 100 * + ran_g returns a random number from a Gaussian distribution. Multiply this by 100 to get a mean of 0 and variance of 100 (st. dev. of 10) and then add it to your fcalc CALC q COL newsigma = 2 COL sigma * add column with label newsigma twice the value found in column sigma. Set the type of the new column to Q!!! CALC J COL iobs = 0.001 COL fobs * COL fobs * add column with label iobs and type J iequal to 0.001*fobs*fobs. ( intensity scaled by 0.001) CALC Q COL sigiobs = 0.002 COL sigma * COL fobs * add column with label sigiobs and type Q equal to 0.002*fobs*sigma. ( SigI = 2*fobs*sigma scaled by 0.001) CALC (COL Fnew Pnew) = (COL 1 4) (COL 3 4) - create columns Fnew and Pnew and store in it fobs - fcalc as amplitude and phase. Column types are set to F and P CALC [ COL real imag ] = (COL 3 4) convert fcalc and phase to real and imagenary components and stored these in columns labeled real and imag, column types are set to R and R CALC COL test = rfree(0.05) select 5% of the reflections for XPLOR RFREE CALC COL test = rfree(3500) select 3500 reflections for XPLOR RFREE
OPTION: CHECKHKL [ASUNIT] ========================= Command to check the reflection indices. It will report the following: - number of reflections outside asymmetric unit - number of centrosymmetric reflections - number of unallowed reflections - number of reflections found on the crystallographic symmetry axes ASUNIT Asymmetric unit specification by: CCP4 Keyword to use CCP4 definition (default) BIOMOL Keyword to use BIOMOL definition TNT Keyword to use TNT definition MATRIX m11 m12 m13 m21 m22 m23 m31 m32 m33 Give REDUCE HELP to get more information on how to define the asymmetric unit by the MATRIX keyword
OPTION: COMPLETE [SETTINGS] [MODE] [ASUNIT] [COLUMN] ==================================================== Command to list the data completeness. Only the reflections within the asymmetric unit are used. SETTINGS is one of the following: SHELLS n Display data in n shells (n is saved) RESOL r Set maximum resolution [A] (default is the maximum observed resolution) MODE is one of the following: NUMBERS list the number of reflections in each resolution bin. The default is to print the completeness in percentage CUMULATIVE list the cumulative completeness. The default is to list in resolution bins PDB Make PDB file OBSERVED.PDB in which OBS & ABS residues indicate observed and absent reflections in rec. space Observed reflections will have their B-value set to the value in column 1 (Nice if column 1 contains F/SIGF) TABLE Keyword. When given, the contents of the table will be written to the file COMPLETE.TAB (without header & totals) ASUNIT Asymmetric unit specification by: CCP4 Keyword to use CCP4 definition (default) BIOMOL Keyword to use BIOMOL definition TNT Keyword to use TNT definition MATRIX m11 m12 m13 m21 m22 m23 m31 m32 m33 Give REDUCE HELP to get more information on how to define the asymmetric unit by the MATRIX keyword COLUMN By default, COMPLETE will list the completeness of the first 10 columns. The COLUMN keyword can be used to specify up to 10 specific columns. EXAMPLE: COMPLETE COL 1 3 5 (list the completeness of columns 1, 3 & 5) Data completeness cannot be caught in a single number and resolution limits reported in the literature strongly depend on criteria unknown to the reader. A more objective (still not ideal) specification would be to state: the number of observed reflections corresponds to a 100% complete dataset to X angstrom resolution. a good estimate of the value X is given by SFTOOLS
OPTION: CORREL [COLUMN c1 c2] [SETTINGS] [TABLE] ================================================ Command to calculate the correlation and R-factor between two columns. COLUMN Keyword which is followed by - c1 c2 2 column-id''s, names or numbers SETTINGS changes the table layout as follows: SHELLS Keyword followed by - nshell displays data in nshell shells RESOLUTION Keyword followed by - rmin rmax Resolution limits [A] (e.g. 10 2) TABLE Keyword. When given, the contents of the table will be written to the file CORREL.TAB (without header & totals) The column labels of the table are: NSHELL Number of resolution shell DMIN DMAX Minimum/maximum resolution RFACT Rfactor in percent ( 200*Sum|col1-col2|/sum(col1+col2) ) CORREL Correlation coefficient F1 F2 Average value of col1 and col2 in the resolution bin NREF Number of reflections used for the statistics
OPTION: DELETE [COLUMN col_ids] [MAP] ===================================== Command to remove information from the data base COLUMN : Keyword that is followed by column-id Label(s) or number(s) to identify the column(s) that will be deleted MAP : Keyword to indicate that the map has to be deleted EXAMPLES: DELETE COLUMN 5 6 DELETE MAP
OPTION: EXPAND [SPAGRP] [SILENT] [ASUNIT] ========================================= Expand the reflections to lower symmetry. Phase information will be treated, the spacegroup information will be updated and the expanded. Reflections will be sorted. SPAGRP Space group number to which to expand. This must be a proper subgroup of the original space group (default is 1) SILENT Keyword to suppress output ASUNIT Asymmetric unit specification which is: CCP4 Keyword for CCP4 definition (default) BIOMOL Keyword for BIOMOL definition TNT Keyword for TNT definition MATRIX Keyword followed by 9 integers specifying the asymmetric unit. Give REDUCE HELP for more details on the MATRIX definitions WARNING: if you expand to a SPACEGROUP that has its origin at a different position then the phases will not be correct (e.g. P212121 to P21) EXAMPLES: EXPAND (expand to P1) EXPAND 3 (expand to P2)
OPTION: FFT COL id1 id2 [STEP x] [GRID nx ny nz] ================================================ Calculate a map based on the Fourier coefficients in columns id1 (amplitude) and id2 (phase). All active reflections are used. To restrict the data to a certain resolution use option SELECT. STEP Force the program to use a grid size that is as close to x Angstrom as allowed GRID Force the program to use nx, ny and nz grid points along the a, b and c axes respectively. The numbers must be multiples of 2, 3 and 5 and nx must be positive. If an illegal number is given the next valid number will be used If neither STEP nor GRID are specified the grid size defaults to 1/3 of the max. resolution Note: If your amplitudes are on absolute scale your map will be on absolute scale as well EXAMPLES ======== FFT COL fobs pmir FFT COL 1 2 FFT COL 1 2 GRID 96 60 81 FFT COL 1 2 STEP 0.8
OPTION: FOURPT MAPTYPE COLUMNS ============================== Command to generate Fourier coefficients for several standard transforms. MAPTYPE must be one of the following numbers: 0 = ( F1 - F2),P1 : Fo-Fc-map 1 = (2F1 - F2),P1 : 2Fo-Fc-map 2 = (3F1 - 2F2),P1 : 3Fo-2Fc-map 3 = |F1|,P1 + |F2|,P2 4 = |F1|,P1 - |F2|,P2 5 = |F1|,P1 : Straight Fourier 6 = |F1|**2 : Patterson 7 = (F1-F2)**2 : Patterson 8 = |F1|*|F2|,(P1-P2) : Phased trans. function 9 = |F1|*|F2|,(-P1-P2) : Phased trans. function COLUMNS is the COL keyword followed by column specifications. The columns have to be specified in the order in which they occur in the formulae F1 and F2 represent amplitude columns. P1 and P2 represent phase columns. The map coefficients are stored in 2 new columns with labels FMAP and PMAP (amplitude and phase respectively). The Patterson map options generate only one column with label FPAT. If a dummy phase column with zeroes is required you could make it with the command: CALC COL PPAT = 0 If you wish to weight your coefficients with a figure of merit you can do so with the command CALC COL FMAP = COL FMAP COL FOM * EXAMPLE: FOURPT 1 COL fobs fcalc pcalc
NOTICE: Option FULLMDF will become obsolete in the next release and will no longer be supported. Try to avoid using it in scripts. OPTION: FULLMDF =============== This option converts a CCP4 MTZ into a BIOMOL MTZ In the first step the user must indicate how to generate absence flags. If a column with anomalous data is found (column type = D) then user input will also be requested to convert the anomalous data. The conversion between asymmetric unit definitions will be made automatically.
NOTICE: Option FULLMTZ will become obsolete in the next release and will no longer be supported. Try to avoid using it in scripts. OPTION: FULLMTZ =============== This option automatically replaces absence flags (-1E+10) by zeroes. If a column with anomalous data is found (column type is D) then user input will be requested if and how the anomalous data has to be converted Indices will be reduced to the CCP4 asymmetric unit automatically
OPTION: HLCONV COL phase fom ============================ Given a phase and figure of merit, this command will generated the A and B Hendrickson-Lattman coefficients. PLEASE NOTE that this is only advisable if your source of phase information is unimodal. If you have heavy atom phases then you SHOULD use the original bimodal phase distributions derived from them. This option may be useful to generate HL coefficients for phased refinement with XPLOR or REFMAC, based on FOM and phases from a map after density modification Example: HLCONV col 2 3
OPTION: I2F COL I SIGI ====================== Command to convert intensities plus their sigmas to amplitudes and corresponding sigmas. The argument consists of the keyword COL followed by the column labels (or numbers) of the columns containing I and SigI respectively Example: I2F COL 1 2 Example: I2F COL Iobs Sigma-I The results are stored in columns with labels Fobs and Sigma-Fobs. NOTE: if columns with these labels exist then they will be overwritten !!! The I2F conversion is calculated as: Fobs = SQRT(Iobs) Sigma-Fobs = SQRT( SQRT( Iobs**2 + 0.5*Sigma-I**2) - I) NOTE: it may be better to use the CCP4 program TRUNCATE for this step since it treats negative and very weak data more elegantly (I2F flags negative data as absent!!!)
OPTION: LIST [ITEMS] ==================== Command to list header information -ITEMS is a list of header items to be shown (it suffices to give the first 3 characters) The default is to list all header items TITLE title cards LABELS column labels, numbers and types TYPE column labels, numbers and types CELL unit cell parameters DCELL crystal-specific unit cell parameters DWAVE dataset-specific wavelength SORT sort order SPACEGROUP space group related data REFLECTIONS reflection data. This argument. can be followed by COL and one to six column specifiers Example: LIST REF col 1 2 11 12 LIST SPA DCELL LIST
OPTION: MAP RMS F1 [SHELLS n] OPTION: MAP CORREL F1 P1 F2 P2 [SHELLS n] ========================================== Option to calculate the r.m.s. of a map based on the amplitude of its coefficients or to calculate the correlation coefficient between two maps given the coefficients for both maps. The statistics will be listed as function of resolution. RMS Keyword to calculate the map r.m.s. based on the amplitude in column F1 CORREL Keyword to calculate the correlation coefficient. F1 P1 and F2 P2 are the column specifiers for the coefficients of map 1 and map 2 respectively SHELLS n Keyword followed by the number of shells to use in the analysis. The given value will become the new default. The original default is 20 You can give only one keyword at a time, but if you give the CORREL keyword the program will automatically give you the r.m.s. values of the two maps being correlated EXAMPLE: MAP RMS 1 (rms of a map based on amplitudes in column 1 MAP CORREL fobs pmir faveraged paveraged (correlation between mir map and averaged map) MAP CORREL 1 2 5 6 SHELLS 10 (As before but list only 10 resolution shells)
OPTION: MAP2SF [RESOL r] [F000] [COL id1 id2] ============================================= Calculate Fourier coefficients from a map. The map to be transformed already has to reside in memory. You will always get coefficients for all reflections that are already in the data base (even if they are unselected). RESOL r This keyword indicates that ALL legal reflections (except F000) to a resolution of "r" Angstrom will be stored. The default is to store only the reflections for which there is already an entry in the data base. If there are no reflections in the data base and RESOL is not specified, then all legal reflections to a resolution of 3 times the largest grid spacing are calculated F000 If given this indicates that F000 should also be kept (WARNING, many programs, potentially incl. SFTOOLS, do not like the infinite resolution of F000). COL id1 id2 If id1 and id2 are text labels, then id1 and id2 are given to the new amplitude and phase columns If id1 and id2 are numbers of existing columns then the new amplitude and phase columns will overwrite the id1 and id2 columns. If the COL keyword is not given then SFTOOLS will create 2 columns with COLUMN_NNN labels where NNN is the column number Note: If your map is on absolute scale then the Fourier coefficients will be as well EXAMPLES ======== MAP2SF MAP2SF COL Fnew Pnew MAP2SF RESOL 2.0 col 3 4 MAP2SF RESOL 3 F000 col 3 4
OPTION: MAPIN FILENAME [FORMAT] =============================== Command to read in an electron density file. FILENAME is the name of the file. The program will try to deduce the file format from the extension. It will recognize .mff, .map, .dn6 FORMAT can be one of the following: MFF, MAP, DN6 This overrules the file name extension format File formats are: MFF BIOMOL format MAP CCP4 real*4 format DN6 FRODO / O map format NOTE: DN6 maps for hardware other then SGI may not be compatible with SFTOOLS. Please let me know about problems EXAMPLE: MAPIN file.mff MAPIN file.map MAPIN file.dn6 MAPIN file.rho MFF Notes: The input map can be in any order. However it is stored internally in A-B-C order. There can only be one map in memory. An existing map has to be deleted before reading a new one (DELETE MAP)
NOTICE: Option MAPLIMIT will become obsolete in the next release and will no longer be supported. Try to avoid using it in scripts. In the next release the functionality of MAPLIMIT will be moved to the MAPOUT command. This allows a fully general and robust implementation. OPTION: MAPLIMIT TYPE value(s) ============================== Command to restrict a map to certain limits. The limits can be specified in various ways as indicated by the TYPE keyword which can be one of the following: PDB filename PLUS r This returns a block of density that surrounds the atoms in the PDB file leaving an extra "r" Angstrom on all sides. If "PLUS r" is not specified a default of 5 Angstrom is used GRID a_l a_u b_l b_u c_l c_u This returns a block of density with lower and upper limits along a, b and c as given in grid coordinates FRACT a_l a_u b_l b_u c_l c_u This returns a block of density with lower and upper limits along a, b and c as given in fractional coordinates ORTHO a_l a_u b_l b_u c_l c_u This returns a block of density with lower and upper limits along a, b and c as given in orthogonal (Angstrom) coordinates EXAMPLES: MAPLIMIT PDB protein.pdb PLUS 4 MAPLIMIT FRACT 0 0.5 0 0.5 0 0.5 MAPLIMIT GRID -5 34 0 60 12 49 Notes: Every gridpoint in the new map must be present in the current map. It is allowed to go outside the unix cell, but none of the new axes can be larger than a full unit cell axis. E.g. if the a-axis runs from 0 to 99, you can ask for the subset -5 to 20, but not -5 to 99
OPTION: MAPOUT FILENAME [FORMAT] [ORDER a b c] ============================================== Command to write a electron density file. -FILENAME is the name of the file. The program will try to deduce the file format from the extension. It will recognize .mff, .map, .dn6 FORMAT can be one of the following: MFF, MAP, DN6 This overrules the file name extension format ORDER By default the map is written with sections along C, rows along B and grid steps along A (ORDER A B C). By giving different permutations of A B C you can change the map layout. File formats are: MFF BIOMOL format MAP CCP4 real*4 format DN6 FRODO / O map format NOTE: I have only created DN6 maps for display on SGI If you use it on different hardware then please let me know if it works or not. EXAMPLE: MAPOUT file.mff MAPOUT file.map MAPOUT file.dn6 MAPOUT file.rho MFF MAPOUT file.map ORDER A C B (sections along B, rows along C)
OPTION: MAPSTAT [SECTION a b c] =============================== Command to list header and statistics of the current map. Statistics are given per section and for the whole map. You can specify which axis to use as sectioning axis by the SECTION keyword followed by the required sectioning axis. If no SECTION keyword is given then sections will be along the C-axis EXAMPLES: MAPSTAT MAPSTAT SECTION a MAPSTAT SECTION b
OPTION: MERGE MODE ================== Command to merge reflections with identical indices. There are two modes: SAFE Reflections are only merged if none of the columns has valid data entries in more than one reflection [default] AVERAGE Merging is done by taking the average of the reflections MERGE merges multiple reflections with identical HKL, it does not merge different columns!!! The AVERAGE option exists, but you should never need to use it. If you need it you probably have some kind of problem with your data EXAMPLES: MERGE SAFE MERGE AVERAGE (if you know what you are doing)
NOTICE: Option MODE will become obsolete in the next release and will no longer be supported. Try to avoid using it in scripts. OPTION: MODE BATCH | INTERACTIVE ================================ Bring the program in or out of Batch mode Use MODE BATCH when running SFTOOLS in batch This suppresses some questions by SFTOOLS, e.g. to hit return to see the next page in LIST REF Use MODE INTERACTIVE to return to interactive mode if that would ever be useful EXAMPLES: MODE BATCH MODE INTERACTIVE
NOTICE: Option MODE will no longer be supported in the next release. If you want to add your own options please contact me. OPTION: OPTION1 .... ==================== Option1 is a dummy option that provides a means for users to add their own option. To do so, insert your code in this subroutine and modify this help text. If you wish to give the option a more sensible name then you have to modify the calling sequence in the main routine, the name in routine lstopt and of course the name in the subroutine header and in the last write statement If you plan to do some major programming, then it might be wise to contact me first, since your option might already exist in my experimental version. In addition I could supply you with a makefile and some other goodies If your option is of general interest, then you are urged to return the source code to me so that it can be implemented in the official release Bart Hazes, e-mail bart.hazes@ualberta.ca
OPTION: PHASHFT [COL c1 c2] [SETTINGS] [TABLE] [COSINE] ======================================================= Command to calculate the average phase difference between two columns of data. COLUMN Keyword followed by - c1 c2 2 column-id''s, names or numbers SETTINGS changes the table layout as follows: SHELLS Keyword followed by - nshell Displays data in nshell shells RESOLUTION Keyword followed by - rmin rmax Resolution limits [A] (default is to use the observed resolution limits) TABLE Keyword. When given, the contents of the table will be written to the file PHASHFT.TAB (without header & totals) COSINE Keyword to instruct the subroutine to list the cosine of the phase difference (Default is degrees)
OPTION: PLOT COL c1 VERSUS [RESOL] [COL c2] =========================================== Command to create a plot file with the binwise averages of column c1 on the y-axis. The x-axis can be either resolution bins or bins of values found in column c2. COL c1 Column keyword followed by column name or number VERSUS Keyword to be typed literally RESOL Keyword to be typed literally if you wish to plot as function of resolution COL c2 Column keyword followed by column name or number. The data in column c1 will be given as function of the data in column c2 SHELLS n Keyword followed by the number of bins EXAMPLE: plot col fobs versus col sigma The output file (PLOT.DATA) has 5 columns - The lower limit of the bin - The upper limit of the bin - The midpoint of the bin - The average of col c1 for the bin - The number of reflections in the bin
OPTION: PURGE [SELECT] [NODATA] [YES] ===================================== Command to delete records. Records to be deleted must first be deselected by command SELECT. Command SELECT may be given from the main menu or optionally from within PURGE. For help on SELECT, type SELECT HELP from the main menu YES Keyword to indicate that no confirmation should be requested. By default, PURGE will ask a confirmation before starting Keyword yes must appear before select NODATA Keyword to indicate that all reflections which have absent flags in all columns should be deleted
OPTION: READ FILENAME [FORMAT] [COLUMN columns] =============================================== Command to read a structure factor file. -FILENAME is the name of the file. The program will try to deduce the file format from the extension. It will recognize .mtz, .mdf, .snd, .xpl, .tnt, .31, .fin, .phs, .df, and .fmt FORMAT can be one of the following: MTZ, MDF, SND, XPL, TNT, 31, FIN, PHS, DF or FMT This overrules the file name extension format COLUMN Keyword to select specific columns Columns can be specified by numbers or labels (also mixed), and in any order. The order of columns in SFTOOLS will reflect the specified order and not the order on the MTZ. A column may even be listed more than once! If no columns are given, then the program will ask the user for each column whether or not to include it. If no COLUMN keyword is given all columns are read THE COLUMN KEYWORD MUST BE THE LAST ARGUMENT ! File formats are: MTZ CCP4 format MDF old BIOMOL format SND BIOMOL ascii format XPL XPLOR format TNT TNT format 31 PHASES short and long binary formats FIN Xtalview fin-format PHS Xtalview phs-format DF Xtalview double fin-format FMT File in arbitrary ASCII format NOTE: All formats except MTZ may need additional header information. The program will request this information interactively if necessary. All but the MTZ, MDF, SND and FMT formats have certain restrictions on the number, order, and type of columns. It is the users responsibility to use the COLUMN keyword to read the appropriate number and types of columns. SFTOOLS will check that you obey these restrictions. EXAMPLES: READ myfile.mtz (read all columns of myfile.mtz in mtz format) READ myfile.hkl MTZ COLUMN 3 1 2 (read columns 1, 2 and 3 of myfile.hkl in mtz format. Column 3 will be column 1 in SFTOOLS) READ myfile.mtz COL (read myfile.mtz in mtz format and ask for each column whether or not it should be read) READ myfile.fmt (read the ASCII file myfile.fmt The program will figure out the format for you based on the first line(s) of the file. It will ignore character data amidst reflection data but you must edit out header lines (try the unix TAIL command). Also, all lines must have the same format as the first line(s). The program will ask you how many lines each reflection uses so that it can handle reflections that span more than one line. It also asks you how phase information is encoded Your file must contain the indices in the first three data columns (preceding character data is no problem though). If this is not the case then you can use the unix AWK command to fix it. The following awk command would correct a file which has the indices in columns 3, 4 and 5 awk '{printf("%4d%4d%4d%8.1f%8.1f",$3,$4,$5,$1,$2)}' file_in > file_out One last note: if your file contains missing data in some manner (e.g. Sigma=0) then you will have to use the ABSENT command to insert proper missing number flags (MNFs) for these reflections
OPTION: REDUCE [SILENT] [ASUNIT] ================================ Command to reduce reflections to the asymmetric unit. Phases & Hendrickson/Lattman coefficients (if present) will be updated SILENT Keyword to suppress output ASUNIT Asymmetric unit definition which can be: CCP4 Use CCP4 definitions (default) BIOMOL Use BIOMOL definitions TNT Use TNT definitions MATRIX Keyword followed by 9 integers i1-i9 which define a packing matrix definition The asymmetric unit is defined as the set of reflections which maximize: (i1*h+i2*k+i3*l)*1024**2+(i4*h+i5*k+i6*l)*1024+ i7*h+i8*k+i9*l Example: P4 hkl:h>=0,l>=0 0kl:k>=0 h>0:k>0 MATRIX 0 0 1 1 1 0 0 1 0 0 0 1 selects the hemisphere L>=0 1 1 0 selects the quadrant H+K>=0 0 1 0 selects the 0kl instead of h0l EXAMPLE: REDUCE CCP4 Reduces all indices to the asymmetric unit defined by CCP4
OPTION: REINDEX [MATRIX] ======================== Command to transform the indices. MATRIX Keyword followed by 9 numbers specifying the transformation matrix (row-wise). The program does not check the validity of the matrix and phases will not be changed The user also has to update the header manually if required After the transformation, the data are resorted and all cells transformed. EXAMPLE: REINDEX MATRIX 1 0 0 0 0 1 0 1 0 Transforms H K L into H L K
OPTION: RFREE nr_of_rfree [SHELL [width]] NOTE: this subroutine uses the CCP4 definition of RFREE data with 0=test set and 1=working set When you write out an XPLOR file then these flags are automatically converted to the reverse definition of XPLOR. A future version will also allow flags > 1 for multi-set RFREE flags Create a column named RFREE with values set to 0 for RFREE reflections and 1 for the others. The number of RFREE reflections is determined by the nr_of_rfree argument. By default RFREE reflections are selected at random. If the optional SHELL keyword is given then RFREE reflections will be taken in resolution shells The width of the resolution shells is 1/400th of the resolution range unless specified otherwise by the user. You may wish to try this if you have non-crystallographic symmetry. However, to get a reasonable number of shells they have to be thinner than I would like. In the future I may allow to actually input your NCS symmetry
OPTION: SELECT [MODE] TARGET CRITERIUM ====================================== Command to select a subset of reflections MODE may be one of the following words PLUS : Add selected records to the set MINUS : Remove selected records from the set ONLY : Only selected records will be kept NOT : Invert the selection criterium (NOT can combine with other modes) CRITERIUM is one the following: = val : select records with target = val > val : select records with target > val < val : select records with target < val >= val : select records with target >= val <= val : select records with target <= val <> val : select records with target <> val NOTE: "val" should be either a number or a column reference, e.g. col 1 ZONE z : Only when target is INDEX !!! Selects indices in zone z, where z is e.g. 2n or 3n or 2n + 1 etc PRESENT : > -1.0E+10 < 1.0E+10 ABSENT : NOT PRESENT ALL : select all records, no target needed NONE : deselect all records, no target needed INVERT : select unselected records & vice versa SYSABS : select records with an illegal hkl CENTRO : select centrosymmetric reflections ASUERR : select reflections outside as. unit PHAERR : select centrosymmetric reflections with an illegal phase MULTI n : select records with multiplicity of n TARGET is one of the following: COLUMN c1 Keyword followed by column-id Criterium refers to column c1 RESOL Criterium refers to the resolution INDEX idx Keyword followed by index-code index-code is [[+|-]H][[+|-]K][[+|-]L] EXAMPLES: ======== In the next examples CURRENT SELECTION is the selection from some previous SELECT command MODES: ONLY, PLUS, MINUS, NOT ============================= SELECT col 2 > 0 current selection AND this selection. So the AND operator is the default. E.g. you get a subset of the current selection SELECT only col 2 > 0 select refs that match this criterium independent of the current selection SELECT plus col 2 > 0 current selection OR this selection SELECT minus col 2 > 0 current selection AND NOT this selection SELECT not col 2 > 0 current selection AND NOT this selection SELECT plus not col 2 > 0 current selection or not this selection TARGETS: COLUMN, RESOL, INDEX ============================= SELECT column 2 > 0 < 100 select if value in column 2 is > 2 and < 100 SELECT column 1 > column 2 select if value in column 2 is > in column 1 SELECT resol < 8 select if resolution is better then 8 A SELECT INDEX h = 0 select the 0kl plane SELECT INDEX h - k = 0 select the hhl plane SELECT INDEX h + k + l zone 2n + 1 select reflections with h+k+l is odd SELECT index h = 0 SELECT index k = 0 SELECT index l zone 2n +1 select 00l reflections with l is odd CRITERIUM ========= SELECT col 1 = present select reflection if column 1 is not MNF SELECT col 1 = absent select reflection if column 1 is an MNF SELECT all select all reflections SELECT none deselect all reflections SELECT invert invert the selection currently in memory SELECT sysabs select reflections with indices that should be systematically absent (e.g. hkl = 0 3 0 in P2sub1) SELECT centro select centrosymmetric reflections SELECT asuerr select reflections outside the asymmetric unit SELECT phaerr select centrosymmetric reflections with illegal phase SELECT multi n select reflections on a n-fold symmetry axis (n must be an integer)
OPTION: SET ITEMS ================= Command to set header information -ITEMS is a list of header items to be changed ALL = all header items, TITLE = title cards, LABELS = column labels, TYPES = column types, CELL = unit cell parameters (not used by MTZ), DCELL = crystal-specific unit cell parameters, DWAVE = dataset-specific wavelength, SORT = sort order, SPACEGROUP = space group related data The program will list the old header information. The information given by the user will be used to replace the old data. If the user just gives a return, the old data will be kept. For the DCELL and DWAVE keywords the user will be given a list of crystals and datasets respectively. Only one line can be updated at a time. For the LABELS and TYPES keywords it is possible to modify a single column by giving the column ID for that column Examples: SET DCELL SET TYPES SET TYPES COL 5
OPTION: SORT CRITERIUM DIRECTION ================================ Command to sort the structure factor data base. CRITERIUM can be one of the following -[h k l] sort order may be specified as h k l or 1 2 3 or permutations thereof. The default is to sort on the current sort order as defined in the header info. The indices are always sorted in ascending order -RESOLution Sort on resolution -COLumn Sort on content of column id DIRECTION can be either: -UP Ascending sort order (this is the default) -DOWN Descending sort order Missing data is treated internally as a very small number (-1E+10) and will be sorted as such WARNING, the RESOL and COL options will mess up the index sort order. It is advised to restore the old sort order by another call to SORT to prevent funny behavior of subsequent options or programs :-) EXAMPLE: SORT l k h SORT resol SORT resol down SORT col fobs
OPTION: STOP ============ Terminate the program
Notice: This option is still in construction. Use it with care! OPTION: WINDOW NWIN COL col_id =============================== This option creates a new column in which it stores a local average of column col_id as function of resolution. The average is calculated by sorting the reflections by resolution and then sliding a window of NWIN reflections along all data points in column col_id. The central point in the window is set to the average value. For the first and last NWIN/2 reflections, which are never in the center of the window, the average will be obtained by linear extrapolation
OPTION: WRITE FILENAME [FORMAT] [COLUMN columns] [HEADER] ========================================================= Command to write a structure factor file. -FILENAME is the name of the file. The program will try to deduce the file format from the extension. It will recognize .mtz, .mdf, .snd, .xpl, .tnt, .31, .fin, .phs and .df FORMAT can be one of the following: MTZ, MDF, SND, XPL, TNT, 31, FIN, PHS or DF or a valid FORTRAN format string (see below). This overrules the file name extension format COLUMN Keyword to select specific columns. Columns can be specified by numbers or labels (also mixed), and in any order. The order of columns in the output file will reflect the specified order and not the order in SFTOOLS A column may also be given, and therefore written, twice (not always allowed, e.g. MTZ) If no columns are given, then the program will ask the user for each column whether or not to include it. If no COLUMN keyword is given all columns are read. THE COLUMN KEYWORD MUST BE THE LAST ARGUMENT ! HEADER Keyword to specify that only the header should be written to the given file File formats are: MTZ CCP4 format MDF old BIOMOL format SND BIOMOL ascii format XPL XPLOR format TNT TNT format 31 PHASES long and short binary formats FIN Xtalview fin-format PHS Xtalview phs-format DF Xtalview double fin-format NOTE: several file formats do not allow absent data. If one or more written columns of a reflection contain absent data then the whole reflection is rejected NOTE: For .fin and .df files sigma and amplitude columns are set to 9999 and 0 respectively if the sigma column is 0 or either column contains absent data NOTE: TNT files can have the following columns in the given order: Fobs, Sigma Fobs, Sigma, Phase, FOM Fobs, Sigma, Rfree Fobs, Sigma, Rfree, Phase, FOM Rfree, if present, MUST be column three. NOTE: Only the following columns make sense for XPLOR: FOBS, SIGMA, FOM, PHASE, WEIGHT, TEST FCALC, FPARTIAL, PA, PB, PC and PD. Make sure you write out at most one of each type. Use the COLUMN option to prevent the output of non-sensible columns. If the first 3 characters of a column label match the first 3 characters of FOBS, SIGMA, FOM, PHASE, WEIGHT, TEST, FCALC, FPARTIAL, PA, PB, PC or PD then SFTOOLS assumes that that is the XPLOR column type. If your column label does not match any of these, SFTOOLS will ask you to specify the XPLOR column type If you provide a Fortran FORMAT string then the first three values MUST be written as integers since these are the indices. ALL!!! other values MUST!!! be written as reals because that is how they are stored inside the program Examples: WRITE myfile.mtz COLUMN 1 2 (write column 1 and 2 to myfile.mtz as MTZ file) WRITE myfile.hkl MTZ COL 2 1 (write mtz with column 1 and 2 in reversed order) WRITE myfile.hkl FORMAT('HKL ',3i5,2f8.3) (write four columns in given format)
Allowed are the following types : H = index h, k or l P = phase angle J = intensity F = amplitude D = anom. diff. Q = standard deviation W = weight factor B = batch number I = any integer R = any real A = phase prob. coeff. (Hendrickson/Lattman) Y = M/ISYM, partial/reject flag and sym. number
Memory requirements are governed by parameters set in the sftools.inc file, and these may need to be increased for large problems. The program will inform you if your problem exceeds the current limits. If the program aborts before any program output is displayed (you may see a message "killed") then the array sizes are set too large to be handled by your computer. You must either decrease the array sizes, free up or buy more memory, or increase your swap file.
Program updates in between CCP4 releases will be made available by the author. Please subscribe to the SFTOOLS users list (by sending me an e-mail) or subscribe to the CCP4 bulletin board to be notified of changes.