
FFT (CCP4: Supported Program)NAMEfft, fftbig  fast Fourier transformSYNOPSISfft HKLIN foo.mtz MAPOUT foo.map [ ABCOEFFS
foo.txt ] DESCRIPTIONThe FFT (Fast Fourier Transform) program may be used to calculate Fouriers, difference Fouriers, double difference Fouriers, Pattersons and difference Pattersons from reflection data. The type of map is controlled by the input flags, principally LABIN. The input file will contain h k l Fi... SIGFi... Phases weights etc. and the required Fourier coefficients will be generated from these. Space group specific routines are available for some spacegroups and the output for these will usually be restricted in some way, i.e. sectioning axis, and output volume of map. All maps can be calculated in FFTSPACEGROUP P1 where these restrictions do not apply, but this may take longer. There is a version FFTBIG which calculates a whole map in memory which reduces internal I/O, but this is only available in FFTSPACEGROUP P1. You will need to choose an appropriate strategy for your problem; if you are short of memory or computer resources it is worth optimising the calculation, but on a large computer FFTBIG may be the best choice. N.B. you must have plenty of real memory to use FFTBIG  it will cause bad disc thrashing if the calculation won't fit into real memory. Specific FFT routines are available for these Space Groups in FFT:
Only P1 is available in FFTBIG. P2, P222 and P2221 used to be legitimate FFT space groups but have been removed. KEYWORDED INPUTThe various data control lines are identified by keywords. Only the first 4 characters of a keyword are significant. Absent values default to 0 unless otherwise stated. The cards can be in any order, except END (if present) which must be last. Numbers in [ ] are optional and can be left out. The only compulsory command is LABIN. The available keywords are: AXIS, BIAS, BINMAPOUT, EXCLUDE, FFTSPACEGROUP, FREERFLAG, GRID, LABIN, LIST, LPMAP, LPFMT, NOCHECKS, PATTERSON, PHTRANSLATION, PROJECTION, RESOLUTION, RHOLIM, SCALE, SYMMETRY, TITLE, VF000, XYZLIM, (END) LABIN <program label>=<file label>...(Compulsory.) F1=FP SIG1=SIGFP PHI=PHIC Names of items for the calculation are selected from the following list. H, K, L will always be used.
The items selected will determine the Fourier coefficients used for the calculation. If any of the assigned columns contains a missing datum the whole reflction will be omitted. Common types of maps:
Remember you need to have run MLPHARE with the appropriate FHOUT and APPLY keywords.
N.B. IMPORTANT! The items SIG1 and SIG2 are used to check the validity of the F for a reflection. This can be done in two ways at present either by checking SIGFn=0 or by checking SIGFn=MNF (see documentation on Missing Number Flags). MNFs give a more reliable way of checking reflections because even Fc and PHI can be checked. Another benefit with MNFs is for certain types of map F1 can be replaced by F2 if F1=MNF (see FILLIN). Sigma cutoffs can also be applied in order to reject relections (see EXCLUDE). All other keywords are given in alphabetical order below. AXIS <fast> <medium> <slow>In general DO NOT change the axis order unless you are in P1 or are very sure you know what you are doing! This is permitted if your map is being calculated using the routines for P1 or P222, but not otherwise. <fast> <medium> <slow> are the letters X, Y and Z in the appropriate order. Note that many of the FFT spacegroup specific routines have FIXED axis orders. In general these are Y,X,Z for those which have rotation axes along c, and are best output with zsections (all spacegroups with spacegroup number greater than 18 (P21212)). For P1, the monoclinic spacegroups, and spacegroups 16 (P 2 2 2), 17 (P 2 2 21) and 18 (P 21 21 2), the required axis order is Z,X,Y, which gives ysections. If this keyword is left out (the recommended procedure), and the map is calculated in FFT spacegroup P1 (the FFTBIG default) then the standard order for TRUE spacegroup is used, i.e. Z,X,Y for P1, the monoclinic spacegroups, and spacegroups 16, 17 and 18; for all higher symmetry spacegroups the standard axis ordering will be Y,X,Z. Otherwise, note that any axis permutation must make sense in the spacegroup used for the FFT, e.g. the P21 FFT (sg4) always generates a 21 axis along the section axis, through the origin. Axis permutation is only permitted in a few spacegroups and should probably by cyclic: 1, 2, 19, 21, 23, 47. In spacegroup 19, only cyclic permutations are valid, i.e. Y,X,Z (default); Z,Y,X; or X,Z,Y; others will give WRONG ANSWERS. BIAS <bias>If <bias> .NE.0, F = (F**3)/(F**2+(<bias>*SD(F))**2) BINMAPOUT [ NONE ]Send binary output to MAPOUT. This is the default. NONE stops this. EXCLUDE <keyword> <value> ...Each secondary keyword is followed by a number setting the appropriate limit. SIG1 Nsig1 and SIG2 Nsig2 *** reflections excluded if F1 lt Nsig1 * sd(F1) or F2 lt Nsig2 * sd(F2) F1LIM (F1minimum) F2LIM (F2minimum) IMIN (Minimum I) *** reflections excluded if F1 lt F1minimum or F2 lt F2minimum or I lt Iminimum (cut off applied BEFORE scaling or squaring for Patterson) F1MAX F1maximum F2MAX F2maximum IMAX Imaximum *** reflections excluded if F1 gt F1maximum or F2 gt F2maximum or I gt Imaximum (cut off applied BEFORE scaling or squaring for Patterson) DIFF difference_limit *** reflections excluded if Abs(Sc1*F1  Sc2*F2) gt difference_limit (cut off applied BEFORE squaring for Patterson) TERM limit *** reflections excluded if Sqrt( A**2 + B**2) gt limit for Fourier A**2 or F**2 gt limit for Patterson [default for all = 0.0 == no cut off] It is very important to use this sensibly for difference or anomalous Pattersons. As the terms in a Patterson are squared the map can be distorted by one or two large `differences' which have been overestimated. It is sensible to use the SIGi cut offs to exclude weak data, and to inspect the SCALEIT output to decide on a sensible value for DIFF. Many instruments have glitches and you may have a few completely incorrect estimates of F(hkl) which can hide the true signal. When calculating `anomalous Pattersons', internally DANO is treated like F1. Therefore, it is possible to assign F2 and SIG2 to the appropriate FPH and set SCALE F2 to 0.0001 or something extremely small. Formally you will be calculating a difference Patterson (F1F2) but because F2 is very small you are left with just the F1/DANO term. The advantage is that you can use the SIG2 check to exclude anomalous differences from weak measurements. If the input option to input intensities (LABI I= ...) is used, an origin removed Patterson can be calculated. FFTSPACEGROUP <SG>Space group name or number for Fourier calculation. Possible values [<name> (<number>)] are:
For a Patterson the space group should be P1bar(2) (for all space groups), P2/m(10) (for all monoclinic space groups, b axis unique), or Pmmm(47) (for all orthorombic space groups). If this command is omitted, the true symmetry is used if it is one of the FFT spacegroups, otherwise spacegroup P1 or P1 is used. If the crystal symmetry is different to this the program will check that the symmetry operators are compatible. An (incomplete) list of possible symmetry pairings is given below. For further examples consult International Tables Vol. A. FILLINWhen this keyword is specified the Fourier term k1 * F1 * exp{B1*s}  k2 * F2 * exp{B2*s} is replaced by this term below if F1=MNF [k1 * exp{B1*s}  k2 * exp{B2*s}] F2. Where k1,k2 and B1,B2 are the scales and Bfactors specified by the user respectively. The types of maps this procedure would benefit are 2FoFc, 3Fo2fc ... (n+1)FonFc maps. Noise levels could be reduced because rather than treating each Fourier term as zero for unmeasured Fo reflections, it will given an approximately correct value (Fc). However, the down side in these maps is that model bias would certainly increase. Maps should not be calcuated beyond the resolution of the observed data for obvious reasons. FREERFLAG <freeflag>Reflections where the value of the column FREE, taken from the MTZ file, equals <freeflag> (default 0) are omitted from the calculation. If you do not wish a freeR set to be used don't assign FREE. GRID <nx> <ny> <nz>  SAMPLE <grid_sample>Number of sampling divisions along whole cell edge (see restrictions below). Alternatively, the keyword SAMPLE allows specification of the fineness of sampling, e.g. GRID SAMPLE 3 gives a grid of about 1/3 of the maximum resolution: this is the default if this command is omitted. A larger value gives a finer sampling (minimum sampling = 2). LISTList Fourier terms in ASCII to logical name ABCOEFFS. This may be useful if you want to monitor the input, but the output file is HUGE and it should normally be suppressed. The columns output are: H K L k1*F1 PHI k2*F2 PHI2 W1 W2 A B ATAN(B,A) SQRT(AA+BB) See the LABIN keyword for a description of the symbols. If, for instance, your Pattersons are junk, and you suspect some special problem  all 0 2k 4l are junk or something  you can sort it on the SQRT(AA+BB) column to see where the large contributions come from. You see sometimes all F2 for these are <1 or something and get immediately suspicious. LPMAPOutput map to printer. LPFMT <nlines> <ncol> <idig> <ilin> <max> <min>For printer output, change format from default.
NOCHECKSSpecifies that no symmetry expansion or permutation is required and no checks needed to see if h k l is in the correct asymmetric unit. Limits on the value of h,k,l:
hkl: l>=0 hk0: h>=0 0k0: k>0 hkl: k>=0 and l>=0 hk0: h>=0 0k0: k>0 pg3 hkl:h>=0, k>0 00l:l>0 pg312 hkl:h>=0, k>=0 with k<=h for all l. if k = 0 l>=0 pg321 hkl:h>=0, k>=0 with k<=h for all l. if h = k l>=0 pg6 hkl:h>=0, k>=0, l>=0 with k>=0 if h=0 and k> 0 if h>0 pg622 hkl:h>=0, k>=0, l>=0 with h>=k If the FFTSPACEGROUP is different to the true SYMMETRY or the AXIS order is nonstandard for the FFT spacegroup the NOCHECK option is overridden. PATTERSONCalculate a Patterson map (Fourier is the default). If F1 is assigned on the LABIN line the amplitudes are squared after scaling and taking any differences. If I is assigned the input term is used as read. This allows you to calculate origin removed pattersons using the E2OR and F2OR terms output by ECALC. PHTRANSLATION [ HAND 2]Calculate a phased translation function (reference [3]). The terms are: Space_group CX CY CZ I41 0.0 0.5 0.0 I4122 0.0 0.5 0.25 F4132 0.75 0.25 0.75 I4132 0.25 0.25 0.25Scale is multiplied by 1/sqrt(Sigma((w*F1)**2)*Sigma((F2)**2) If the maximum peak in the phased translation map is high (typically greater than 50 RMS), then for hand 1 the model corresponding to PHI2 will need to be moved by this amount to overlap the model corresponding to PHI. If HAND 2 is specified the model corresponding to PHI2 will need to be inverted then moved. PROJECTIONCalculate projection along section axis. All reflections except those in the zone are ignored. The sampling interval along the section axis GRID should be left unchanged from 3D value, and the map limits on the section axis XYZLIM will be reset to 0 0. RESOLUTION <rmin> <rmax><rmin> and <rmax> are resolution limits in Angstrom (either
order). If one is 0 or blank, no high resolution cutoff, if both blank,
no cutoff. RHOLIM <rhomax> [ <rhomin> ]The scaling of the output map is usually controlled by the values input for VF000. However If these are set, the map will be automatically scaled (using v and F000) to give a maximum <rhomax> (and minimum if <rhomin> is given) in the first group of sections. The default option (which should normally be used, except possibly for Pattersons) gives a map on the true scale. SCALE F1  F2 <scale> <Bfactor>e.g. SCALE F1 2.0 0.0 F2 1.0 0.0 SYMMETRY <SG>Specifies true spacegroup as a name, number or explicit operators in the standard form. By default, this is taken from the input file, and it will probably cause chaos if you set it to anything else. TITLE <title>80 character title for map  sensible to choose an informative one. VF000 <vol> <F000>These parameters can be used to modify the scaling of the output map. The default values are <vol>=Cell_volume, and <F000>=0.0 These give a map approximately on absolute scale, and should usually not be altered. Setting <vol> = Cell_volume/100 would inflate the map values by 100. XYZLIM <xmin> <xmax> <ymin> <ymax> <zmin> <zmax>  ASURange of cell to be calculated. This defines the extent of the output map. The arguments to the XYZLIM keyword can be either: (i) six numbers giving the limits in cell divisions OR fractional coordinates, or else (ii) the subkeyword ASU (which will automatically set the map limits to be the CCP4 asymmetric unit for the true or Patterson spacegroup, as appropriate). See below for minimum and maximum requirements for each spacegroup. It is essential that <xmin> greater or equal to 0, and <xmax> is less than NX and so on (see definition of GRID). For other restrictions, see below. Some limits can be reset by the program but not all. In particular if your grid disagrees with these limits the program will not necessarily reset them sensibly. If this command is omitted, the limits will default to those of the asymmetric unit for the "fft spacegroup"  i.e. the spacegroup in which the fft calculation is performed in. This may or may not be the same as the asymmetric unit of the true spacegroup. For many spacegroups there are several choices of such an asymmetric unit, and you may wish to override the default one. The inverse transform used in SFALL has quite strict limits, and if you want to use that you probably ought to take the default values, which are compatible. Remember that if the map is to be extended to cover a molecule, it is fastest to calculate as much of the cell as possible (the whole cell in P1) as input to EXTEND. RESTRICTIONSGrid restrictions:Note that symmetry expansion is not permitted to spacegroups marked by *. For all spacegroups, NX,NY,NZ must have no prime factors greater than 19, and NX must be greater than 2 HMAX + 1, etc. Below, `n' is an integer, so `2n' means the number must be even. Space section group number axis P1 1 y NZ=2n P1 2 y NY=2n, NZ=2n, NX=2n, P21 4 y NY=4n, NZ=2n, P2/M 10 y NX=2n, NY=8n, NZ=2n, *P21212 18 y NY=4n, NZ=2n, *P21212a 1018 y NY=4n, NZ=2n, P212121 19 z NY=2n, NZ=4n, *C2221 20 y NX=4n, NY=4n, NZ=4n, *C222 21 y NX=4n, NY=4n, NZ=4n, I222 23 y NX=4n, NY=4n, NX=4n, PMMM 47 z NX=8n, NY=8n, NZ=8n, *P41212/P43212 92,96 z NX=2n, NY=NX, NZ=8n, *P31/P32 144,145 z NX=6n, NY=6n, NZ=6n *R3 146 z NX=6n, NY=6n, NZ=6n *P3121/P3221 152,154 z NX=6n, NY=6n, NZ=6n *P61/P65 169/170 z NX=6n, NY=6n, NZ=12n Section restrictions:Spacegroup Section limits P1 all Z all X Y 0 to NY1 P1bar all Z all X Y 0 to NY/21 P21 all Z all X Y 0 to NY/21 P2/m 01/2 X all Z Y 0 to NY/21 P21212 all Z all X Y 0 to NY/2 P21212a all Z all X Y 0 to NY/2 P212121 all X all Y Z 0 to NZ/2 C2221 01/2 Z all X Y 0 to NY/4 C222 01/2 Z all X Y 0 to NY/4 I222 01/2 Z all X Y 0 to NY/4 Pmmm 01/2 X 01/2 Y Z 0 to NZ/2 ?? P4122 all X all Y Z 0 to NZ/2 P41212 all X all Y Z 0 to NZ/2 ?? P4322 all X all Y Z 0 to NZ/2 P43212 all X all Y Z 0 to NZ/2 P31 all X all Y Z 0 to NZ1 P32 all X all Y Z 0 to NZ1 R3 all X all Y Z 0 to NZ/31 or R3 01/3 X and Y Z 0 to NZ 1 P3121 all X all Y Z 0 to NZ1 P3221 all X all Y Z 0 to NZ/6 P61 all X all Y Z 0 to NZ/61 P65 all X all Y Z 0 to NZ/61 For maps with Ysections the output has Z fastest and X medium. Possible FFTSPACEGROUP/SYMMETRY pairing:FFTSPACEGROUP Crystal spacegroup group number P1 1 all P1 2 all centric spacegroups, Pattersons P21 4 C21 I21 P21212a P... P2/M 10 Pmmm etc *P21212 18 C222 F222 I222 *P21212a 1018 C222a F222a I222a P212121 19 C2221a I212121 P42 cubics PMMM 47 P4/mmm *P41212/P43212 92,96 *P31/P32 144,145 R3 146 R32 *P3121/P3221 152,154 *P61/P65 169/170 P6122/P6522 INPUT AND OUTPUT FILESThe input files are the control data file and a standard MTZ reflection data file. Unless suppressed, a standard format output map file will be written by the program. Input:
Output:
PRINTER OUTPUTThe printed output starts with details from the input control data and details from the MTZ subroutines when the input reflection data file is read. Details are given of the array sizes and of the scratch files used. If a line printer listing of the map was requested, each section is listed in the requested format preceded by a title and details identifying the section and followed by the minimum and maximum density (E) values on the section. If no line printer listing was requested then only the minimum and maximum densities for each section. Error Messages are MEANT to be self explanatory, here are some of them: You may get errors from binsort which is in fact a separate program The FFT uses a Buffer set in the Main program. If you get the BUFFER Too Small message you can either: reduce your grid size, or recompile the program with a bigger value for IDIM (currently 500000). Similar action is needed if you get this message:
There are a series of error messages which mean your grid sampling does not satisfy the requirements.
If NOCHECKS is set you must have reflections in right asymmetric unit, and sorted. Run CAD to do this if you have a problem. You will get this sort of error message.
PROGRAM FUNCTIONThe crystallographic fast Fourier transform (FFT) program was written by Lynn F. Ten Eyck. The use of the FFT in crystallography has been discussed by A. Immirzi (ref.1) and the methods for incorporating crystallographic symmetry into FFT calculations has been discussed by L.F. Ten Eyck (ref.2). The computational speed of the FFT is due to two factors. An examination of the algebra on which the CooleyTukey Fast Fourier Transform is based has led to a different approach towards incorporating crystallographic symmetry into Fourier transforms than that based on the trigonometric relationships as given in the International Tables for Crystallography. The method involves extracting the desired information from the results of an ordinary complex Fourier transform of a short sequence rather than a long one. Second, the complex Fourier transforms are calculated by an extremely efficient and general set of subroutines for calculating one dimensional transforms. The program does not suffer from any stringent restrictions on the number of input points though certain rules have to be obeyed as described above in notes 5 and 6. The program has been developed by Birkbeck College to allow for the generation of equivalent reflections using the space group symmetry elements so that the program may be used for space groups other than those for which it was specifically written. It has also been developed to allow for the input of selected data items from a binary reflection data file so that a number of different types of Fourier transforms may be calculated without having to prepare a special input file. These include: Fourier synthesis, difference Fourier, double difference Fourier, Patterson function, and difference Patterson functions. If the reflection file has been modified to correctly include Missing Number Flags then it is possible to substitute data. When calculating a difference map of some kind i.e. using F1 and F2, then if F1=MNF then F2 is substituted for F1. This is useful in reducing the noise in maps for 2FoFc or 3Fo2Fc maps for instance. Low resolution terms tend to be absent from measured data but contribute significantly to the overall quality of the map. Assuming that these low resolution terms are zero just because they are unmeasured can lead to significant noise in the map. Therefore, substituting Fc for Fo will inevitably be a better approximation than zero. The down side is that model bias will increase in the map and may cause trouble if large sections of data are unmeasured. REFERENCES
EXAMPLESSimple unix example script found in $CEXAM/unix/runnable/Also found combined with other programs in the example scripts ($CEXAM/unix/runnable/)AUTHOROriginator: Lynn F. Ten Eyck SEE ALSO 