General Averaging Program Version 5.0, February 1996 David I Stuart and Jonathan Grimes Laboratory of Molecular Biophysics Rex Richards Bldg. South Parks Rd. Oxford UK LAST UPDATE OF WRITE-UP: 11th February 1996 ------------------------------------------------------------------------ CONTENTS 1. OVERVIEW <#overview> 2. THE LOGIC <#logic> 3. SUMMARY OF BASE LEVEL KEYWORDS <#summary> 4. THE PARSER <#parser> 5. LOGICAL INTERNAL DATA STREAMS (LIDS) <#lids> 6. DESCRIPTION OF BASE LEVEL KEYWORDS <#description> 7. SAMPLE INPUT FILES <#sample> 8. BUILDING THE PROGRAM <#build> 9. PROGRAMMING NOTES <#notes> ------------------------------------------------------------------------ OVERVIEW Many proteins crystallise with several subunits or molecules in the crystallographic asymmetric unit. This is a very good source of phasing power, but for years the programs available, usually derived from originals by Gerard Bricogne, were very fiddly to use and designed for a previous generation of computers. Recently a number of people have produced more modern versions, this is our offering. Although the program contains nothing fundamentally new or exciting, for us the excitement comes from being able to quickly use it to do things and test ideas that had daunted us! Included are functions to average electron density, produce skew sectioned maps, extend electron density maps, obtain and refine non-crystallographic symmetry operators, obtain geometric and 'Wang' type envelopes etc. The program is designed to perform a number of these functions in a single run. This then allows us to be efficient on workstations and other machines that are very fast at doing maths once they've got their hands on the data but not so hot on i/o. This philosophy means we have not worried if some of the algorithms are expensive on CPU time. A little now about the internals of the program. A major aim is to produce a simple to use program (messing around with maps gets fraught enough without obscurity in the programs). In general the major functions are invoked by a single keyword. Thus for example *"*AVERAGE <#aver>*"* (or *"*AVER <#aver>*"* or *"*AV <#aver>*"*) will initiate an averaging process. The program will ask for further input as required. We use Robert Esnouf's parser, GETWORD, for all interaction with the user, most functions are invoked from base level keywords although in some cases there is some nesting to a higher level for further input. In general this parser behaves rather like the one Axel Brunger uses in X-PLOR, so if you are familiar with that program you should have no problems. The program uses the dynamic memory allocation facilities available with R.Esnouf's parser to allocate and deallocate the memory which holds the maps and this helps to minimise input/output operations. These maps are held in a constant format but may in practice be envelopes, Patterson functions, electron density maps ... or whatever. This internal format is defined by the program so you do not need to worry about it, however unsurprisingly it uses bricking to minimise page faults within the scratch space. Once inside the program your maps may be referred to by name, the name (or label) is given by you when the map is read into or created by the program and consists of up to eight characters. Smaller storage areas are set aside for various associated information (space group, cell dimensions, grid size etc); the idea is that you don't usually have to worry about this stuff. Thus the program is completely space group general and needs only the space group number for a given map, which it normally gets when it reads the map in. To avoid machine-specificity a map format that the program will read in and write out is CCP4 ASCII, produced by the CCP4 program MAPEXCHANGE from CCP4 style binary maps. The program will also read and write these CCP4 binary maps, and has a facility for rapid reading and writing of envelopes in a compressed format. Additional internal space is set aside for a stack of non-crystallographic symmetry operators (NCSO). These are referred to by number in most of the internal operations of the program. When a program function is invoked that operates on one or more maps that function behaves rather like a stand-alone program; it uses 'logical internal data streams' (LIDS <#lids>), in the same way that keyboard input to a Fortran program under VMS comes from a logical stream, FOR005. You normally assign these streams before invoking an option, if you haven't done so then the program will probably remind you! These streams are discussed below. The program has now been used for solving a number of different problems in various space-groups etc., this means that many bugs have been uncovered and most of those corrected. There are still bugs in the program and a number of shortcomings - please inform us of problems/suggestions. We have used bits of other peoples programs so please don't distribute the program further. This write-up will deal with various aspects of the program, including a blow-by-blow account of the currently available options and then end with some command files to illustrate some of the things that can be done. Note that it is surprisingly easy to make mistakes when setting up averaging protocols, we have attempted to make the program fairly sensible, however you should always check carefully with the write-up that what you are hoping to do is really sensible and also you should check the output as well as checking maps/envelopes on a graphics system. We are now at the stage where we uncover more errors in peoples thinking about the problem than in the program itself, however as we state above we are confident that the program is not error-free. Please let us know if you find the logic obscure - we welcome suggestions for improvements. Good luck! RETURN TO CONTENTS <#contents> ------------------------------------------------------------------------ THE LOGIC This section is designed to take you through one or two applications, so that you can appreciate the overall way the program works, and useful things like which way round matrices have to be defined. There are normally several ways of achieving a similar final outcome, however when designing your procedure there are one or two things to bear in mind, eg. How finely should the map be sectioned ? Should I use single or double interpolation ? We tend to work at about 1/3 of the minimum Bragg spacing and always avoid double interpolation because of the errors incurred. / Averaging, a 1-D illustration (single interpolation method): / Input domain ! ! Output domain Input map Input envelope Matrices Output envelope Output map 1 * * 0 2 * * 0 6------------------------R1,t1---| * 0 2 * | * 0 7 * |----------------------6 3 * | * 0 6------------------------R2,t2---| * 0 2 * 0 6 * * 0 9 * * 0 To execute an averaging function (keyword AVER <#aver>) the program makes a scan, pixel by pixel, over the entire output domain. For each of the pixels in the output domain the program checks the output envelope and sees if the pixel is required. The program then attempts to construct a best estimate of the electron density at this position, using whatever NCS operators are active (1 and 2 in the above example). You may, if you wish, also use the current electron density value in the output map as one observation (it will be given the same weight as each observation taken from the input domain). The NCS operators are used to map the output domain TO the appropriate positions in the input domain (it is important to get these right - see the detailed discussion in the OUTX <#outx> and TOSS <#toss> functions a few pages below). For each of these positions an observation is picked up IF it can pass successfully through the input domain envelope, which acts as a further filter. When all permitted pixels have been assembled from the input map the output pixel is set to the arithmetic mean of these N values. Note that, in general, since the electron density in the input map needs to be derived for positions that don't fall on the grid on which the input map is sampled we will need to interpolate. We tend to use 11-point interpolation for this process which is quick and seems to work nicely. NOTE that because the envelopes act as filters for their respective maps it only really makes sense to use them if they are on the same sampling grid and cover exactly the same volume of space as the maps which they are filtering, take care over this! Note also that since the space group, cell dimensions etc are carrried around with each map you do not need to worry about these parameters - if the input and output domains correspond to different crystal forms any functions applied to these forms (such as cross-averaging between the input and output maps) should all be handled correctly by the program. If it doesn't, let us know! To help make and manipulate envelopes there are a number of base level keywords, look intially at the description for MENV <#menv>, WANG <#wang> and AENV <#aenv>. For filling up a complete volume of map from, say, the crystallographic asymmetric unit you should look at the FOLD <#fold> or CMAP <#cmap> option. Finally a word of warning. If you have only one part of it the map properly reconstructed, you should be careful what you do with it - if you have the crystallographic symmetry options switched on you might find yourself inadvertantly taking a piece of it you didn't want that is related by crystallographic symmetry to the piece you were after. If in doubt look at results on the graphics at every stage - it doesn't take long and can save much heartache. In general we find that problems often arise through using crystallographic symmetry operators when they are not appropriate. The default within the program is therefore NOT to use them. There are situations where they can be extremely helpful. For example if we are taking a crystallographic asymmetric unit as the input map from which we wish to produce an averaged output map covering, say, a protomer, then it would be sensible to switch ON symmetry for the input map. MCSY <#mcsy> is a good way of doing this. RETURN TO CONTENTS <#contents> ------------------------------------------------------------------------ SUMMARY OF BASE LEVEL KEYWORDS (In alphabetical order) ADCG <#adcg> --- (used subsequently during a REFI <#refi>nement) define a local centre of gravity about which the rotations in the refinement will be performed. AENV <#aenv> --- define an envelope as the logical .AND. of two envelopes. ASSI <#assi> --- assign a map in the data base to an internal stream. ASYM <#asym> --- add a non-crystallographic symmetry operator (NCS) to the list of such operators. AVEM <#avem> --- average between any number of maps in the data base. AVER <#aver> --- average one or two maps in the data base. CELL <#cell> --- redefine the cell dimensions for a certain map in the data base. CMAP <#cmap> --- copy one map directly into another (defined or undefined). CONV <#conv> --- convolute electron density with a Gaussian smearing function. CPU <#cpu> --- print CPU times used, both in total and since the keyword was last used. CSEA <#csea> --- refine the fit between two electron densities by a search of cell parameters. We have used this option for fitting cryo-em maps to protein maps. CUTG <#cutg> --- truncate electron density to lie between bounds CUTL <#cutl> and CUTU <#cutu>. CUTL <#cutl> --- define lower cutoff for electron density. CUTP <#cutp> --- print cutoffs on electron density. CUTU <#cutu> --- define upper cutoff for electron density. DEFA <#defa> --- default level of printed output (cf VERB <#verb>ose and TERS <#ters>e). DMAP <#dmap> --- delete a map from the data base. EXIT <#exit> --- end the program. FLAT <#flat> --- set electron density to a particular value outside of an envelope. FLIP <#flip> --- flip the electron density, outside the envelope, cf FLAT <#flat>. FMAP <#fmap> --- list a map presently in the data base (print a selected portion) on a fine grid. FMAS <#fmas> --- list a map presently in the data base (print as a mask) on a fine grid. FOLD <#fold> --- take a volume of density and try to fill the output map using the crystallographic symmetry operators. HIST <#hist> --- form histogram of electron density and use it to define envelope. IMPR <#impr> --- flag to use improper NCS. INIT <#init> --- initialize the main arrays, this will delete the entire data base of maps. LENV <#lenv> --- create an envelope labelled according to NCS operator to be used in quick averaging. LISY <#lisy> --- list some inverse NCS operators. LMAP <#lmap> --- list a map presently in the data base (print a selected portion). LMAS <#lmas> --- list a map presently in the data base (print as a mask). LSYM <#lsym> --- list some NCS operators. MENV <#menv> --- make an envelope (create a map in the data base using certain geometrically constrained logical operators). MCSY <#mcsy> --- switch on or off crystallographic symmetry operators for a particular map. NCSY <#ncsy> --- no, don't use the crystallographic symmetry operators. NOPI <#nopi> --- disable piping (qv). NORE <#nore> --- switch off recording of printed output in a file. NOXP <#noxp> --- write NCS operators in GAP format (c.f. XPLO <#xplo>r). OENV <#oenv> --- define an envelope as the logical .OR. of two envelopes. OUTX <#outx> --- write out non-crystallographically related coordinates with flags suitable for XPLOR. PEXP <#pexp> --- apply rotational symmetry from a space group to existing NCS ops. PIPE <#pipe> --- pipe output of one operation to input of next. PROP <#prop> --- flag to use proper NCS. QASS <#qass> --- show current assignments to internal streams. QMAP <#qmap> --- list the local names of all the maps in the data base. QMEM <#qmem> --- show how much memory remains free in the data base. QSYM <#qsym> --- list all currently active NCS operators. RECO <#reco> --- record all printed output in a file. REFI <#refi> --- refine some of the non-crystallographic symmetry operators. RESE <#rese> --- redetermines the maximum, minimum, mean and the rms density and updates the map header with this information. RMAP <#rmap> --- read a map into the data base from a file. RZIP <#rzip> --- read a compressed envelope into the database. This option should only be used for envelopes. SCMA <#scma> --- set scalefactor to apply when rescaling map SCUT <#scut> --- cut an electron density map using limits defined as multiples of the sigma level. The density is set to its absolute value before the sigma cuts are applied. SETM <#setm> --- set electron density to some defined value. SGRP <#sgrp> --- change the space group for a map. SHMA <#shma> --- set shift to apply when rescaling map SMAP <#smap> --- rescale a map using defined shift and scalefactor or scale 2 maps using calculated shifts and scale factors. STAT <#stat> --- define status of file written out as NEW or UNKNOWN. STOP <#stop> --- exit from the program. TERS <#ters> --- terse form of printed output. TIDY <#tidy> --- tidy up an envelope. Resets pixels to protein/solvent depending on nearest neighbours. TIME <#time> --- print time and date. TITL <#titl> --- define a local title for this program run. TOSS <#toss> --- read in coordinates for NCS related atoms and from them derive least squares best values for some NCS operators. UNPA <#unpa> --- unpack into the NCS related protomers the averaged electron density produced from an averaging run using a labelled envelope generated using LENV <#lenv>. This is the double interpolation option. VERB <#verb> --- verbose form of printed output. WANG <#wang> --- make wang envelope. WISY <#wisy> --- write out some inverse NCS operators to a file. WMAP <#wmap> --- write a map from the data base into a file. WSYM <#wsym> --- write out some NCS operators to a file. WZIP <#wzip> --- write out a compacted envelope. Should only be used for envelopes. XPLO <#xplo> --- write NCS operators in XPLOR format. YCSY <#ycsy> --- yes, use the crystallographic symmetry operators. ZSYM <#zsym> --- cancel all the currently defined NCS operators. RETURN TO CONTENTS <#contents> ------------------------------------------------------------------------ THE PARSER (P2, nee GETWORD, by R. Esnouf) 1. Keywords can be upper or lower case, usually only the first 4 characters are used. 2. If you type in less than 4 characters, it will accept it, as long as there is no ambiguity (eg ASS <#assi> is as good as ASSI <#assi>). 3. A shriek :- *!* causes rest of the current input line to be ignored. 4. Stuff enclosed in curly brackets .. *{ ignore me }* .. is ignored. 5. Any equals signs are ignored. 6. Strings, if they include embedded spaces, should be wrapped in *" "*s. 7. The *@* convention for directing input from another file works as expected. This is very convenient, eg you write symm ops to a file using *"*WSYM <#wsym>*mat.sym"* ,say, and then subsequently load them by *"@mat.sym"* (when the program is waiting for a base level prompt). 8. A command preceded by a *#* character is passed through to the operating system (convenient to, for instance to issue a *DIR* command to VMS without leaving the program, but remember to put the VMS command string in *" "*s if it is a string with spaces in it!). 9. Spaces and blank lines are ignored. 10. For more information (use of parameters etc) see /GETWORD.FOR/.f/ source code. 11. ***#NOECHO* will switch off prompt generation, *#ECHO* switches it on again. This is useful if you are running a batch job, when lots of prompts just clutter the log file. 12. If you are puzzled as to what is expected of you at any stage then you should type *?* and the parser will try to help, by giving a list of options if waiting for a keyword, or telling you the type of input required if it is waiting for a value for a variable to be input. RETURN TO CONTENTS <#contents> ------------------------------------------------------------------------ LOGICAL INTERNAL DATA STREAMS (LIDS) There are at present 5 streams used: ** *MAPI* - usually the input map for a particular function. ** *MAPO* - usually the input map for a particular function. ** *ENVI* - usually the envelope for input filter for a particular function. ** *ENVO* - usually the envelope for output filter for a particular function. ** *ENVM* - used when an envelope is to be created from scratch (in MENV). NB if you don't want to use an envelope for a particular operation then assigning *"OFF"* to that LIDS will disable envelope filtering (this is the default status when the program starts up). You can assign maps to these streams with ASSI <#assi> (see below). If the program is PIPE <#pipe>-ing the streams (and that is the default), then a function that produces output to *MAPO* will automatically route this to *MAPI* when it is done and deassign *MAPO*. RETURN TO CONTENTS <#contents> ------------------------------------------------------------------------ DESCRIPTION OF BASE LEVEL KEYWORDS (In alphabetical order) ADCG <#adcg> AENV <#aenv> ASSI <#assi> ASYM <#asym> AVEM <#avem> AVER <#aver> CELL <#cell> CMAP <#cmap> CONV <#conv> CPU <#cpu> CSEA <#csea> CUTG <#cutg> CUTL <#cutl> CUTP <#cutp> CUTU <#cutu> DEFA <#defa> DMAP <#dmap> EXIT <#exit> FLAT <#flat> FLIP <#flip> FMAP <#fmap> FMAS <#fmas> FOLD <#fold> HIST <#hist> IMPR <#impr> INIT <#init> LENV <#lenv> LISY <#lisy> LMAP <#lmap> LMAS <#lmas> LSYM <#lsym> MENV <#menv> MCSY <#mcsy> NCSY <#ncsy> NOPI <#nopi> NORE <#nore> NOXP <#noxp> OENV <#oenv> OUTX <#outx> PEXP <#pexp> PIPE <#pipe> PROP <#prop> QASS <#qass> QMAP <#qmap> QMEM <#qmem> QSYM <#qsym> RECO <#reco> REFI <#refi> RESE <#rese> RMAP <#rmap> RZIP <#rzip> SCMA <#scma> SCUT <#scut> SETM <#setm> SGRP <#sgrp> SHMA <#shma> SMAP <#smap> STAT <#stat> STOP <#stop> TERS <#ters> TIDY <#tidy> TIME <#time> TITL <#titl> TOSS <#toss> UNPA <#unpa> VERB <#verb> WANG <#wang> WISY <#wisy> WMAP <#wmap> WSYM <#wsym> WZIP <#wzip> XPLO <#xplo> YCSY <#ycsy> ZSYM <#zsym> ------------------------------------------------------------------------ ADCG When refining NCSOs a rotation about the origin of the unit cell can introduce a large translational component (it can swing the molecule around). To avoid this problem this keyword allows a centre-of-gravity to be input (in Angstroms in orthogonal frame), then rotations are made around this point (and post-hoc sorted out internally so that they are really about the origin). This has an effect on all subsequent REFI <#refi>'s Input ** *3_real_numbers*: (Xcog Ycog Zcog) ------------------------------------------------------------------------ AENV Forms the logical .AND. of two envelopes. This command is used in conjunction with MENV <#menv> (q.v.) and is useful if you want to make a molecular envelope. In the absence of a set of coordinates it is often convenient to produce a Wang type envelope (q.v.) and a geometric envelope (a set of spheres or planes that define the limits of the molecule) and then using this logical .AND. option on both these envelopes. This will leave protein only where there was protein defined by both envelopes. This option requires that both envelopes are on the same grid, but not necessarily with the same limits. If the envelopes are not on the same grid the program gives a warning message then drops you back down to the base level. Streams ** *ENVI* - envelope 1 *ENVO* - envelope 2 Envelope 2 is overwritten by the output. ------------------------------------------------------------------------ ASSI Assign a map in the data base to an internal stream. Format ASSI internal_map_name LIDS <#lids> eg *ASSI map1 MAPI* ** ------------------------------------------------------------------------ ASYM Add a non-crystallographic symmetry operator to the list of such operators. The 3x3 matrix is input with columns varying fastest, followed by a translation vector. Input ** *12_real_numbers*: (R11,R12,R13,R21......R33,T1,T2,T2) ------------------------------------------------------------------------ AVEM Average a number of maps. The averaging is driven by the output map. Essentially the program scans through the output map and for each pixel for which an electron density value is required it uses the NCSOs to generate non-integral pixel coordinates in the input maps from where density values are extracted and the average value of which is written into the output pixel. Note that the electron density value already in the output map pixel can be used in the averaging if you wish (USEO <#avemuseo1>, see below). This option is very useful in the case of improper symmetry. Each NCSO is associated with an input map, thus many input maps can be averaged. This may be just what you need is you are lucky (?) enough to have half a dozen crystal forms, cf AVER <#aver>. Streams Input maps - defined by internal name. *MAPO* - output map. *ENVI* - envelope to filter data as it comes from the input map. *ENVO* - envelope to filter the pixels to be used in the output map. Input This is a bit more complicated than input for most functions. The program will first request the *number* of NCSO's to be used and then for each of these the asssociated map *label* and, if required, the *label for the envelope* to be used to filter that input file. For example to take three input maps RT37_1, RT37_2 and RT37_3, associated with symmetry operators 10,11 and 12, and to use an input envelope (env37_2) to filter RT37_2: 10 RT37_1 NOE! note ENV / NOE switch then input env on/off 11 RT37_2 ENV ENV37_2 12 RT37_3 NOE Next the program will request (unless its already setup) the *NAME* of the output map to be used and the output envelope. Then, if the output map does not already exist you will be given the option of changing its size etc (otherwise it will be the same dimensions etc as the input map). Ths is done by entering the next level of parser where the options are: UPDA <#avemupda> RESE <#avemrese> NOTR <#avemnotr> USEO <#avemuseo1> BACK <#avemback1> QLIM <#avemqlim> GO <#avemgo1> * *UPDA* - allows you to redefine the start point, end point and grid spacing for the output map. *9_integer_numbers* will be requested: NSTARTX, NENDX, NGRIDX, NSTARTY, NENDY...NGRIDZ. The values are in grid points, with ngrid defining the number of points in a complete unit cell. * ***RESE* - allows you to redefine the axis ordering (IUVW), the program will prompt for *3_integer_numbers*, eg 1 2 3 for z sections on the output map. * ***NOTR* - a hint to the program that the NCSOs have no translational component, this is not necessary but helps the function move a litle more quickly. * ***USEO* - use the density in the output map as part of the averaging process. * ***BACK* - quit and go back to the base level of the program (do this if you are feeling trapped at this stage!). * ***QLIM* - print current output map limits. * ***GO* - moves onto the next stage, where you would be if the output map was already set-up. The next stage allows you to define the averaging and has a series of key-words: ALL <#avemall> STAR <#avemstar> END <#avemend> GO <#avemgo2> INTP <#avemintp> CORQ <#avemcorq> CORA <#avemcora> USEO <#avemuseo2> BACK <#avemback2> * *ALL* - use all NCSO for averaging (default). * ***STAR* - prompts for *1_integer_number* defining the first NCSO to be used in the averaging. * ***END* - prompts for *1_integer_number* defining the last NCSO to be used in the averaging. * ***GO* - go and do it. * ***INTP* - prompts for *1_integer_number* defining the interpolation scheme to be used. The default is Nordmans 11 point non-linear interpolation which we find works better than 8 point and is not significantly slower. The program expects an integer, either 1, 8 or 11. * ***CORQ* - use quick correl. coefficient to monitor averaging (best). * ***CORA* - use slower correl. coefficient to monitor averaging (not so good). * ***USEO* - use the density in the output map as part of the averaging process. * ***BACK* - quit and go back to the base level of the program (do this if you are feeling trapped at this stage !). Then *MAPO* is piped to *MAPI*, and *MAPO* deassigned. ------------------------------------------------------------------------ AVER Average a map. The averaging is driven by the output map. Essentially the program scans through the output map and for each pixel for which an electron density value is required it uses the NCSOs to generate non-integral pixel coordinates in the input map from where density values are extracted and the average value of which is written into the output pixel. Note that the electron density value already in the output map pixel can be used in the averaging if you wish (USEO, see below). This option is very useful in the case of improper symmetry. See AVEM <#avem> for averaging a lot of maps together. Streams ** *MAPI* - input map. *MAPO* - output map. *ENVI* - envelope to filter data as it comes from the input map. *ENVO* - envelope to filter the pixels to be used in the output map. Input This is a bit more complicated than input for most functions. If no input map assignment is active the program will first request the name of the map to be averaged. The same is then true of the output map and the input and output envelopes. Then, if the output map does not already exist you will be given the option of changing its size etc (otherwise it will be the same dimensions etc as the input map). This is done by entering the next level of parser where the options are: UPDA <#averupda> RESE <#averrese> NOTR <#avernotr> USEO <#averuseo1> BACK <#averback1> QLIM <#averqlim> GO <#avergo1> * *UPDA* - allows you to redefine the start point, end point and grid spacing for the output map. *9_integer_numbers* will be requested: NSTARTX, NENDX, NGRIDX, NSTARTY, NENDY, .... NGRIDZ. The values are in grid points, with ngrid defining the number of points in a complete unit cell. * *RESE* - allows you to redefine the axis ordering (IUVW), the program will prompt for *3_integer_numbers*, eg 1 2 3 for z sections on the output map. * *NOTR* - a hint to the program that the NCSOs have no translational component, this is not necessary but helps the function move a little more quickly. * *USEO* - use the density in the output map as part of the averaging process. * *BACK* - quit and go back to the base level of the program (do this if you are feeling trapped at this stage!). * *QLIM* - print current output map limits. * *GO* - moves onto the next stage, where you would be if the output map was already set-up. The next stage allows you to define the averaging and has a series of key-words: ALL <#averall> STAR <#averstar> END <#averend> GO <#avergo2> INTP <#averintp> CORQ <#avercorq> CORA <#avercora> USEO <#averuseo2> BACK <#averback2> CORM <#avercorm> NCOR <#averncor> * *ALL* - use all NCSO for averaging (default). * *STAR* - prompts for *1_integer_number* defining the first NCSO to be used in the averaging. * *END* - prompts for *1_integer_number* defining the last NCSO to be used in the averaging. * *GO* - go and do it. * *INTP* - prompts for *1_integer_number* defining the interpolation scheme to be used. The default is Nordmans 11 point non-linear interpolation which we find works better than 8 point and is not significantly slower. The program expects an integer, either 1, 8 or 11. * *CORQ* - use quick correlation coefficient to monitor averaging (best). * *CORA* - use slower correlation coefficient to monitor averaging (not so good now). * *USEO* - use the density in the output map as part of the averaging process. * *BACK* - quit and go back to the base level of the program (do this if you are feeling trapped at this stage!). * *CORM* - do correlation mapping. This is essentially the same as a normal averaging run but it assigns the correlation coefficient value for that pixel and its NCS related pixels to that pixel. This can be useful when generating up averaging envelopes. * *NCOR* - switch off correlation mapping (default). Then *MAPO* is piped to *MAPI*, and *MAPO* deassigned. ------------------------------------------------------------------------ CELL Redefine the cell dimensions for a certain map in the data base. Input The program asks for the name of the map to be altered (does not take stream *MAPI*, this seems safer but could be changed), and then prompt for *6_real_numbers* defining the updated cell dimensions (A, B, C, ALPHA, BETA, GAMMA - in Å and degrees). ------------------------------------------------------------------------ CMAP Copy one map directly into another (defined or undefined). Streams ** *MAPI* - the input map. *MAPO* - the output map. Input The output map may be a straight copy of the input map (same size etc), or one may update the dimensions and/or sectioning axis. This is done by entering the next level of the parser where the options are: UPDA <#cmapuda> RESE <#cmaprese> BACK <#cmapback> QLIM <#cmapqlim> GO <#cmapgo> * *UPDA* - allows you to redefine the start point, end point and grid spacing for the output map. *9_integer_numbers* will be requested: NSTARTX, NENDX, NGRIDX, NSTARTY, NENDY, ... , NGRIDZ. The values are in grid points, with ngrid defining the number of points in a complete unit cell. * *RESE* - allows you to redefine the axis ordering (IUVW), the program will prompt for *3_integer_numbers*, eg 1 2 3 for z sections on the output map. * *BACK* - quit and go back to the base level of the program (do this if you feel trapped at this stage!). * *QLIM* - print current limits for output map. * *GO* - moves onto the next stage, where you would be if the output map was already set-up. Then *MAPO* is piped to *MAPI*, and *MAPO* deassigned. ------------------------------------------------------------------------ CONV Convolute electron density with a Gaussian smearing function. This is done by a very simple algorithm, which does however seem to work well. Every pixel in the input map is examined in turn and replaced by the weighted average of itself and 8 nearby pixels. The 8 pixels are NSTEP_NOW pixels from the active pixel in X, Y and Z, ie in the plane where the active pixel A is, for NSTEP_NOW=2, *---* ----- --A-- ----- *---* Where marked pixels are used. Once the mean is established the pixel is updated. Thus some of the pixels to be used in the smearing of a pixel are already smoothed. This introduces an asymmetry which we ameliorate by making two passes through the map, one 'forwards' and the next 'backwards'. In general the user specifies the value STEP and the program makes several of these pairs of passes through the map, eg for step=2: NSTEP_NOW=1 ....forwards....backwards NSTEP_NOW=2 ....forwards....backwards NSTEP_NOW=1 ....forwards....backwards ....done, with a total of 6 passes. The upshot of this is that the smearing is much greater than if a single pass were made, which means that we can use a rather sharp function. This function is a Gaussian, defined by giving a B-factor, which is then converted into the equivalent width in real space. We have used STEP=2 and B=25Å2 with success at a resolution of 4 Å, but suggest you check for your case. The program will print some statistics on the map before smearing and subsequently after every pass forward and backward so you can get a feel for what's happening (i.e. for a step size of 2, there will be printed 7 sets of statistics). Note that one has to be a bit careful if you want convolute density that is not the asymmetric portion of the cell because the program uses crystallographic symmetry to wrap around for pixels that are outside the edge of the map. If you do convolute a non-asymmetric portion we suggest you switch off crystallographic symmetry using NSYM <#convnsym>. Streams ** *MAPI* - input map, smeared by this function. *ENVI* - input envelope, smear within this envelope. Input The parser enters another level of keyword input, where the options are: STEP <#convstep> BFAC <#convbfac> GO <#convgo> BACK <#convback> NSYM <#convnsym> * *STEP* - prompts for *1_integer_number* defining the maximum step size to use when convoluting (def=2). * *BFAC* - prompts for *1_integer_number* defining the smearing function in terms of a Gaussian (def=50.0). * *GO* - go and convolute map. * *BACK* - quit and go back to the base level of the program (do this if you are feeling trapped at this stage!). * *NSYM* - switches off CRYSTALLOGRAPHIC symmetry, which prevents the program wrapping around to pick up crystallographically related pixels. This should ONLY be used when one is convoluting an expanded map (i.e. not the asymmetric unit). This can be avoided by using an envelope to filter the convolution that does not touch the edge of the map. ------------------------------------------------------------------------ CPU Print CPU usage in total and also since the keyword CPU was last used. ------------------------------------------------------------------------ CSEA Refine the fit between densities by a grid search over user defined limits in cell parameters. This has been used in particular for refining the fit between cryo-electron microscopy maps, where one is not sure of the absolute physical dimensions of the particle, and calculated density for the structure of a component protein of the viral capsid. NOTE that both densities corresponding to the known structure have to be taken down to the origin. This will be changed so that one simply defines the vector between the origin and the approximate centre of gravity of the 2 densities to be used in the refinement. The operator to move from the output map to the input map needs to have been already defined. The grid search is done on the output map. One can refine separately A, B or C, or A and B together, or all 3 cell axes locked together. The program will ask for the lower and upper cell parameter and the step size for the grid search. For each step the cell parameters for the output map are updated and new fractional to orthogonal matrices and the inverse are recalculated. The real space R-factor is used as a target function. Streams ** *MAPI* - input map. *MAPO* - output map. *ENVI* - envelope to filter those pixels from the input map to be used in the grid search. *ENVO* - envelope to filter those pixels from the output map to be used in the grid search. Input The parser enters a keyworded level where one can define the averaging bit of the grid search and has a series of keywords: ALL <#cseaall> STAR <#cseastar> END <#cseaend> GO <#cseago> INTP <#cseaintp> CORQ <#cseacorq> CORA <#cseacora> * *ALL* - use all NCSO for averaging (default). * *STAR* - prompts for *1_integer_number* defining the first NCSO to be used in the averaging. * *END* - prompts for *1_integer_number* defining the last NCSO to be used in the averaging. * *GO* - go to the next level. * *INTP* - prompts for 1_integer_number the defining interpolation scheme to be used. The default is Nordmans 11 point non-linear interpolation, which we find works better than 8 point and is not significantly slower. The program expects an integer, either 1, 8 or 11. * *CORQ* - use quick correlation coefficient to monitor averaging (best). * *CORA* - use slower correlation coefficient to monitor averaging (not so good now). The program then asks you what cell parameters are to be refined. At the moment only cell axes can be. One can either refine A, B or C, AB together, or ABC locked together. Make sure if refining A and B together or A, B and C together that one types "AB" or "ABC". Finally you are asked the minimum size of cell axis/axes to start the grid search from (C_MIN should be a real number between 0 and 1200), the maximum cell axis to end on (between C_MIN and 1200) and the step size C_STEP. The program will prompt for*3_real_numbers* (C_MIN, C_MAX and C_STEP). ------------------------------------------------------------------------ CUTG Truncate electron density to lie between bounds CUTL <#cutl> and CUTU <#cutu> (q.v.). Density values .GT. CUTU are set to CUTU and values .LT. CUTL are set to CUTL. If you choose to set CUTL greater than CUTG all pixels will be set to CUTL. Streams ** *MAPI* - input map. This is modified by the function. *ENVI* - input envelope. The function is applied within the envelope. ------------------------------------------------------------------------ CUTL Define lower cutoff for electron density (as applied in CUTG <#cutg>). Input ** *1_integer_number*: CUTL (def=0). ------------------------------------------------------------------------ CUTP Print cutoffs on electron density (CUTL <#cutl> and CUTU <#cutu>, q.v.), as applied in CUTG <#cutg>. ------------------------------------------------------------------------ CUTU Define upper cutoff for electron density (as applied in CUTG <#cutg>). Input ** *1_integer_number*: CUTU (def=32000). ------------------------------------------------------------------------ DEFA Set the amount of printed output produced to the default level. This is normally a reasonable setting when setting things up. See VERB <#verb> and TERS <#ters>. ------------------------------------------------------------------------ DMAP Delete a map from memory. This frees up scratch space in the program and may be essential during complex operations on large maps. Input ** *1_character_string*: (MAP_LABEL), note that since this is a rather drastic function we do not use the internal stream *MAPI*, it seems safer to force the user to explicitly define the internal name of the map to be deleted. e.g. *DMAP MAP1* ** ------------------------------------------------------------------------ EXIT Exit from the program. ------------------------------------------------------------------------ FLAT Set electron density at every pixel outside the input envelope (ie. set to 0) to either to the mean value for all the pixels outside the envelope or to a particular density level set by the user. The electron density within the input envelope (hopefully protein) is then floated around this density value. If you wish you can do this without an envelope (why?). Streams ** *MAPI* - input map. This is modified by the function. *ENVI* - input envelope. The function is applied outside the envelope. Input The parser enters another level of keyword input, where the options are: FLOT <#flatflot> GO <#flatgo> BACK <#flatback> * *FLOT* - prompts for *1_integer_number* defining the value of density to be set in the solvent region. If this keyword is not used the solvent region (ie outside *ENVI*) is set to the mean value for all pixels outside of the envelope. * *GO* - go and convolute map. * *BACK* - quit and go back to the base level of the program (do this if you are feeling trapped at this stage !). ------------------------------------------------------------------------ FLIP Flip the electron density at every pixel outside the input envelope (ie. at envelope pixels set to 0) around the mean value for the solvent level. The option takes the input map, for pixels in the solvent region calculates the mean solvent value, and then flips solvent density around this value. Is supposed to speed up phase convergence. If you wish you can do this without an envelope (why?). Streams ** *MAPI* - input map. This is modified by the function. *ENVI* - input envelope. The function is applied outside the envelope. ------------------------------------------------------------------------ FMAP List a map presently in the data base (print a selected portion), on a fine grid. Since every map has a 'sectioning axis' associated with it (defined by the array UVW, usually determined by the Fourier program but can be reset during a CMAP <#cmap> operation [qv] ) this function prints the map sectioned in that way. By default every 2nd pixel is printed for the 'in-section' axes whereas only every 4th section is printed. This is to give a reasonable view of the map without being too tedious. The map is printed in I4 format, scaled. The default scale factor is 0.05. Stream ** *MAPI* - input map to be listed. ------------------------------------------------------------------------ FMAS List a map presently in the data base (print as a mask) on a fine grid. Since every map has a 'sectioning axis' associated with it (defined by the array UVW, usually determined by the Fourier program but can be reset during a CMAP <#cmap> operation [qv]) this function prints the map sectioned in that way. By default every pixel is printed for the 'in-section' axes whereas only every 2nd section is printed. This is to give a reasonable view of the map without being too tedious. The pixel is represented as a '-' if the value is less than or equal to CUT (def=0.0) and as a '*' if the value exceeds CUT. This is very convenient for looking at envelopes, where the protein is shown as (hopefully) a mass of '*'s. Note however that if you flatten a solvent region to its mean value (eg using FLAT <#flat>) then that mean value may be greater than 0, in that case FMAS would represent the solvent region as solid '*'s. In that case you should look at the program output to see what the mean solvent value was and set CUT to a slightly larger value. Stream ** *MAPI* - input map to be listed. ------------------------------------------------------------------------ FOLD Take a volume of density and try to fill the output map using the crystallographic symmetry operators. This function, unlike all the others, is driven by the input map. The input map is examined, pixel by pixel and for each pixel that gets through the filter of the input envelope (if that is active) all the possible crystallographically related positions are generated (with unit translations applied etc). Each of these is then checked against the output map to see if it fits, if it does it is written out . This makes absolutely sure that we fill all the nooks and crannies of that map - it is usually used to generate back a full crystallographic asymmetric unit from the molecular unit of the map. Note that since we are driven, pixel by pixel, from the input map the program can only do something sensible if the grid spacings of the input and output maps match (it is not possible to interpolate). The two maps therefore have to be on the same grid. If they are not the program will give you a warning message and drop back down to the base level. Streams ** *MAPI* - input map. *MAPO* - output map. *ENVI* - envelope to filter data as it comes from the input map. *ENVO* - envelope to filter the pixels to be used in the output map. Input If the output map does not already exist you will be given the option of changing its size etc (otherwise it will be the same dimensions etc as the input map). This is done by entering the next level of parser where the options are: UPDA <#foldupda> RESE <#foldrese> BACK <#foldback> QLIM <#foldqlim> GO <#foldgo> * *UPDA* - allows you to redefine the start point, end point and grid spacing for the output map. *9_integer_numbers* will be requested: NSTARTX, NENDX, NGRIDX, NSTARTY, NENDY, ... , NGRIDZ. The values are in grid points, with ngrid defining the number of in a complete unit cell. * *RESE* - allows you to redefine the axis ordering (IUVW), the program will prompt for *3_integer_numbers*, eg 1 2 3 for z sections on the output map. * *BACK* - quit and go back to the base level of the program (do this if you are feeling trapped at this stage!). * *QLIM* - print current output map limits. * *GO* - moves onto the next stage, where you would be if the output map was already set-up. Then *MAPO* is piped to *MAPI*, and *MAPO* deassigned. ------------------------------------------------------------------------ HIST Form histogram of electron density and use it to define envelope. The envelope will not, in general, overwrite the input map. The lower electron density pixels will be defined as solvent, the higher ones as protein. Streams ** *MAPI* - input map. *ENVO* - output envelope (created by this function). Input ** *1_real_number*: Fractional solvent content (ie. 0.6 for 60 % solvent). ------------------------------------------------------------------------ IMPR Flag to use improper NCS. This only affects the internal operation of the TOSS <#toss> function [qv]. This is by default set to '.true.'. ------------------------------------------------------------------------ INIT Initialise the main arrays, this will delete the entire data base of maps, this is invoked automatically at the start of the program and you should rarely need to do it again! ------------------------------------------------------------------------ LENV Make a labelled envelope to be used in the 'simple' averaging. The envelope is partitioned into volumes that are defined in terms of their relationship to the protomer/molecule 1, by the number of the non-crystallographic operator used to create the envelope. So, given an envelope defining the protomer, and ncs operators that will describe the operation from the protomer onto the ncs related molecules (ie to average these molecules onto the defined protomeric unit) this option will build up envelopes that are labelled with the ncs operator number used to derive them. Streams ** *MAPI* - an input map, this must be the envelope defining the protomer/molecule 1. NB. This map will be modified by this function !! Input The parser will then ask for the operators to use in building up the envelopes. These operators MUST be defined so as to move from a point in protomer/molecule 1 to the ncs-related molecules and NOT the operations to go from a point in the ncs-related molecules to the defined molecule. It does make sense. The options being: ALL <#lenvall> STAR <#lenvstar> END <#lenvend> GO <#lenvgo> * *ALL* - use all NCSO for building up envelopes. This should be used the unitary operator IS NOT defined (default). * *STAR* - prompts for *1_integer_number* defining the first NCSO to be used in the envelope creation. * *END* - prompts for *1_integer_number* defining the last NCSO to be used in the envelope creation. * *GO* - go to the next level. ------------------------------------------------------------------------ LISY List some inverse NCS operators to the screen. The program asks for 2 integers defining the first operator and the final operator to be listed. Input ** *2_integer_numbers* defining first and the last operator. ------------------------------------------------------------------------ LMAP List a map presently in the data base (print a selected portion), on a coarse grid. Since every map has a 'sectioning axis' associated with it (defined by the array UVW, usually determined by the Fourier program but can be reset during a CMAP <#cmap> operation [q v]) this function prints the map sectioned in that way. By default every 4th pixel is printed for the 'in-section' axes whereas only every 8th section is printed. This is to give a reasonable view of the map without being too tedious. The map is printed i n I4 format, scaled. The default scale factor is 0.05. A portion of the map can now also be listed out, so one can check up in closer detail on particular regions. Stream ** *MAPI* - input map to be listed. Input The parser enters another level where the options are: MAP <#lmapmap> SCAL <#lmapscal> INTE <#lmapinte> GO <#lmapgo> STAR <#lmapstar> END <#lmapend> BACK <#lmapback> * *MAP* - prompts for *1_character_string*: (MAP_LABEL), which allows the map to be listed to be defined or redefined. * *SCAL* - prompts for *1_integer_number* defining the scale factor (def=0.05). * *INTE* - prompts for *3_integer_numbers* defining intervals for printing the map, along the three axes, fast, medium and slow (def=2,2,4). * *STAR* - prompts for *3_integer_numbers* * *END* - prompts for *3_integer_numbers* * *GO* - go and do it. * *BACK* - quit and go back to the base level of the program (do this if you are feeling trapped at this stage!). ------------------------------------------------------------------------ LMAS List a map presently in the data base (print as a mask) on a coarse grid. Since every map has a 'sectioning axis' associated with it (defined by the array UVW, usually determined by the Fourier program but can be reset during a CMAP <#cmap> operation [qv]) this function prints the map sectioned in that way. By default every 2nd pixel is printed for the 'in-section' axes whereas only every 4th section is printed. This is to give a reasonable view of the map without being too tedious. The pixel is represented as a '-' if the value is less than or equal to CUT (def=0.0) and as a '*' if the value exceeds CUT by 1. The values thereafter are the incremental values above CUT. This is very convenient for looking at envelopes, where the protein is shown as (hopefully) a mass of '*'s. Note however that if you flatten a solvent region to its mean value (eg using FLAT <#flat>) then that mean value may be greater than 0, in that case LMAS would represent the solvent region as solid '*'s. In that case you should look at the program output to see what the mean solvent value was and set CUT to a slightly larger value. A portion of the mask can now also be listed out, so one can check up in closer detail on particular regions. Stream ** *MAPI* - input map to be listed. * Input * The parser enters another level where the options are: MAP <#lmasmap> CUT <#lmascut> INTE <#lmasinte> STAR <#lmasstar> END <#lmasend> GO <#lmasgo> BACK <#lmasback> * *MAP* - prompts for *1_character_string*: (MAP_LABEL), which allows the map to be listed to be defined or redefined. * *CUT* - prompts for *1_integer_number*. Pixels with value .LE. CUT will be shown as '-', above this value they become '*'s. * *INTE* - prompts for *3_integer_numbers* defining intervals for printing the map, along the three axes, fast, medium and slow (def=1,1,2). * *STAR* - prompts for *3_integer_numbers* * *END* - prompts for *3_integer_numbers* * *GO* - go and do it. * *BACK* - quit and go back to the base level of the program (do this if you are feeling trapped at this stage!). ------------------------------------------------------------------------ LSYM List some NCS operators to the screen. The program asks for 2 integers defining the first operator and the final operator to be listed. Input ** *2_integer_numbers* defining first and the last operator. ------------------------------------------------------------------------ MENV Make an envelope (create a map in the data base using certain geometrically constrained logical operators). Streams ** *MAPI* - an input map, used as a template for dimensions of *ENVM*. *ENVM* - the output envelope created by MENV. Note that if the USEI <#menvusei> keyword is specified this map will NOT be initialised and will be used as a starting envelope to be further elaborated. Input The output envelope may be a straight copy (in terms of dimensions) of the input map, or one may update the dimensions and/or sectioning axis. This is done by entering the next level of the parser where the options are: UPDA <#menvupda> RESE <#menvrese> GO <#menvgo1> BACK <#menvback1> USEI <#menvusei> * *UPDA* - allows you to redefine the start point, end point and grid spacing for the output envelope. *9_integer_numbers* will be requested: NSTARTX, NENDX, NGRIDX, NSTARTY, NENDY, ... , NGRIDZ. The values are in grid points, with ngrid defining the number of points in a complete unit cell. * *RESE* - allows you to redefine the axis ordering (IUVW), the program will prompt for *3_integer_numbers*, eg 1 2 3 for z sections on the output envelope. * *GO* - moves onto the next stage. * *BACK* - quit and go back to the base level of the program (do this if you feeling trapped at this stage!). * *USEI* - do NOT initialise starting envelope. Then by specifying the input map (stream *MAPI*) and the output envelope (stream *ENVM*) as the same internal map you can use this function to tart up an existing envelope, rather than starting from scratch every time. Next, if you have not invoked the USEI <#menvusei> keyword above, you enter the level where the envelope is initialised. Here you should enter the initial value to which the envelope is to be set (eg 0 for all solvent at the outset). Finally you enter a keyworded level where you define the structure of the envelope. At present the options are: SPHE <#menvsphe> PLAN <#menvplan> AUTO <#menvauto> GO <#menvgo2> BACK <#menvback2> ATOM <#menvatom> AUTP <#menvautp> Please note that one cannot define both spheres and planes in a single run by successive calls to SPHE <#menvsphe> and PLAN <#menvplan>. This is no problem as one can modify the envelope in a next run by the USEI <#menvusei> keyword. * *SPHE* - uses a spherical primative to modify the envelope. First you should enter *3_real_numbers* defining the centre of the sphere. These values should be in Angstroms with respect to the standard orthogonal axes (these axes are PDB standard, as used in X-PLOR). Next you should supply the *sphere radius* (in Angstroms). Next enter *1_integer_number* (IVAL) to set modified pixels: (eg 1 for protein, 0 for solvent). Finally you should enter *1_integer_number*, which defines a flag (INOUT). This determines whet her the pixels inside (INOUT=0), or outside (INOUT=1) are to be set to value IVAL. The present version of the program allows up to 30 sphere primatives. * *PLAN* - uses a plane primative to modify the envelope. This requires *6_real_numbers* to specify the 2 ends of a line, followed *by 1_integer_number* (IVAL) specifying the value that modified pixels are to be set to. A plane is defined perpendicular to, and bisecting, the line joining the two points. The program will check for every pixel whether it is 'outside' with respect to ANY of the planes - if it isn't, ie it is well and truly 'inside' then that pixel is set to IVAL. The point taken as the inside point is the SECOND of the pair of points. This is useful for convex objects such as viruses (up to 30 planes are allowed at present). * *AUTO* - sets up a series of contact planes between a given point and all points related to this by crystallographic symmetry within a certain limiting radius. This is useful for something nice and convex like a virus where a sensible set of contact plane s may be generated by simply supplying the centre of the virion. This option requires further numerical input *(i)* the coordinates of the point, XC, YC, ZC, in Angstroms, usual orthogonal frame, *(ii)* the limiting radius, only neighbours closer than this distance will be considered, *(iii)* the value to set 'inside' pixels to (see explanation to PLAN keyword above). NB AUTO option doesn't work yet!!!! * *GO* - go and make the envelope. * *BACK* - quit and go back to the base level of the program (do this if you are feeling trapped at this stage!). * *ATOM* - use a PDB coordinate set to modify the envelope. This may be useful in molecular replacement. The program prompts for a PDB file name which is subsequently read in. You then enter a keyworded level which allows you to define what atoms from the PDB file to use. The options are CALP <#menvcalp> MAIN <#menvmain> ALL <#menvall3> and GO <#menvgo3>. o *CALP* - use only alpha-carbon atoms to define the envelope. First *1_real_number* is entered defining a radius around each atom. Pixels within this radius are considered as envelope. Then the program prompts for *1_integer_number* (IVAL) specifing what value to set pixels to within the envelope. o *MAIN* - use only main chain atoms to define the envelope. First *1_real_number* is entered defining a radius around each atom. Pixels within this radius are considered as envelope. Then the program prompts for *1_integer_number* (IVAL) specifying what value to set pixels to within the envelope. o *ALL* - use all atoms in PDB file to define the envelope. First *1_real_number* is entered defining a radius around each atom. Pixels within this radius are considered as envelope. Then the program prompts for *1_integer_number* (IVAL) defining what value to set pixels to within the envelope. o *GO* - go and do it. Note that the program then returns you to the main keyworded level. It does *NOT* return you to the keyworded level SPHE <#menvsphe>**PLAN <#menvplan> etc. * *AUTP* - automatically generate a crude "protomeric" envelope particularly used for virus averaging. This will take a point in your protomeric unit and using the defined NCS operators automatically generate up planes that define your protomeric unit. This envelope can then be used in conjunction with spherical envelopes or solvent envelopes to more precisely define the molecular averaging envelope. This should be used particularly when doing double interpolation averaging on some of the more CPU demanding virus maps. Because the NCS will be proper for viruses there is no problem in a protomeric envelope that does not actually define the physical capsomer. *3_real_numbers* defining a point in the protomeric unit are required followed by a *1_integer_number* to define the value to set the envelope internally. You then enter a keyworded level which allows you to define what NCS operators to use. The options at present are ALL <#menvall4> STAR <#menvstar> END <#menvend> GO <#menvgo4> o *ALL* - use all NCSO for averaging (default) o *STAR* - prompts for *1_integer_number* defining the first NCSO to be used to generate up the first plane. o *END* - prompts for *1_integer_number* defining the last NCSO to be used to generate up the last plane. o *GO* - Go and do it (this returns you to previous keyworded level SPHE <#menvsphe>*, *PLAN <#menvplan> etc) ------------------------------------------------------------------------ MCSY Switch on or off crystallographic symmetry operators for a particular map. Input ** *2_character_strings*: (MAP_LABEL, flag), flag may be "ON" or "OFF" Example MCSY map1 off ------------------------------------------------------------------------ NCSY No, don't use the crystallographic symmetry operators, ie switch off for all maps. This is the default. ------------------------------------------------------------------------ NOPI Disable PIPE <#pipe>-ing (qv). ------------------------------------------------------------------------ NORE Switch off recording of printed output in a file. ------------------------------------------------------------------------ NOXP NCS operators written to a file using the WSYM <#wsym> option will be written out in GAP format, ready to be read back in. Use XPLO <#xplo> to toggle output format to XPLOR type. ------------------------------------------------------------------------ OENV Forms the logical .OR. of two envelopes. This command is used in conjunction with MENV <#menv> (q.v.) and is useful if you want to make a molecular envelope. This option is essentially the same as AENV <#aenv> but will leave protein where there was protein in the output map or the input map. As with AENV the two maps need to be on the same grid, but not necessarily the same limits If the envelopes are not on the same grid the program gives a warning message then drops you back down to the base level. Streams ** *ENVI* - envelope 1 *ENVO* - envelope 2 Envelope 2 is overwritten by the output. ------------------------------------------------------------------------ OUTX Write out non-crystallographically related coordinates with flags in a format suitable for XPLOR. Each set of coordinates is written to a separate file. A terminal oxygen is automatically added (if it is not already present) before the non-crystallographic operations are applied. The unitary matrix must be included in the non-crystallographic operators. It is important to realise, in order to avoid confusion, that the matrix to use, if one wants to transform element/molecule 1 onto element/molecule 2, is the one used to average element/molecule 2 onto element/molecule 1. This means that if elements 1, 2, 3 and 4 etc are being averaged into element 1 density by GAP, using a set of NCS operators, then the coordinates for element 1 will suffice, given the SAME set of NCS operators, to refine the structure with STRICT NCS CONSTRAINTS. The OUTX option will, given the coordinates for element 1, generate all the coordinate files, and these should then all be put into XPLOR for less strict NCS restrained or NCS unrestrained refinement. The program will ask for a template chain identifier that must be between 1000 and 9000 for each continuous piece of polypeptide chain. The program then writes out PDB files with the input PDB filename and a subscript numbered according to the operator used, eg. if the input pdb file is vp7.pdb and the template identifier is 1000, the output pdb files wil be vp7_001.pdb, vp7_002.pdb etc, with chain identifier 1001, 1002 etc. Note that there is also an option, INV, that allows coordinates to be moved in the other direction, ie the negative of the translation vector and the inverse of the rotation matrix are applied. Input ** *1_character_string*: (FILENAME) - Name of PDB file read in. ** *1_integer_number* - template chain identifier. The program will then enquire which operators to use, options being: ALL <#outxall> STAR <#outxstar> END <#outxend> INV <#outxinv> GO <#outxgo> * *ALL* - use all NCSO for averaging (default). * *STAR* - prompts for *1_integer_number* defining the first NCSO to be used in the averaging. * *END* - prompts for *1_integer_number* defining the last NCSO to be used in the averaging. * *INV* - use inverse of normal transformation(s). For each of the NCS operators the translation vector is first SUBTRACTED from the coordinates, which are then rotated by the inverse of the rotation matrix. * *GO* - go to the next level. ------------------------------------------------------------------------ PEXP Take the space group operators for the map defined by stream MAPI and search through them for pure rotational operators. Then multiply up any existing NCS operators by each of these. Thus if the are 5 NCS operators defining, say, a 5-fold axis and the space group is I23, the crystallographic 2- and 3-fold axes would be applied to generate a total of 60 NCS operators (possibly defining full icosahedral symmetry). ------------------------------------------------------------------------ PIPE Pipe output of one operation to input of next. This causes those operations that produce an output map to reassign that map to stream *MAPI* so that it will be used by the next function. ------------------------------------------------------------------------ PROP Flag to use proper NCS (only affects the operation of TOSS <#toss> [q.v.] ). If one does have proper ncs symmetry, switching this flag will improve the accuracy of operators out of TOSS. ------------------------------------------------------------------------ QASS List the current assignments to internal streams. ------------------------------------------------------------------------ QMAP List the local names of all the maps in the data base. ------------------------------------------------------------------------ QMEM Show how much memory remains free in the data base. ------------------------------------------------------------------------ QSYM List all currently active NCS operators. ------------------------------------------------------------------------ RECO Record all printed output in a file. This is very useful if you are running the program on-line. Input ** *1_character_string*: - name of the file to which the log will be written. ------------------------------------------------------------------------ REFI Refine some of the non-crystallographic symmetry operators. This uses a simple steepest descent search procedure and refines rotations and/or translations (def. is both). The target function is the correlation coefficient. Test shifts are applied to the parameters to be refined and the shift giving the biggest improvement in the correlation coefficient is accepted as defining an improved NCS operator (or operators if several are refined together they are `locked' together). If no test shift improves the target function the step size for the test shift is halved and the process repeated. The process stops when the required number of cycles have been performed or when the step size for the search falls below the lower threshold. Essentially at each test point the process is analogous to an averaging run but in this case it is wise to use the output map as an `anchor' against which the input density is refined. See the example <#exampleb> input in the section below to get the feel of this. Streams ** *MAPI* - input map. *MAPO* - output map *ENVI* - envelope to filter data as it comes from the input map. *ENVO* - envelope to filter the pixels to be used in the output map. Input This is a little more complex than for most functions, and uses several levels of keyworded input. If the output map does not already exist you will be given the option of changing its size etc (otherwise it will be the same dimensions etc as the input map). This is done by entering the next level of parser where the options are: UPDA <#refiupda> RESE <#refirese> NOTR <#refinotr1> USEO <#refiuseo1> GO <#refigo1> BACK <#refiback1> * *UPDA* - allows you to redefine the start point, end point and grid spacing the output map. *9_integer_numbers* will be requested: NSTARTX, NENDX, NGRIDX, NSTARTY, NENDY, ... , NGRIDZ. The values are in grid points, with ngrid defining the number of points in a complete unit cell. * *RESE* - allows you to redefine the axis ordering (IUVW), the program will for *3_integer_numbers*, eg 1 2 3 for z sections on the output map. * *NOTR* - a hint to the program that the NCSOs have no translational component, this is not necessary but helps the function move a little more quickly. * *USEO* - use the density in the output map as part of the averaging process. * *GO* - moves onto the next stage, where you would be if the output map already set-up. * *BACK* - quit and go back to the base level of the program (do this if you feeling trapped at this stage!). The next stage allows you to define the averaging bit of the refinement and has a series of key-words: ALL <#refiall> STAR <#refistar> END <#refiend> GO <#refigo2> INTP <#refiintp> CORQ <#reficorq> CORA <#reficora> USEO <#refiuseo2> BACK <#refiback2> * *ALL* - use all NCSO for averaging (default). * *STAR* - prompts for *1_integer_number* defining the first NCSO to be used in the averaging. * *END* - prompts for *1_integer_number* defining the last NCSO to be used in the averaging. * *GO* - go to the next level. * *INTP* - prompts for *1_integer_number* the defining interpolation scheme to used. The default is Nordmans 11 point non-linear which we find works better than 8 point and is not significantly slower. The program expects an integer, either 1, 8 or 11. * *CORQ* - use quick correlation coefficient to monitor averaging.(best) * *CORA* - use slower correlation coefficient to monitor averaging.(not so good now) * *USEO* - use the density in the output map as part of the averaging process. You will normally want to do this for refinement. * *BACK* - quit and go back to the base level of the program (do this if you feeling trapped at this stage !). The final level of input specifically controls the refinement parameters and uses keywords: NCYC <#refincyc> ROTA <#refirota> TRAN <#refitran> NORO <#refinoro> NOTR <#refinotr3> GO <#refigo3> WRIT <#refiwrit> BACK <#refiback3> * *NCYC* - prompts for *1_integer_number* defining the number of cycles to be performed (def=10). * *ROTA* - prompts for *2_integer_numbers* defining initial step size and threshold for step size (in degrees) (def=4.0,0.25). Performs rotational refinement. * *TRAN* - prompts for *2_integer_numbers* defining initial step size and low threshold for step size (in Ang) (def=1.0,0.1). Performs translation refinement. * *NORO* - do not perform rotational refinement. * *NOTR* - do not perform translational refinement. * *GO* - go and do it. * *WRIT* - prompts for *1_character_string*: (FILE_NAME) - the name of the to which the refined NCS operator(s) are written. * *BACK* - quit and go back to the base level of the program (do this if you are feeling trapped at this stage!). ------------------------------------------------------------------------ RESE After averaging or some other density modification procedure the maximum, minimum, mean and rms densities defined in the map header will be incorrect. This option just recalculates the mean and rms densities and updates the maximum and minimum densities and writes these new values back into the map header. Note the input map and envelope have to be on the same grid; if they are not the program will warn you and drop out back to the base level. After the density limits etc are calculated they will be written to the screen. Streams ** *MAPI* - input map. *ENVI* - input envelope ------------------------------------------------------------------------ RMAP Read a map into the data base from a file. Stream ** *MAPI* - input map. Input ** *1_character_string*: (FILE_NAME) - the name for the file containing the map (CCP4 ASCII or BINARY format). ------------------------------------------------------------------------ RZIP Read an ENVELOPE quickly into the data base from a compressed envelope file that MUST have been created by WZIP <#wzip>. Stream ** *MAPI* - input map. Input ** *1_character_string*: (FILE_NAME) - the filename for the unformatted compressed file containing the envelope. ------------------------------------------------------------------------ SCMA Define a scalefactor to be applied when rescaling a map. Input ** *1_real_number* - scalefactor to be applied when rescaling a map ( default 1.0) ------------------------------------------------------------------------ SCUT This is an alternative to the initial stage in the Wang type procedure. The electron density at every pixel is replaced by its absolute value. Then any pixel greater than SIG_MAXsigma (where sigma is automatically calculated over the subset of pixels being considered) is set to SIG_MAXsigma. Any pixel with value less than SIG_MINsigma is set to zero. This method seems to be an improvement over the conventional WANG method. Streams ** *MAPI* - input map (map modified by this function). *ENVI* - envelope to filter input map. Input ** *2_real_numbers*: (SIG_MIN and SIG_MAX) - any pixel less than SIG_MINsigma is set to zero; and any pixel greater than SIG_MAXsigma is set to this value. Values we would recommend are SIG_MIN about 0.3 and SIG_MAX about 5. ------------------------------------------------------------------------ SETM Set electron density to some defined value (not yet implemented). ------------------------------------------------------------------------ SGRP Redefine the space group for a particular map in the database. This simply changes the space group number defined in the header information for the particular map. Input The program asks for the name of the map whose space group number is to be altered (does not take stream *MAPI*, this seems safer but could be changed), and then prompts for *1_real_number* defining the new space group number. ------------------------------------------------------------------------ SHMA Define a shift to be applied when rescaling a map. Input ** *1_real_number* - shift to be applied when rescaling a map (default 0.0) ------------------------------------------------------------------------ SMAP This option allows the user either to globally scale a map using the defined shift and scalefactors defined by SCMA and SHMA, or to scale 2 maps together using a shift and scalefactor derived from mean and rms densities of the 2 maps. 1. Scaling one map using defined shifts and scalefactors: Streams ** *MAPI* - input map (map modified by this function). The scalefactor is first applied to the map and then the shift in origin. 2. Scaling two maps together: The program calculates the mean and rms densities for the input map, filtered by its envelope (if defined), and similarly for the output map. This is useful in scaling together cryo-em maps and crystallographic maps, where one has envelopes for known portions of both maps corresponding to identical structure. NOTE however that the derived scalefactor and shift in origin is then applied to the entire output map: Streams ** *MAPI* - input map *ENVI* - envelope to filter the input map. *MAPO* - output map (map modified by this function). *ENVO* - envelope to filter the volume of output map that is used to derive scalefactors and shifts. Input 1MAP <#smap1map> 2MAP <#smap2map> BACK <#smapback> GO <#smapgo> * *1MAP* - scale a map using the user defined scalefactor and shift. * *2MAP* - scale together two maps (the output map is modified). * *GO* - Go and do it. * *BACK* - Go back up a level. ------------------------------------------------------------------------ STAT Set the status of all files written out during an execution of the program. This option is important for UNIX. Input The program drops you to a keyworded level where the options are: NEW <#statnew> UNKN <#statunkn> * *NEW* - sets the files status to NEW. This is the default and for users running the program on VMS this should be left as it is. * *UNKN* - sets the files status to UNKNOWN. For unix operating systems it is important to set the status to unknown otherwise the program will crash when writing out a file with a name of an existing file. ------------------------------------------------------------------------ STOP Exit from the program. ------------------------------------------------------------------------ TERS Set the printed output produced to be terse. This is normally a reasonable setting when doing cyclic averaging. See also VERB <#verb> and DEFA <#defa>. ------------------------------------------------------------------------ TIDY Improves an envelope by resetting those pixels the program decides should be protein and those that should be solvent. Whether a pixel is reset or not is dependant on its six nearest neighbour pixels and two cut off values, that are used to bias this dependance. These cut off values (PCUT <#tidypcut> and SCUT <#tidyscut>) can be changed at the keyworded level. The logic of the operation is as follows: the six nearest neighbour pixels of a particular pixel are analysed and a count is kept of the number that are solvent and the number that are protein. If, for a solvent pixel, the number of its nearest neighbours that are protein is greater or equal to PCUT <#tidypcut> then that solvent pixel is reset to protein. Similarly for a protein pixel, if the number of its nearest neighbours that are solvent is greater or equal to SCUT <#tidyscut> that pixel is reset to solvent. PCUT <#tidypcut> and SCUT <#tidyscut> are by default set to 4. This means that when the number of surrounding protein and solvent pixels are the same the protein leaves pixel values as they are. The program passes twice through the map per sweep, 'forwards' and then 'backwards', to ameliorate the asymmetry. Statistics are printed after every pass. Streams ** *MAPI* - input map (map modified by this function). *ENVI* - envelope to filter input map. Input The program then drops you down to a keyworded level where the options are: NSWP <#tidynswp> PCUT <#tidypcut> SCUT <#tidyscut> YSYM <#tidyysym> NSYM <#tidynsym> GO <#tidygo> BACK <#tidyback> * *NSWP* - prompts for *1_integer_number* defining the number of sweeps through the map. * *PCUT* - prompts for *1_integer_number* defining the number of neighbour protein pixels necessary for resetting the pixel to protein (def=4). * *SCUT* - prompts for *1_integer_number* defining the number of neighbour solvent pixels necessary for resetting the pixel to solvent (def=4). * *YSYM* - Yes, use the crystallographic symmetry. BEWARE. If your envelope does not obey crystallographic symmetry, eg one has cut out an envelope of say a monomer, one should switch OFF the crystallographic symmetry. The program searches for crystallographically related pixels...so if the related pixel is solvent you're going to be in trouble. * *NSYM* - No don't use the crystallographic symmetry. This is switched on by default. * *GO* - Go and do it. * *BACK* - Go back up a level. ------------------------------------------------------------------------ TIME Print time and date. ------------------------------------------------------------------------ TITL Define a local title for this program run. Input ** *1_character_string* - the title, remember to enclose in " " if it includes spaces. ------------------------------------------------------------------------ TOSS This can be used in two ways and the mode is controlled by header lines in a protein data bank format coordinate file. In both cases the aim is the same. Coordinates for NCS related atoms are read in, and from them least squares best values for some NCS operators are derived. The coordinates should be orthogonal (PDB standard convention, as used as the default convention in X-PLOR) and in Angstroms. The program will prompt for the name of the PDB file. NCS operators generated at this stage are appended to the current list. The way the operators are generated is slightly different for improper and for proper symmetry operators, however the key thing is the way the input PDB file is used and that remains essentially unchanged in both cases. Lets examine the two methods. ** *1.* Pdb file contains TOSS as first 4 characters in a line preceding the coordinate data. In this case the pdb file is assumed to have come originally from GAP. What this means is that we assume that there are a number of chains, identified by different chain ids in the columns used by XPLOR for chain ids. The appropriate NCS matrices will then be generated automatically. There are some additional options/requirements, specified by additional lines in the PDB file preceding the coordinate data. ** *ATUS ATOMLABEL* - this chooses which atom from each residue to use. *CENT XCEN YCEN ZCEN WT* - specifies object centre and relative weight to be given to the centre information. *STEP JSTEP* this says pick out every jstep'th residue. This option is good when you are at the stage of using rigid body refinement to improve NCS ops. Quick and easy to use. Example of start of such a PDB file: TOSS { This file from xplor. Chain ids from GAP. } ATUS OH1 { Select atom OH1 for use in TOSS option. } STEP 10 { Use only every 10th 'residue' } CENT 0.0 0.0 188.31 50.0 { Centre of particle, weight centre 50x higher.} REMARK These parameters use additional atom types (14 more than in REMARK param19x) and requires the corresponding topology file for REMARK psf file generation. REMARK DATE:16-SEP-95 01:58:56 created by user: OSCIL ATOM 1 OH0 WAT 1 265.346 79.647 181.983 1.00 5.00 1001 ATOM 2 OH1 WAT 1 270.214 78.028 168.939 1.00 5.00 1001 ATOM 3 OH2 WAT 1 270.069 81.296 170.862 1.00 5.00 1001 ATOM 4 OH3 WAT 1 266.622 80.000 171.851 1.00 5.00 1001 ATOM 5 OH4 WAT 1 268.218 76.821 173.039 1.00 5.00 1001 ATOM 6 OH5 WAT 1 270.459 78.704 175.388 1.00 5.00 1001 ATOM 7 OH6 WAT 1 267.634 80.984 176.514 1.00 5.00 1001 ATOM 8 OH7 WAT 1 265.706 77.825 177.426 1.00 5.00 1001 ATOM 9 OH8 WAT 1 268.510 76.113 179.323 1.00 5.00 1001 ATOM 10 OH9 WAT 1 269.061 79.342 181.224 1.00 5.00 1001 ATOM 11 OH0 WAT 2 263.073 74.169 200.101 1.00 5.00 1001 ATOM 12 OH1 WAT 2 265.136 76.113 183.315 1.00 5.00 1001 ATOM 13 OH2 WAT 2 268.255 76.357 185.431 1.00 5.00 1001 ATOM 14 OH3 WAT 2 267.268 79.659 187.016 1.00 5.00 1001 ......etc...... ** *2.* PDB file produced by hand without TOSS label. Only useful preceding label is BIG in cols 1-3 of a line preceding coordinate data. The idea really is to use, say, heavy atom coords which obey the NCS to provide a starting set of matrices. In this case the atom order is such that it will produce a matrix to move atom/element 1 or to atom/element 2, or a pixel in the output map onto a related pixel in the input map. It is important to note that if element 2 is to be averaged onto element 1 the matrix to use is that which will move element 1 onto element 2. This, if one is not careful, causes untold confusion. As an example let us suppose that we have 2 molecules in the asymmetric unit and a set of 4 atoms on each, then we produce a file like this: ATOM ca ALA A 11 26.810 19.350 11.390 1.00 20.00 ATOM cd ALA A 12 40.240 17.700 48.320 1.00 20.00 ATOM cg ALA A 21 26.900 10.130 10.72 1.00 20.00 ATOM cf ALA A 22 42.870 8.970 46.300 1.00 20.00 ATOM cb ALA A 31 20.270 14.690 14.750 1.00 20.00 ATOM ce ALA A 32 47.800 16.250 43.620 1.00 20.00 ATOM CC ALA A 41 34.14 14.515 29.18 1.00 20.00 ATOM CC ALA A 42 34.14 14.515 29.18 1.00 20.00 Note that in this mode the atom labels are ignored. The residue number holds the topological information on each atom site. Thus residue NM is atom number N for molecule M. Note that this format would limit the max. number of NCS operators to 9. The BIG card, described above, changes the format to NMM, ie two columns for the molecule number information. This allows up to 99 NCS operators. We have not yet needed more... Wolfgang Kabsch's rigid body fitting program is then used to derive the best matrix to superimpose the molecules. Thus the coordinates are arranged with all the copies of atom 1 coming first, then the various positions of atom 2 etc. In this case there are just 2 molecules and the program will calculate the matrices required to average 1 onto 1 (identity) and 2 onto 1. Thus the output domain for averaging should be the bit of the map where molecule 1 is sitting. Please try and stick to this convention rather exactly otherwise something will go wrong! This procedure will work for higher order symmetry than in this example and in the case of proper symmetry (controlled by PROP <#prop> and IMPR <#impr> keywords, q.v.) will produce the appropriate set of matrices. Check the RMS error reported by TOSS - if you get one set of atoms in the wrong order it should be obvious from the error. ------------------------------------------------------------------------ UNPA Unpack the density for a "protomer" (hopefully averaged) out into its NCS related partners. This option MUST be used in conjunction with a labelled envelope generated using LENV <#lenv> option by the SAME NCS operators. This is the double interpolation option. The averaging should be done using the AVER <#aver> keyword and the labelled envelope. UNPA should then be implemented with the same map and the same envelope. Streams ** *MAPI* - input map, which is also altered in the process. *ENVI* - labelled envelope to filter data out to the NCS related partners. Input *GO* <#unpago>***INTP* <#unpaintp> * *GO* - go and unpack the averaged density * *INTP* - prompts for *1_integer_number* defining the interpolation scheme to be used. The default is Nordmans 11 point non-linear interpolation which we find works better than 8 point and is not slower. The program expects an integer, either 1,8 or 11. ------------------------------------------------------------------------ VERB Produce more than the usual amount of printed output. See also DEFA <#defa> and TERS <#ters> ------------------------------------------------------------------------ WANG Make Wang envelope. This is designed to do something similar to the way B.C.Wang produces an envelope. It actually automatically invokes for you a series of functions, first SCUT <#scut>, then CONV <#conv>, then HIST <#hist> and finally FMAS <#fmas>. Thus all that you have to do is input the values that you would have done if you had put in those commands yourself - to see how this works here is an example: ASSI MAP1 MAPI ASSI MAP1 ENVO WANG 0.3 5.0 BFAC=10 STEP=2 GO 0.38 NOTE that when using WANG one must use a volume of map that is sensible for the particular value of the solvent content, ie the asymmetric unit, and then copy the map (using CMAP <#cmap>) to cover that portion of the map you are interested in. ------------------------------------------------------------------------ WISY Write out inverse NCS operators to a file. It will write out the inverse matrices and the negative vector. The program asks for the name of the file to which the operators are to be written, and then 2 integers defining the first operator and the final operator to be written. Input ** *1_character_string*: (FILE_NAME) - the name of the file to which the symmetry operators are to be written. *2_integer_numbers* defining first and the last operator to be written out. ------------------------------------------------------------------------ WMAP Write a map from the data base into a file. Stream ** *MAPI* - map to be output. Input ** *1_character_string*: (FILE_NAME) - the name of the file to which the map is to be written. ------------------------------------------------------------------------ WSYM Write out NCS operators to a file. The program asks for the name of the file to which the operators are to be written, and then 2 integers defining the first operator and the final operator to be written. The format can either be GAP format (ready to be used as ASYM <#asym> commands) or XPLOR format. The default format is GAP, use base level keywords XPLO <#xplo> and NOXP <#noxp> (q.v.) to switch formats prior to WSYM. Input ** *1_character_string*: (FILE_NAME) - the name of the file which the symmetry operators are to be written. *2_integer_numbers* defining first and the last operator to be written out. ------------------------------------------------------------------------ WZIP Write an *ENVELOPE* quickly as a compressed envelope into an unformatted file. This option ONLY works for envelopes and the file must then be read by the RZIP <#rzip> option. Stream ** *MAPI* - input map. Input ** *1_character_string*: (FILE_NAME) - the name of the file to which the compressed envelope is to be written to. ------------------------------------------------------------------------ XPLO NCS operators written to a file using the WSYM <#wsym> option will be written out in XPLOR format, ready to read into XPLOR as NCS STRICT operators (use NOXP <#noxp> to toggle to GAP format). ------------------------------------------------------------------------ YCSY Yes, use the crystallographic symmetry operators. ie switch on for all maps. Default is to have the crystallographic symmetry switched off. ------------------------------------------------------------------------ ZSYM Cancel all the currently defined NCS operators. RETURN TO CONTENTS <#contents> ------------------------------------------------------------------------ SAMPLE INPUT FILES (A) Averaging cycles for BTV VP7 <#examplea> (B) Refine NCSO's <#exampleb> (C) Define envelopes <#examplec> (D) Cut a monomer from a trimer and place in a different cell <#exampled> (E) 30-fold averaging of BTV1 Core <#examplee> (F) 6-fold averaging of BTV VP7 monomer <#examplef> (G) Averaging 4 different crystal forms of HIV1 RT <#exampleg> ------------------------------------------------------------------------ ** *(A)* Do averaging cycles for BTV VP7. This is a monoclinic crystal that has two trimers in the cryst. a.u. hence the complexity! $ SET DEF $v:[oscil.newmosco.refi] $ ! Averaging Procedure for BTV VP7 at 4A $ set noverify $ ASS PGDATA.LIB PGIN $ ASS SYMOP.LIB SYMOP $ ASS SYS$INPUT DATA $ ASS SYS$OUTPUT PRINTER $ max_cycles = 300 $ CYCLE = 169 $ loop: $ write sys$output " " $ write sys$output " " $ write sys$output " " $ write sys$output " " $ write sys$output " " $ write sys$output " " $ write sys$output " " $ write sys$output " BTV VP7 AVERAGING, CYCLE "'cycle' $ write sys$output " " $ write sys$output " " $ write sys$output " " $! $ DEL vp7.MAP./NOCO $ ! $ ! Forward FFT $ ! $ FFT IN vp7avscw.LCF MAPOUT vp7.MAP $ GO 0 0 F1 PHI F2 F1=BATCH PHI=FRACTIONCALC F2=SIG # # 200.0 2.0 2 -1 4 Z X Y BTV MAP....AUG 1992 35 47 35 72 96 72 0 71 0 48 0 71 -1 1000. 1 0 1 $! $ PU /LO $! $! mapexchenge (averaging program works on formatted version of map) $! $ ass vp7.map mapin $ ass vp7.asc mapout $ run $t:[scratch.oscil.oscil.newmosco.cmv]mapexchange $! $! now average $! $ run average_v4_1 #NOECHO { to be run as batch job } TITLE " BTV VP7 - average with 3 fold and 2 fold " { first of all read in maps } { ========================= } { protein map } RMAP MAP1 vp7.ASC { read in cryst a.u. of map } { envelopes } ASSI ENV1 MAPI RMAP WANG_CUT1_1.ASC { read in env for trimer 1 } ASSI ENV2 MAPI RMAP WANG_CUT2_1.ASC { read in env for trimer 2 } ASSI ENV3 MAPI RMAP WANG_PLAN_4_1.ASC { read in env for both trimers } ASSI ENV4 MAPI RMAP WANG_4_1.ASC { read in env for cryst a.u. } { extend map to cover 6 sub-units } { =============================== } TIME ASSI MAP1 MAPI ASSI MAP2 MAPO CMAP UPDA -20 110 72 { this will extend the map to cover a molecule } -20 52 96 -20 95 72 GO TIME ASSI MAP3 MAPO { we will need a second copy for later ! } CMAP GO { start averaging } { =============== } NCSY { since the map coves molecule we don't need crst. symm } { average trimer 2 onto 1 } { ======================= } TIME ZSYM ASYM -0.95463 -0.29605 -0.03201 -0.29601 0.93167 0.21064 -0.03253 0.21056 -0.97704 72.65151 5.19690 52.96541 ASSI ENV1 ENVO ASSI MAP2 MAPI ASSI MAP3 MAPO AVER USEO CORQ GO { average trimer 1 onto 2 } { ======================= } TIME ZSYM ASYM -0.95136 -0.30405 -0.04971 -0.30780 0.93110 0.19574 -0.01323 0.20152 -0.97939 72.78404 5.86530 52.67608 ASSI ENV2 ENVO ASSI MAP2 MAPI ASSI MAP3 MAPO AVER USEO CORQ GO { average trimer 1 internally } { =========================== } TIME ZSYM ASYM 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 ASYM -0.12786 -0.76419 0.63218 0.73808 -0.49908 -0.45402 0.66248 0.40855 0.62785 32.46295 9.06784 -18.47239 ASYM -0.12890 0.73779 0.66260 -0.76341 -0.50029 0.40855 0.63292 -0.45318 0.62773 9.75988 36.88619 -4.91777 ASSI ENV1 ENVO ASSI MAP3 MAPI ASSI MAP2 MAPO AVER CORQ GO { average trimer 2 internally } { =========================== } TIME ZSYM ASYM 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 ASYM -0.13999 -0.76340 0.63057 0.74555 -0.50034 -0.44023 0.65157 0.40849 0.63920 32.76365 8.51551 -18.33365 ASYM -0.13999 0.74555 0.65158 -0.76340 -0.50034 0.40850 0.63057 -0.44023 0.63920 10.14175 36.73910 -5.23884 ASSI ENV2 ENVO ASSI MAP3 MAPI ASSI MAP2 MAPO AVER CORQ GO { averaging all done } { ================== } MCSY { switch on crst. symm } { go back and flatten the original cryst a.u. version of the map } { ============================================================== } ASSI MAP1 MAPI ASSI ENV4 ENVI FLAT GO { flatten using wang env (in cryst a.u. } { now fold the averaged map back into the flattened cryst. a.u. } { ============================================================= } TIME ASSI MAP2 MAPI { this is 6fold averaged protein density } ASSI MAP1 MAPO { this is solvent flattened cryst a.u. } ASSI ENV3 ENVI { this is envelope for 6 subunits } ASSI OFF ENVO FOLD GO { fold into cryst a.u. } { now write out the 6-fold averaged solvent flattened map !!! } { =========================================================== } TIME WMAP VP7_AVERAGED.ASC { DONE } { ==== } #ECHO EXIT $! $! $! mapexchenge (averaging program works on formatted version) $! $ ass vp7_averaged.asc mapin $ ass vp7_averaged.map mapout $ run $t:[scratch.oscil.oscil.newmosco.cmv]mapexchange $! $! REVERSE FFT $! $! $!junk: $ sfc HKLout vp7av MAPIN vp7_averaged $ go TITLE fc from averaged and flattened vp7 map SCALE 0.0020 SFCALC 4 500. 3.0 0 $! $ jump: $! junk: $! $! FSMELT -- merge fo and fc and fill in unobserved fo's and extend res. $! $ ASS VP7_rescut.LCF HKLIN1 $ ASS vp7av.LCF HKLIN2 $ ASS vp7ALL.LCF HKLOUT $ ass fsmelt_old.dat for003 $ ass fsmelt_new.dat for004 $! $ RUN $tu:[oscil.newmosco.model]FSMELT 1.0 / $! $! $! shell_scale -- scale fo and fc in theta shells $! $ ASS vp7ALL.LCF HKLIN1 $ ASS vp7AVSC.LCF HKLOUT $ ASS SYS$INPUT for008 $! $! $! if(cycle.ge.26) then goto unit $! $! all rayment weights $! $ RUN $tu:[oscil.newmosco.model]SHELL_SCALE 0.15 0 1 0 30. 10.0 1.5 1 / $ goto phase $! $! mostly unit weights $! $ unit: $ RUN $tu:[oscil.newmosco.model]SHELL_SCALE 0.15 0 1 0 30. 10.0 1.5 0 / $! $ phase: $ if(cycle.eq.1)then goto end_cycle $! $! MONPHASE - monitor phase change from one cycle to the next $! $ ass vp7avscw.lcf hklin1 $ ass vp7avsc.lcf hklin2 $! $ run $tu:[oscil.newmosco.model]monphase $! $ end_cycle: $! $ DELETE vp7AVSCW.LCF;/LO $ RENAME vp7AVSC.LCF vp7AVSCW.LCF $ rename fsmelt_new.dat fsmelt_old.dat $ purge $! $ cycle = cycle + 1 $! $ If (cycle.le.max_cycles) then goto loop $! $ END: $ WRITE SYS$OUTPUT "Normal Termination of Averaging Procedure" ------------------------------------------------------------------------ ** *(B)* refine NCSO's, this example is again for BTV VP7. Note complexity since we partially average the map before we refine! $ SET DEF $v:[oscil.newmosco.refi] $ run average_v4_1 #NOECHO { to be run as batch job } TITLE " BTV VP7 - average with 3 fold and 2 fold " { first of all read in maps } { ========================= } { protein map } RMAP MAP1 vp7.ASC { read in cryst a.u. of map } { envelopes } ASSI ENV1 MAPI RMAP WANG_CUT1_1.ASC { read in env for trimer 1 } !ASSI ENV2 MAPI !RMAP WANG_CUT2_1.ASC { read in env for trimer 2 } { extend map to cover 6 sub-units } { =============================== } TIME ASSI MAP1 MAPI ASSI MAP2 MAPO CMAP UPDA -20 110 72 { this will extend the map to cover a molecule } -20 52 96 -20 95 72 GO ASSI MAP3 MAPO { NEED A COPY } CMAP GO { start averaging } { =============== } NCSY { since the map coves molecule we don't need crst. symm } { average trimer2 onto 1 } { ====================== } ZSYM ASYM { matrix to flip 2 to 1 } { ===================== } -0.95463 -0.29605 -0.03201 -0.29601 0.93167 0.21064 -0.03253 0.21056 -0.97704 72.65151 5.19690 52.96541 ASSI ENV1 ENVO ASSI MAP2 MAPI ASSI MAP3 MAPO AVER USEO CORQ GO { refine trimer 1 internally } { =========================== } TIME ZSYM { refine trimer 1 } { ============== } TIME ZSYM ASYM 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 1.00000 0.00000 0.00000 0.00000 ASYM -0.13430 -0.75981 0.63612 0.74269 -0.50215 -0.44299 0.65602 0.41295 0.63174 32.50737 8.36720 -18.42546 ASYM -0.13442 0.74172 0.65710 -0.75787 -0.50417 0.41406 0.63841 -0.44234 0.62990 10.15301 36.36606 -5.37685 ADCG 40 14 40 ASSI ENV1 ENVO ASSI MAP3 MAPI ASSI MAP3 MAPO REFI USEO CORQ STAR 2 END 2 GO NCYC 20 ROTA .5 .01 TRAN .5 .01 WRIT MAT3_1_3.SYM GO ASSI ENV1 ENVO ASSI MAP3 MAPI ASSI MAP3 MAPO REFI USEO CORQ STAR 3 END 3 GO NCYC 20 ROTA .5 .01 TRAN .5 .01 WRIT MAT3_1_3.SYM GO EXIT ------------------------------------------------------------------------ ** *(C)* Define envelopes. Again a BTV VP7 example, again complicated by presence of more than one trimer! $ set def $V:[oscil.newmosco.refi] $! calc plan envelope and wang and add them together run average_v4_1 RMAP MAP1 vp7.ASC {xtallographic a.u. at 4 nags} assi map2 mapo cmap upda -20 110 72 -20 52 96 -20 95 72 {extended to cover mol unit} GO {now make mask that cuts the other molecules away from our chosen one} {use extended map as template for size etc} assign map2 mapi assign env1 envm MENV GO 0 PLAN -25.00 14.29 45.18 25.02 14.70 11.39 1 PLAN 1.88 -34.21 21.95 25.02 14.70 11.39 1 PLAN 43.98 -33.80 -11.39 25.02 14.70 11.39 1 PLAN 67.12 14.29 -21.95 25.02 14.70 11.39 1 PLAN 43.98 63.20 -11.39 25.02 14.70 11.39 1 PLAN 1.88 62.79 21.95 25.02 14.70 11.39 1 PLAN -1.88 14.29 -21.95 25.02 14.70 11.39 1 PLAN 70.88 62.79 21.95 44.00 14.29 45.18 1 PLAN 94.02 14.70 11.39 44.00 14.29 45.18 1 PLAN 70.88 -34.2 21.95 44.00 14.29 45.18 1 PLAN 20.86 -33.8 55.74 44.00 14.29 45.18 1 PLAN 1.90 14.70 78.52 44.00 14.29 45.18 1 PLAN 20.86 63.20 55.74 44.00 14.29 45.18 1 PLAN 70.9 14.70 78.52 44.00 14.29 45.18 1 GO {so map1 now has plane-cut envelope} ASSI ENV1 mapI lMAS GO assi map1 mapI assi map1 envo wang bfac 10 step 2 go .38 wmap wang_4_1_83.asc assi off envo assi map3 mapo cmap upda -20 110 72 -20 52 96 -20 95 72 {extended to cover mol unit} GO lmas go assi env1 envi assi map3 envo aenv assi map3 mapi lmas go wmap wang_plan_4_1_83.asc {now make mask that cuts the other molecules away from our chosen one} {use extended map as template for size etc} assi MAP3 mapi assi env4 envm menv go 0 plan 25.02 14.7 11.39 44.0 14.29 45.18 1 go aenv assi env4 mapi lmas go wmap wang_cut1_1_83.asc assi map3 mapii assi env5 envm menv go 0 plan 44.0 14.29 45.18 25.02 14.7 11.39 1 go aenv assi env5 mapi lmas go wmap wang_cut2_1_83.asc exit ------------------------------------------------------------------------ ** *(D)* Cut out a monomer from a trimer in hexagonal cell and place in p1 cell. Note that because monomer won't fit in a unit cell, it has to be moved into an extended map (using AVER <#aver>) and then folded down into unit cell. $ set def $v:[oscil.newmosco.refi.hex] $ run [-.avrad]average_v4_2 #noecho { read hexagonal map } assi map1 mapi rmap hex_20_6fin_av.asc { read monomer envelope } assi env1 mapi rmap monomer_new1.env qass assi map1 mapi { cut away monomer...same grid..same map } assi env1 envi assi map2 mapo fold go { make new map...new cell...new grid } cell map1 100 100 100 90 90 90 { map1 gets new cell...then copied into map3 } assi map1 mapi assi map3 mapo cmap upda 0 40 50 0 40 50 -30 40 50 go { we must truncate map3...it has bits of density } assi off envi assi map3 mapi cutl 0 cutu 0 cutp cutg { switch on xtallographic symm } asym 1 0 0 0 1 0 0 0 1 0 0 0 ncsy assi map2 mapi { monomer map..cut away } assi map3 mapo { p1 cell..hopefully } aver go assi map4 mapo assi map3 mapi fold upda 0 49 50 0 49 50 0 49 50 go lmap go wmap cut_monomer_grid1.asc exit ------------------------------------------------------------------------ ** *(E)* An example of 30-fold averaging of the core of BTV-1. We have an overall cyclical command file within which are nested calls to modular files that create envelopes, that 30-fold average and solvent flatten etc and define parameters when merging and scaling observed and density modified calculated data. $set def $w:[orbi.xplor.av2] $ $ define ccp4_scr $s:[oscil] $ define ccp4_open unknown $ define binsort_scr $s:[oscil] $ define sys$scratch $s:[oscil] $ $ max_cycle2 = 10 $ cycle2 = 1 $ max_cycle = 30 $ cycle = 2 $ !goto mapexchange $ !goto trial $ $ loop2: $ $ max_cycle = 30 $ cycle = 1 $ ! $ ! MAPEXCHANGE - ccp4 map to asci format $ ccp4 mapexchange mapin $m:[oscil]btv2_2fo_fc.map - mapout $m:[oscil]btv2_2fo_fc.asc $ ! $ env_det: $ ! GAP - to calculate solvent envelope $ run $t:[oscil.average.alpha]average_v5 #noecho TITLE "GAP envelope determination" @env_det.inp (here a modular file to calulate envelopes is called) Within env_det.inp is { read in xtallographic a.u. at 12 angs} ass map1 mapi RMAP $m:[oscil]btv2_2fo_fc.asc assi map1 mapi assi map2 mapo cmap upda -192 192 384 { -1/2x to 1/2x } 0 192 384 { 0y to 1/2y } -96 288 384 { -1/4z to 3/4z } GO dmap map1 { now make mask that defines our virion as an inner sphere and outer sphere } ncsy ass map2 mapi ass env1 envm MENV GO 0 plane 398.5 412 -188.5 0 0 188.5 1 plane 398.5 -412 -188.5 0 0 188.5 1 plane -398.5 412 -188.5 0 0 188.5 1 plane -398.5 -412 -188.5 0 0 188.5 1 plane 398.5 412 565.5 0 0 188.5 1 plane 398.5 -412 565.5 0 0 188.5 1 plane -398.5 412 565.5 0 0 188.5 1 plane -398.5 -412 565.5 0 0 188.5 1 go { now use planes to cut away the other virions away from our chosen one} { update env1 } ass env1 mapi ass env1 envm menv usei go sphere 0 0 188.5 355 0 1 {set everything outside 355Angs to 0} sphere 0 0 188.5 200 0 0 {set everything within 240Angs to 0} go !ass env1 mapi !lmas inte 4 4 8 go { now set density outside env1 in map2 to 0 } ass map2 mapi ass env1 envi flat flot 0 go { now make map2 the W.E. } dmap env1 { Sig cut it } ass off envi ass map2 mapi scut .2 5 go { convolute it } ass map2 mapi conv bfac 200 go { histogram it } ass map2 mapi ass env2 envo hist .75 dmap map2 ass env2 mapi tidy go !ass env2 mapi !lmas inte 6 6 12 go { now write out mol unit for 1/2 virion } ass env2 mapi wmap $m:[oscil]mol_unit.asc { now create wang env in asym unit } ycsy ass map5 mapo ass env2 mapi ass off envo ass env2 envi fold upda 0 383 384 0 96 384 0 383 384 go { lmas the final env } !ass map5 mapi !lmas inte 6 6 12 go ass map5 mapi wmap $m:[oscil]wang.asc stop $ $ $ loop: $ $ ! MAPEXCHANGE - ccp4 map to asci format $ ccp4 mapexchange mapin $m:[oscil]btv2_2fo_fc.map - mapout $m:[oscil]btv2_2fo_fc.asc $ $ trial: $ average: $ ! GAP - to solvent flatten $ write sys$output " GAP cycle "'cycle' $ run $t:[oscil.average.alpha]average_v5 #noecho TITLE "GAP 30-fold av of btv core test" @av_30.inp (here a modular file to average virus map is called) Within av_30.inp is { read in AU } ass map1 mapi rmap $m:[oscil]btv2_2fo_fc.asc { read in WANG env } ass env1 mapi rmap $m:[oscil]wang.asc !ass env1 mapi !lmas inte 8 8 8 go { read in mol_unit.asc } ass env2 mapi rmap $m:[oscil]mol_unit.asc !ass env2 mapi !lmas inte 8 8 16 go { read in operators } @rig2.mat { now av map1 into map2 expanded to cover virion } ycsy ass map1 mapi ass off envi ass env2 envo ass map3 mapo aver upda -192 192 384 0 192 384 -96 288 384 go go { now flatten asym unit using wang env } ass map1 mapi ass env1 envi ass off mapo ass off envo flat go { then fold averaged density down into asym unit } { using expaned env as a filter } ass map3 mapi ass map1 mapo ass env2 envi ass off envo fold { delete map2, env2...for space } dmap env1 dmap map2 dmap env2 dmap map3 { then need to expand to fill cell for SFALL } ass map1 mapi ass map4 mapo cmap upda 0 383 384 0 383 384 0 383 384 go ass map4 mapi wmap $m:[oscil]av_flat.asc stop $ mapexchange: $ $ ! MAPEXCHANGE - ccp4 map to asci format $ ccp4 mapexchange mapin $m:[oscil]av_flat.asc - mapout $m:[oscil]av_flat.map $ ! $ !trial: $ sfall: $ ! SFALL - to calculate Fs and phases from GAP map and scale to Fobs $ ccp4 sfall hklout $m:[oscil]av_flat.mtz mapin $m:[oscil]av_flat.map titl fcalcs from gap map mode sfcalc mapin RESOLUTION 200.0 6.0 SYMMETRY 18 TITLE 12 angs Fcs from averaging sept 95 GRID 384 384 384 reso 200.0 6.0 rscb 200.0 6.0 sfsg 1 LABO FC=FC PHIC=PHIC END $ $ $! the we need to merge the 2 data sets $ $ ass $m:[oscil]test1_fs_s.mtz hklin1 $ ass $m:[oscil]av_flat.mtz hklin2 $ ass $m:[oscil]test1_av_flat.mtz hklout $ run $t:[oscil.progs.alpha]fsmelt_mtz @fsmelt.dat Within fsmelt.dat is inco 1 2 F SIGF inco 2 2 FC PHIC scal 1 poin 222 addin dstep 900000 dnow 6.0 go $ $! the scale the data in shells $ ass $m:[oscil]test1_av_flat.mtz hklin $ ass $m:[oscil]test1_av_flat_sc.mtz hklout $ run $t:[oscil.progs.alpha]shell_scale_abcd_mtz @shell_scale.dat Within shell_scale.dat is SHELL scut 8 fcut 1.2 OUTP INCO F SIGF FC PHIC MAXR .05 OUTW GO $ $ ! FFT - to calculate 2Fo-Fc map using fobs and fcalcs from xplor $ ccp4 fft hklin $m:[oscil]test1_av_flat_sc.mtz mapout $m:[oscil]btv2_2fo_fc.map RESOLUTION 200.0 6.0 SYMMETRY 18 TITLE 6 angs 2fo-fc map btv core sept 95 LABIN F1=F SIG1=SIGF F2=FC PHI=PHIC SCALE F1 2.0 GRID 384 384 384 BINMAPOUT RHOLIM 1000 END $ ! $ ! $ purge *.* $ purge $m:[oscil]*.* $ ! $ cycle = cycle + 1 $ ! $ if(cycle.le.max_cycle)then goto loop $ ! $ cycle2 = cycle2 + 1 $ ! $ if(cycle2.le.max_cycle2)then goto loop2 $ ! $ END: ------------------------------------------------------------------------ ** *(F)* An example of 6-fold averaging for the complete monomer of BTV VP7. Once again wehave an overall cyclical command file within which are nested calls to modular files that create envelopes, that 30-fold average and solvent flatten,define parameters when merging and scaling observed and density modified calculated data etc. This is very similar to the first example. $set def $v:[oscil.newmosco.refi.avrad.test_rf.test_imp] $ set rms_def/ext=1000/buffer=80/block=80 $! $ ! FFT - to calculate INTIAL 2Fo-Fc map WITH MLPHA PHASES $ ccp4 fftbig hklin au_phare_35_FR.mtz mapout MLPH_AV_35.map RESOLUTION 100.0 3.5 FFTSGP 1 SYMMETRY 4 TITLE 3.5A vp7 2fo-fc map (combined phases) July 93 LABIN F1=FP PHI=PHIB W=FOM GRID 72 96 112 BINMAPOUT RHOLIM 1000 END $ ! $ $! define ccp4_scr $g:[orbi.scratch] $! define binsort_scr $g:[orbi.scratch] $! define sys$scratch $g:[orbi.scratch] $ ENDFFT: $ max_cycle2 = 5 $ cycle2 = 1 $ max_cycle = 4 $ cycle = 1 $ loop2: $ ! $ ! MAPEXCHANGE - ccp4 map to asci format $ ccp4 mapexchange mapin MLPH_AV_35.map - mapout MLPH_AV_35.asc $ ! $ ! GAP - to calculate solvent envelope $ run $v:[oscil.newmosco.refi.avrad]average_v4_6 #noecho TITLE "GAP envelope determination" terse @env_det.com (read in envelope determination command file) RMAP MAP1 MLPH_AV_35.asc {xtallographic a.u. at 3.5 angs} assi map2 mapo cmap upda -90 112 72 15 76 96 0 164 112 {extended to cover mol unit} GO {now make mask that cuts the other molecules away from our chosen one} {use extended map as template for size etc} ncsy ass map2 mapi ass env1 envm MENV GO 0 atom [-]final_6rigid.pdb ALL 2.5 1 go ass env1 mapi tidy nswp 3 go ass map2 mapi ass env9 envm MENV GO 0 plan 77.6 51.9 -16.2 -5.4 47.5 80.5 1 plan -118.4 47.5 206.9 -35.4 51.9 110.2 1 GO {so map1 now has plane-cut envelope} ass env9 envi ass env1 envo aenv ASSI ENV1 mapI ass off envi assi map1 mapI assi map1 envo Scut .3 5 CONV bfac 20 step 2 go HISTO .40 ass map1 mapi ass off envi lmas INTE 4 4 8 go wmap wang.asc ycsy assi off envo assi map3 mapo cmap upda -90 112 72 15 76 96 0 164 112 {extended to cover mol unit} GO ncsy assi env1 envi assi map3 envo aenv assi map3 mapi {lmas inte 5 5 10 go} wmap wang_plan.asc {now make mask that cuts the other molecules away from our chosen one} {use extended map as template for size etc} ass map3 mapi assi env4 envm menv go 0 plan -35.4 51.9 110.2 -5.4 47.5 80.5 1 go ass map3 envi ass env4 envo aenv ass env4 mapi {lmas inte 5 5 10 go} wmap wang_cut1.asc assi MAP3 mapi assi env5 envm menv go 0 plan -5.4 47.5 80.5 -35.4 51.9 110.2 1 go ass map3 envi assi env5 envo aenv ass env5 mapi {lmas inte 5 5 10 go} wmap wang_cut2.asc STOP $ ! $ loop1: $! $ cycle = 1 $! $ loop: $! $ ! MAPEXCHANGE - ccp4 map to asci format $ ! $ ccp4 mapexchange mapin MLPH_AV_35.map - mapout MLPH_AV_35.asc $! loop1: $ ! GAP - to solvent flatten $ write sys$output "RUN WITH R-FREE GAP cycle "'cycle' $ run $v:[oscil.newmosco.refi.avrad]average_v4_6 #noecho TITLE "GAP 6-fold averaging solvent flattening cycle for VP7" terse @6fold_av.com (read in file to do density modification stuff) { first of all read in maps } { ========================= } { protein map } RMAP MAP1 MLPH_AV_35.ASC { read in cryst a.u. of map } { envelopes } ASSI ENV1 MAPI RMAP WANG_CUT1.ASC { read in env for trimer 1 } ASSI ENV2 MAPI RMAP WANG_CUT2.ASC { read in env for trimer 2 } ASSI ENV3 MAPI RMAP WANG_PLAN.ASC { read in env for both trimers } ASSI ENV4 MAPI RMAP WANG.ASC { read in env for cryst a.u. } { extend map to cover 6 sub-units } { =============================== } YCSY ASSI MAP1 MAPI ASSI MAP2 MAPO CMAP UPDA -90 112 72 15 76 96 0 164 112 GO ASSI MAP3 MAPO { we will need a second copy for later ! } CMAP GO { start averaging } { =============== } NCSY { since the map coves molecule we don't need crst. symm } { average trimer 2 onto 1 } { ======================= } ZSYM @[-]6rig_12.sym { op to get pixel from trimer 2 } ASSI ENV1 ENVO ASSI MAP2 MAPI ASSI MAP3 MAPO AVER star 2 USEO CORQ GO { average trimer 1 onto 2 } { ======================= } ZSYM @[-]6rig_21.sym { get pixel from trimer 1 } ASSI ENV2 ENVO ASSI MAP2 MAPI ASSI MAP3 MAPO AVER star 2 USEO CORQ GO { average trimer 1 internally } { =========================== } ZSYM @[-]6rig_1.sym ASSI ENV1 ENVO ASSI MAP3 MAPI ASSI MAP2 MAPO AVER CORQ GO { average trimer 2 internally } { =========================== } ZSYM @[-]6rig_2.sym ASSI ENV2 ENVO ASSI MAP3 MAPI ASSI MAP2 MAPO AVER CORQ GO { averaging all done } { ================== } YCSY { switch on crst. symm } { go back and flatten the original cryst a.u. version of the map } { ============================================================== } ASSI MAP1 MAPI ASSI ENV4 ENVI FLAT go { flatten using wang env (in cryst a.u. } { now fold the averaged map back into the flattened cryst. a.u. } { ============================================================= } TIME ASSI MAP2 MAPI { this is 6fold averaged protein density } ASSI MAP1 MAPO { this is solvent flattened cryst a.u. } ASSI ENV3 ENVI { this is envelope for 6 subunits } ASSI OFF ENVO FOLD { fold into cryst a.u. } { now write out the 6-fold averaged solvent flattened map !!! } { =========================================================== } TIME WMAP GAP1.asc { DONE } { ==== } #ECHO stop $ ! $ ! MAPEXCHANGE - ccp4 map to asci format $ ccp4 mapexchange mapin GAP1.asc - mapout GAP1.map $ ! $ sfall: $ ! SFALL - to calculate Fs and phases from GAP map and scale to Fobs $ ccp4 msfall hklout GAP1.mtz mapin GAP1.map titl fcalcs from gap map mode sfcalc mapin grid 72 96 112 reso 20.0 3.5 rscb 20.0 3.5 symm 4 sfsg 4 LABO FC=FC PHIC=PHIC END $ fsmelt: $! FSMERGE -- perform file manipulations for difference map calc $! $ ass AU_PHARE_35_FR.MTZ hklin1 $ ass GAP1.mtz hklin2 $ ass AU_MLPH_GAP.mtz hklout $! $ run $v:[oscil.progs.alpha]fsmelt_mtz @fsmelt1.dat (read in stuff to control merging of data) inco 1 9 FP SFP PHIB FOM HLA HLB HLC HLD FR inco 2 2 FC PHIC scal 50.0 addin RFRE FR dnow 3.5 tERSE go $JUMP: $! shell_scale -- scale fo and fc in theta shells $ shell_scale: $! $ ASS AU_MLPH_GAP.mtz hklin $ ASS AU_MLPH_GAP_SC.mtz hklout $! $ RUN $V:[OSCIL.PROGS.alpha]SHELL_SCALE_ABCD_MTZ @shell_scale1.dat (read in stuff to control scaling and weighting of data) $ $TERSE SHELL SCUT 15 FCUT 1.5 OUTP INCO FP SFP FC PHIC ALLW RFRE FR RFRA 4 RSCA MAXR 1.0 GO $ $ ! SIGMAA - to combine mir and calculated phases $ ccp4 sigmaa hklin AU_MLPH_GAP_SC.mtz hklout MLPH_AV_35.mtz TITLE Phase combination RESOLUTION 100.0 3.5 COMBINE 1 RANGES 5 100000 LABIN FP=FP SIGFP=SFP PHIBP=PHIB WP=FOM - HLA=HLA HLB=HLB HLC=HLC HLD=HLD FC=FC PHIC=PHIC LABOUT PHCMB=PHCMB WCMB=WCMB FWT=FWT PHWT=PHWT END $! S WRITE SYS$OUTPUT "PHASE COMP AGAINST FINAL AVERAGED 2.6A MTZ FILE" $ $ ASS [-]nat_fc_sc.mtz HKLIN1 $ ASS AU_MLPH_GAP_SC.mtz HKLIN2 $! $ RUN $V:[OSCIL.PROGS.alpha]MONPHASE_MTZ DMIN 0.8 NRAN 8 TERSE INCO 1 2 FC PHIC INCO 2 2 FC PHIC GO S WRITE SYS$OUTPUT "PHASE COMP AGAINST GOLD DERIVATIVE FP AND PHIBEST" $ ASS au_phare_35_FR.mtz HKLIN1 $ ASS AU_MLPH_GAP_SC.mtz HKLIN2 $! $ RUN $V:[OSCIL.PROGS.alpha]MONPHASE_MTZ DMIN 0.8 NRAN 8 TERSE INCO 1 2 FP PHIB INCO 2 2 FC PHIC GO $ $ S WRITE SYS$OUTPUT "PHASE COMP AGAINST PREVIOUS CYCLE" $ $ ASS AU_MLPH_GAP_SC_LAST.mtz HKLIN1 $ ASS AU_MLPH_GAP_SC.mtz HKLIN2 $! $ RUN $V:[OSCIL.PROGS.alpha]MONPHASE_MTZ DMIN 0.8 NRAN 8 TERSE INCO 1 2 FC PHIC INCO 2 2 FC PHIC GO $ fft: $ ! FFT - to calculate 2Fo-Fc map using combined phases $ ccp4 fftbig hklin MLPH_AV_35.mtz mapout MLPH_AV_35.map RESOLUTION 20.0 3.5 FFTSGP 1 SYMMETRY 4 TITLE test trial 3.5A 2fo-fc map---no r-free LABIN F1=FWT PHI=PHWT GRID 72 96 112 BINMAPOUT RHOLIM 1000 END $ ! $ PU /LO/KEEP=5 *.MTZ $! $ !JUMP: $ ! $ COP AU_MLPH_GAP_SC.MTZ AU_MLPH_GAP_SC_LAST.MTZ $ pu/LO *.MAP $ pu/LO *.ASC $ ! $ cycle = cycle + 1 $ ! $ if(cycle.le.max_cycle)then goto loop $ ! $ cycle2 = cycle2 + 1 $ ! $ if(cycle2.le.max_cycle2)then goto loop2 $ ! $ END: ------------------------------------------------------------------------ ** *(G)* An example very complicated multiple crystal averaging for HIV reverse transcriptase. This just gives the averaging command file to be run within GAP. There are 4 crystal forms , 37.asc, ham.asc, ha.asc,147.asc (historical nomenclature), with a monomer in the asymmetric unit and 2 subunits, p66 and p51, per monomer. Internal averaging is done using 4 envelopes for the 4 domains, fingers, palm, connection and thumb (the thumb domain averagiing is done at the end for historical reasons). This may require some thought to clarify whats going on. { Robert's big average everything against everything else GAP cycle } { expanded and improved to average between 4 crystal forms 18th Jan } { ================================================================= } { read protein map assymetric units and scale them together } { ========================================================= } ASSI MAP_37 MAPI RMAP WORK:GAP_37.ASC ASSI MAP_HAM MAPI RMAP WORK:GAP_HAM.ASC ASSI MAP_HA MAPI RMAP WORK:GAP_HA.ASC ASSI MAP_147 MAPI RMAP WORK:GAP_147.ASC { Read RT37/RTHAM/RTHA/RT147 current wang envelopes } { ================================================= } ASSI WNG_37 MAPI RMAP ENV_37:WANG.ASC ASSI WNG_HAM MAPI RMAP ENV_HAM:WANG.ASC ASSI WNG_HA MAPI RMAP ENV_HA:WANG.ASC ASSI WNG_147 MAPI RMAP ENV_147:WANG.ASC SCMA 0.8 ASSI MAP_37 MAPI SMAP 1MAP GO ASSI MAP_37 MAPI ASSI WNG_37 ENVI ASSI MAP_HAM MAPO ASSI WNG_HAM ENVO SMAP 2MAP GO ASSI MAP_37 MAPI ASSI WNG_37 ENVI ASSI MAP_HA MAPO ASSI WNG_HA ENVO SMAP 2MAP GO ASSI MAP_37 MAPI ASSI WNG_37 ENVI ASSI MAP_147 MAPO ASSI WNG_147 ENVO SMAP 2MAP GO { Delete envelopes now that we're done } { ==================================== } DMAP WNG_37 DMAP WNG_HAM DMAP WNG_HA DMAP WNG_147 { extend maps to cover whole molecule } { =================================== } YCSY ASSI MAP_37 MAPI ASSI EXT_37 MAPO CMAP UPDA -45 90 160 {this will extend the map to cover a molecule } -95 45 128 -40 105 88 GO ASSI WRK_37 MAPO CMAP GO ASSI MAP_HAM MAPI ASSI EXT_HAM MAPO CMAP UPDA -45 90 160 {this will extend the map to cover a molecule } -95 45 128 -40 105 88 GO ASSI WRK_HAM MAPO CMAP GO ASSI MAP_HA MAPI ASSI EXT_HA MAPO CMAP UPDA -45 90 160 {this will extend the map to cover a molecule } -95 45 128 -40 105 88 GO ASSI WRK_HA MAPO CMAP GO ASSI MAP_147 MAPI ASSI EXT_147 MAPO CMAP UPDA -45 90 160 {this will extend the map to cover a molecule } -95 45 128 -40 105 88 GO ASSI WRK_147 MAPO CMAP GO { start averaging } { =============== } NCSY { read in operators between pairs of domains } { ========================================== } ZSYM @OPERATORS.SYM { Read RT37 P66 and P51 domain core envelopes } { =========================================== } ASSI P66F_37 MAPI RMAP ENV_37:CORE_P66F.ASC ASSI P66P_37 MAPI RMAP ENV_37:CORE_P66P.ASC ASSI P66C_37 MAPI RMAP ENV_37:CORE_P66C.ASC ASSI P51F_37 MAPI RMAP ENV_37:CORE_P51F.ASC ASSI P51P_37 MAPI RMAP ENV_37:CORE_P51P.ASC ASSI P51C_37 MAPI RMAP ENV_37:CORE_P51C.ASC { average RT37 P66F with RT37 P51F } { ================================ } ASSI P51F_37 ENVI ASSI P66F_37 ENVO ASSI EXT_37 MAPI ASSI WRK_37 MAPO AVER START 1 END 1 USEO CORQ GO { average RT37 P66P with RT37 P51P } { ================================ } ASSI P51P_37 ENVI ASSI P66P_37 ENVO ASSI EXT_37 MAPI ASSI WRK_37 MAPO AVER START 2 END 2 USEO CORQ GO { average RT37 P66C with RT37 P51C } { ================================ } ASSI P51C_37 ENVI ASSI P66C_37 ENVO ASSI EXT_37 MAPI ASSI WRK_37 MAPO AVER START 3 END 3 USEO CORQ GO { average RT37 P51F with RT37 P66F } { ================================ } ASSI P66F_37 ENVI ASSI P51F_37 ENVO ASSI EXT_37 MAPI ASSI WRK_37 MAPO AVER START 4 END 4 USEO CORQ GO { average RT37 P51P with RT37 P66P } { ================================ } ASSI P66P_37 ENVI ASSI P51P_37 ENVO ASSI EXT_37 MAPI ASSI WRK_37 MAPO AVER START 5 END 5 USEO CORQ GO { average RT37 P51C with RT37 P66C } { ================================ } ASSI P66C_37 ENVI ASSI P51C_37 ENVO ASSI EXT_37 MAPI ASSI WRK_37 MAPO AVER START 6 END 6 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66F_37 DMAP P66P_37 DMAP P66C_37 DMAP P51F_37 DMAP P51P_37 DMAP P51C_37 { Read RT37 P66T and P51T domain core envelopes } { ============================================= } ASSI P66T_37 MAPI RMAP ENV_37:CORE_P66T.ASC ASSI P51T_37 MAPI RMAP ENV_37:CORE_P51T.ASC { average RT37 P66T with RT37 P51T } { ================================ } ASSI P51T_37 ENVI ASSI P66T_37 ENVO ASSI EXT_37 MAPI ASSI WRK_37 MAPO AVER START 133 END 133 USEO CORQ GO { average RT37 P51T with RT37 P66T } { ================================ } ASSI P66T_37 ENVI ASSI P51T_37 ENVO ASSI EXT_37 MAPI ASSI WRK_37 MAPO AVER START 134 END 134 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66T_37 DMAP P51T_37 { Read RTHAM P66 and P51 domain core envelopes } { ============================================ } ASSI P66F_HAM MAPI RMAP ENV_HAM:CORE_P66F.ASC ASSI P66P_HAM MAPI RMAP ENV_HAM:CORE_P66P.ASC ASSI P66C_HAM MAPI RMAP ENV_HAM:CORE_P66C.ASC ASSI P51F_HAM MAPI RMAP ENV_HAM:CORE_P51F.ASC ASSI P51P_HAM MAPI RMAP ENV_HAM:CORE_P51P.ASC ASSI P51C_HAM MAPI RMAP ENV_HAM:CORE_P51C.ASC { average RTHAM P66F with RTHAM P51F } { ================================== } ASSI P51F_HAM ENVI ASSI P66F_HAM ENVO ASSI EXT_HAM MAPI ASSI WRK_HAM MAPO AVER START 7 END 7 USEO CORQ GO { average RTHAM P66P with RTHAM P51P } { ================================== } ASSI P51P_HAM ENVI ASSI P66P_HAM ENVO ASSI EXT_HAM MAPI ASSI WRK_HAM MAPO AVER START 8 END 8 USEO CORQ GO { average RTHAM P66C with RTHAM P51C } { ================================== } ASSI P51C_HAM ENVI ASSI P66C_HAM ENVO ASSI EXT_HAM MAPI ASSI WRK_HAM MAPO AVER START 9 END 9 USEO CORQ GO { average RTHAM P51F with RTHAM P66F } { ================================== } ASSI P66F_HAM ENVI ASSI P51F_HAM ENVO ASSI EXT_HAM MAPI ASSI WRK_HAM MAPO AVER START 10 END 10 USEO CORQ GO { average RTHAM P51P with RTHAM P66P } { ================================== } ASSI P66P_HAM ENVI ASSI P51P_HAM ENVO ASSI EXT_HAM MAPI ASSI WRK_HAM MAPO AVER START 11 END 11 USEO CORQ GO { average RTHAM P51C with RTHAM P66C } { ================================== } ASSI P66C_HAM ENVI ASSI P51C_HAM ENVO ASSI EXT_HAM MAPI ASSI WRK_HAM MAPO AVER START 12 END 12 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66F_HAM DMAP P66P_HAM DMAP P66C_HAM DMAP P51F_HAM DMAP P51P_HAM DMAP P51C_HAM { Read RTHAM P66T and P51T domain core envelopes } { ============================================== } ASSI P66T_HAM MAPI RMAP ENV_HAM:CORE_P66T.ASC ASSI P51T_HAM MAPI RMAP ENV_HAM:CORE_P51T.ASC { average RTHAM P66T with RTHAM P51T } { ================================== } ASSI P51T_HAM ENVI ASSI P66T_HAM ENVO ASSI EXT_HAM MAPI ASSI WRK_HAM MAPO AVER START 135 END 135 USEO CORQ GO { average RTHAM P51T with RTHAM P66T } { ================================== } ASSI P66T_HAM ENVI ASSI P51T_HAM ENVO ASSI EXT_HAM MAPI ASSI WRK_HAM MAPO AVER START 136 END 136 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66T_HAM DMAP P51T_HAM { Read RTHA P66 and P51 domain core envelopes } { =========================================== } ASSI P66F_HA MAPI RMAP ENV_HA:CORE_P66F.ASC ASSI P66P_HA MAPI RMAP ENV_HA:CORE_P66P.ASC ASSI P66C_HA MAPI RMAP ENV_HA:CORE_P66C.ASC ASSI P51F_HA MAPI RMAP ENV_HA:CORE_P51F.ASC ASSI P51P_HA MAPI RMAP ENV_HA:CORE_P51P.ASC ASSI P51C_HA MAPI RMAP ENV_HA:CORE_P51C.ASC { average RTHA P66F with RTHA P51F } { ================================ } ASSI P51F_HA ENVI ASSI P66F_HA ENVO ASSI EXT_HA MAPI ASSI WRK_HA MAPO AVER START 13 END 13 USEO CORQ GO { average RTHA P66P with RTHA P51P } { ================================ } ASSI P51P_HA ENVI ASSI P66P_HA ENVO ASSI EXT_HA MAPI ASSI WRK_HA MAPO AVER START 14 END 14 USEO CORQ GO { average RTHA P66C with RTHA P51C } { ================================ } ASSI P51C_HA ENVI ASSI P66C_HA ENVO ASSI EXT_HA MAPI ASSI WRK_HA MAPO AVER START 15 END 15 USEO CORQ GO { average RTHA P51F with RTHA P66F } { ================================ } ASSI P66F_HA ENVI ASSI P51F_HA ENVO ASSI EXT_HA MAPI ASSI WRK_HA MAPO AVER START 16 END 16 USEO CORQ GO { average RTHA P51P with RTHA P66P } { ================================ } ASSI P66P_HA ENVI ASSI P51P_HA ENVO ASSI EXT_HA MAPI ASSI WRK_HA MAPO AVER START 17 END 17 USEO CORQ GO { average RTHA P51C with RTHA P66C } { ================================ } ASSI P66C_HA ENVI ASSI P51C_HA ENVO ASSI EXT_HA MAPI ASSI WRK_HA MAPO AVER START 18 END 18 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66F_HA DMAP P66P_HA DMAP P66C_HA DMAP P51F_HA DMAP P51P_HA DMAP P51C_HA { Read RTHA P66T and P51T domain core envelopes } { ============================================= } ASSI P66T_HA MAPI RMAP ENV_HA:CORE_P66T.ASC ASSI P51T_HA MAPI RMAP ENV_HA:CORE_P51T.ASC { average RTHA P66T with RTHA P51T } { ================================ } ASSI P51T_HA ENVI ASSI P66T_HA ENVO ASSI EXT_HA MAPI ASSI WRK_HA MAPO AVER START 137 END 137 USEO CORQ GO { average RTHA P51T with RTHA P66T } { ================================ } ASSI P66T_HA ENVI ASSI P51T_HA ENVO ASSI EXT_HA MAPI ASSI WRK_HA MAPO AVER START 138 END 138 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66T_HA DMAP P51T_HA { Read RT147 P66 and P51 domain core envelopes } { ============================================ } ASSI P66F_147 MAPI RMAP ENV_147:CORE_P66F.ASC ASSI P66P_147 MAPI RMAP ENV_147:CORE_P66P.ASC ASSI P66C_147 MAPI RMAP ENV_147:CORE_P66C.ASC ASSI P51F_147 MAPI RMAP ENV_147:CORE_P51F.ASC ASSI P51P_147 MAPI RMAP ENV_147:CORE_P51P.ASC ASSI P51C_147 MAPI RMAP ENV_147:CORE_P51C.ASC { average RT147 P66F with RT147 P51F } { ================================== } ASSI P51F_147 ENVI ASSI P66F_147 ENVO ASSI EXT_147 MAPI ASSI WRK_147 MAPO AVER START 19 END 19 USEO CORQ GO { average RT147 P66P with RT147 P51P } { ================================== } ASSI P51P_147 ENVI ASSI P66P_147 ENVO ASSI EXT_147 MAPI ASSI WRK_147 MAPO AVER START 20 END 20 USEO CORQ GO { average RT147 P66C with RT147 P51C } { ================================== } ASSI P51C_147 ENVI ASSI P66C_147 ENVO ASSI EXT_147 MAPI ASSI WRK_147 MAPO AVER START 21 END 21 USEO CORQ GO { average RT147 P51F with RT147 P66F } { ================================== } ASSI P66F_147 ENVI ASSI P51F_147 ENVO ASSI EXT_147 MAPI ASSI WRK_147 MAPO AVER START 22 END 22 USEO CORQ GO { average RT147 P51P with RT147 P66P } { ================================== } ASSI P66P_147 ENVI ASSI P51P_147 ENVO ASSI EXT_147 MAPI ASSI WRK_147 MAPO AVER START 23 END 23 USEO CORQ GO { average RT147 P51C with RT147 P66C } { ================================== } ASSI P66C_147 ENVI ASSI P51C_147 ENVO ASSI EXT_147 MAPI ASSI WRK_147 MAPO AVER START 24 END 24 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66F_147 DMAP P66P_147 DMAP P66C_147 DMAP P51F_147 DMAP P51P_147 DMAP P51C_147 { Read RT147 P66T and P51T domain core envelopes } { ============================================== } ASSI P66T_147 MAPI RMAP ENV_147:CORE_P66T.ASC ASSI P51T_147 MAPI RMAP ENV_147:CORE_P51T.ASC { average RT147 P66T with RT147 P51T } { ================================== } ASSI P51T_147 ENVI ASSI P66T_147 ENVO ASSI EXT_147 MAPI ASSI WRK_147 MAPO AVER START 139 END 139 USEO CORQ GO { average RT147 P51T with RT147 P66T } { ================================== } ASSI P66T_147 ENVI ASSI P51T_147 ENVO ASSI EXT_147 MAPI ASSI WRK_147 MAPO AVER START 140 END 140 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66T_147 DMAP P51T_147 { Delete extended maps now that we no longer need them } { ==================================================== } DMAP EXT_37 DMAP EXT_HAM DMAP EXT_HA DMAP EXT_147 { Create second copies of the averaged maps for the RT averaging } { ============================================================== } ASSI WRK_37 MAPI ASSI END_37 MAPO CMAP GO ASSI WRK_HAM MAPI ASSI END_HAM MAPO CMAP GO ASSI WRK_HA MAPI ASSI END_HA MAPO CMAP GO ASSI WRK_147 MAPI ASSI END_147 MAPO CMAP GO { Associate symmetry operators with maps and envelopes } { ==================================================== } { Read P66F domain full envelopes } { =============================== } ASSI P66F_37 MAPI RMAP ENV_37:FULL_P66F.ASC ASSI P66F_HAM MAPI RMAP ENV_HAM:FULL_P66F.ASC ASSI P66F_HA MAPI RMAP ENV_HA:FULL_P66F.ASC ASSI P66F_147 MAPI RMAP ENV_147:FULL_P66F.ASC { average RTHAM/RTHA/RT147 P66F onto RT37 P66F } { ============================================ } ASSI P66F_37 ENVO ASSI END_37 MAPO AVEM 3 25 WRK_HAM ENV P66F_HAM 26 WRK_HA ENV P66F_HA 27 WRK_147 ENV P66F_147 START 25 END 27 USEO CORQ GO { average RT37/RTHA/RT147 P66F ONTO RTHAM P66F } { ============================================ } ASSI P66F_HAM ENVO ASSI END_HAM MAPO AVEM 3 28 WRK_37 ENV P66F_37 29 WRK_HA ENV P66F_HA 30 WRK_147 ENV P66F_147 START 28 END 30 USEO CORQ GO { average RT37/RTHAM/RT147 P66F ONTO RTHA P66F } { ============================================ } ASSI P66F_HA ENVO ASSI END_HA MAPO AVEM 3 31 WRK_37 ENV P66F_37 32 WRK_HAM ENV P66F_HAM 33 WRK_147 ENV P66F_147 START 31 END 33 USEO CORQ GO { average RT37/RTHAM/RTHA P66F ONTO RT147 P66F } { ============================================ } ASSI P66F_147 ENVO ASSI END_147 MAPO AVEM 3 34 WRK_37 ENV P66F_37 35 WRK_HAM ENV P66F_HAM 36 WRK_HA ENV P66F_HA START 34 END 36 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66F_37 DMAP P66F_HAM DMAP P66F_HA DMAP P66F_147 { Read P66P domain full envelopes } { =============================== } ASSI P66P_37 MAPI RMAP ENV_37:FULL_P66P.ASC ASSI P66P_HAM MAPI RMAP ENV_HAM:FULL_P66P.ASC ASSI P66P_HA MAPI RMAP ENV_HA:FULL_P66P.ASC ASSI P66P_147 MAPI RMAP ENV_147:FULL_P66P.ASC { average RTHAM/RTHA/RT147 P66P onto RT37 P66P } { ============================================ } ASSI P66P_37 ENVO ASSI END_37 MAPO AVEM 3 37 WRK_HAM ENV P66P_HAM 38 WRK_HA ENV P66P_HA 39 WRK_147 ENV P66P_147 START 37 END 39 USEO CORQ GO { average RT37/RTHA/RT147 P66P ONTO RTHAM P66P } { ============================================ } ASSI P66P_HAM ENVO ASSI END_HAM MAPO AVEM 3 40 WRK_37 ENV P66P_37 41 WRK_HA ENV P66P_HA 42 WRK_147 ENV P66P_147 START 40 END 42 USEO CORQ GO { average RT37/RTHAM/RT147 P66P ONTO RTHA P66P } { ============================================ } ASSI P66P_HA ENVO ASSI END_HA MAPO AVEM 3 43 WRK_37 ENV P66P_37 44 WRK_HAM ENV P66P_HAM 45 WRK_147 ENV P66P_147 START 43 END 45 USEO CORQ GO { average RT37/RTHAM/RTHA P66P ONTO RT147 P66P } { ============================================ } ASSI P66P_147 ENVO ASSI END_147 MAPO AVEM 3 46 WRK_37 ENV P66P_37 47 WRK_HAM ENV P66P_HAM 48 WRK_HA ENV P66P_HA START 46 END 48 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66P_37 DMAP P66P_HAM DMAP P66P_HA DMAP P66P_147 { Read P66T domain full envelopes } { =============================== } ASSI P66T_37 MAPI RMAP ENV_37:FULL_P66T.ASC ASSI P66T_HAM MAPI RMAP ENV_HAM:FULL_P66T.ASC ASSI P66T_HA MAPI RMAP ENV_HA:FULL_P66T.ASC ASSI P66T_147 MAPI RMAP ENV_147:FULL_P66T.ASC { average RTHAM/RTHA/RT147 P66T onto RT37 P66T } { ============================================ } ASSI P66T_37 ENVO ASSI END_37 MAPO AVEM 3 49 WRK_HAM ENV P66T_HAM 50 WRK_HA ENV P66T_HA 51 WRK_147 ENV P66T_147 START 49 END 51 USEO CORQ GO { average RT37/RTHA/RT147 P66T ONTO RTHAM P66T } { ============================================ } ASSI P66T_HAM ENVO ASSI END_HAM MAPO AVEM 3 52 WRK_37 ENV P66T_37 53 WRK_HA ENV P66T_HA 54 WRK_147 ENV P66T_147 START 52 END 54 USEO CORQ GO { average RT37/RTHAM/RT147 P66T ONTO RTHA P66T } { ============================================ } ASSI P66T_HA ENVO ASSI END_HA MAPO AVEM 3 55 WRK_37 ENV P66T_37 56 WRK_HAM ENV P66T_HAM 57 WRK_147 ENV P66T_147 START 55 END 57 USEO CORQ GO { average RT37/RTHAM/RTHA P66T ONTO RT147 P66T } { ============================================ } ASSI P66T_147 ENVO ASSI END_147 MAPO AVEM 3 58 WRK_37 ENV P66T_37 59 WRK_HAM ENV P66T_HAM 60 WRK_HA ENV P66T_HA START 58 END 60 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66T_37 DMAP P66T_HAM DMAP P66T_HA DMAP P66T_147 { Read P66C domain full envelopes } { =============================== } ASSI P66C_37 MAPI RMAP ENV_37:FULL_P66C.ASC ASSI P66C_HAM MAPI RMAP ENV_HAM:FULL_P66C.ASC ASSI P66C_HA MAPI RMAP ENV_HA:FULL_P66C.ASC ASSI P66C_147 MAPI RMAP ENV_147:FULL_P66C.ASC { average RTHAM/RTHA/RT147 P66C onto RT37 P66C } { ============================================ } ASSI P66C_37 ENVO ASSI END_37 MAPO AVEM 3 61 WRK_HAM ENV P66C_HAM 62 WRK_HA ENV P66C_HA 63 WRK_147 ENV P66C_147 START 61 END 63 USEO CORQ GO { average RT37/RTHA/RT147 P66C ONTO RTHAM P66C } { ============================================ } ASSI P66C_HAM ENVO ASSI END_HAM MAPO AVEM 3 64 WRK_37 ENV P66C_37 65 WRK_HA ENV P66C_HA 66 WRK_147 ENV P66C_147 START 64 END 66 USEO CORQ GO { average RT37/RTHAM/RT147 P66C ONTO RTHA P66C } { ============================================ } ASSI P66C_HA ENVO ASSI END_HA MAPO AVEM 3 67 WRK_37 ENV P66C_37 68 WRK_HAM ENV P66C_HAM 69 WRK_147 ENV P66C_147 START 67 END 69 USEO CORQ GO { average RT37/RTHAM/RTHA P66C ONTO RT147 P66C } { ============================================ } ASSI P66C_147 ENVO ASSI END_147 MAPO AVEM 3 70 WRK_37 ENV P66C_37 71 WRK_HAM ENV P66C_HAM 72 WRK_HA ENV P66C_HA START 70 END 72 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66C_37 DMAP P66C_HAM DMAP P66C_HA DMAP P66C_147 { Read P66R domain full envelopes } { =============================== } ASSI P66R_37 MAPI RMAP ENV_37:FULL_P66R.ASC ASSI P66R_HAM MAPI RMAP ENV_HAM:FULL_P66R.ASC ASSI P66R_HA MAPI RMAP ENV_HA:FULL_P66R.ASC ASSI P66R_147 MAPI RMAP ENV_147:FULL_P66R.ASC { average RTHAM/RTHA/RT147 P66R onto RT37 P66R } { ============================================ } ASSI P66R_37 ENVO ASSI END_37 MAPO AVEM 3 73 WRK_HAM ENV P66R_HAM 74 WRK_HA ENV P66R_HA 75 WRK_147 ENV P66R_147 START 73 END 75 USEO CORQ GO { average RT37/RTHA/RT147 P66R ONTO RTHAM P66R } { ============================================ } ASSI P66R_HAM ENVO ASSI END_HAM MAPO AVEM 3 76 WRK_37 ENV P66R_37 77 WRK_HA ENV P66R_HA 78 WRK_147 ENV P66R_147 START 76 END 78 USEO CORQ GO { average RT37/RTHAM/RT147 P66R ONTO RTHA P66R } { ============================================ } ASSI P66R_HA ENVO ASSI END_HA MAPO AVEM 3 79 WRK_37 ENV P66R_37 80 WRK_HAM ENV P66R_HAM 81 WRK_147 ENV P66R_147 START 79 END 81 USEO CORQ GO { average RT37/RTHAM/RTHA P66R ONTO RT147 P66R } { ============================================ } ASSI P66R_147 ENVO ASSI END_147 MAPO AVEM 3 82 WRK_37 ENV P66R_37 83 WRK_HAM ENV P66R_HAM 84 WRK_HA ENV P66R_HA START 82 END 84 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P66R_37 DMAP P66R_HAM DMAP P66R_HA DMAP P66R_147 { Read P51F domain full envelopes } { =============================== } ASSI P51F_37 MAPI RMAP ENV_37:FULL_P51F.ASC ASSI P51F_HAM MAPI RMAP ENV_HAM:FULL_P51F.ASC ASSI P51F_HA MAPI RMAP ENV_HA:FULL_P51F.ASC ASSI P51F_147 MAPI RMAP ENV_147:FULL_P51F.ASC { average RTHAM/RTHA/RT147 P51F onto RT37 P51F } { ============================================ } ASSI P51F_37 ENVO ASSI END_37 MAPO AVEM 3 85 WRK_HAM ENV P51F_HAM 86 WRK_HA ENV P51F_HA 87 WRK_147 ENV P51F_147 START 85 END 87 USEO CORQ GO { average RT37/RTHA/RT147 P51F ONTO RTHAM P51F } { ============================================ } ASSI P51F_HAM ENVO ASSI END_HAM MAPO AVEM 3 88 WRK_37 ENV P51F_37 89 WRK_HA ENV P51F_HA 90 WRK_147 ENV P51F_147 START 88 END 90 USEO CORQ GO { average RT37/RTHAM/RT147 P51F ONTO RTHA P51F } { ============================================ } ASSI P51F_HA ENVO ASSI END_HA MAPO AVEM 3 91 WRK_37 ENV P51F_37 92 WRK_HAM ENV P51F_HAM 93 WRK_147 ENV P51F_147 START 91 END 93 USEO CORQ GO { average RT37/RTHAM/RTHA P51F ONTO RT147 P51F } { ============================================ } ASSI P51F_147 ENVO ASSI END_147 MAPO AVEM 3 94 WRK_37 ENV P51F_37 95 WRK_HAM ENV P51F_HAM 96 WRK_HA ENV P51F_HA START 94 END 96 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P51F_37 DMAP P51F_HAM DMAP P51F_HA DMAP P51F_147 { Read P51P domain full envelopes } { =============================== } ASSI P51P_37 MAPI RMAP ENV_37:FULL_P51P.ASC ASSI P51P_HAM MAPI RMAP ENV_HAM:FULL_P51P.ASC ASSI P51P_HA MAPI RMAP ENV_HA:FULL_P51P.ASC ASSI P51P_147 MAPI RMAP ENV_147:FULL_P51P.ASC { average RTHAM/RTHA/RT147 P51P onto RT37 P51P } { ============================================ } ASSI P51P_37 ENVO ASSI END_37 MAPO AVEM 3 97 WRK_HAM ENV P51P_HAM 98 WRK_HA ENV P51P_HA 99 WRK_147 ENV P51P_147 START 97 END 99 USEO CORQ GO { average RT37/RTHA/RT147 P51P ONTO RTHAM P51P } { ============================================ } ASSI P51P_HAM ENVO ASSI END_HAM MAPO AVEM 3 100 WRK_37 ENV P51P_37 101 WRK_HA ENV P51P_HA 102 WRK_147 ENV P51P_147 START 100 END 102 USEO CORQ GO { average RT37/RTHAM/RT147 P51P ONTO RTHA P51P } { ============================================ } ASSI P51P_HA ENVO ASSI END_HA MAPO AVEM 3 103 WRK_37 ENV P51P_37 104 WRK_HAM ENV P51P_HAM 105 WRK_147 ENV P51P_147 START 103 END 105 USEO CORQ GO { average RT37/RTHAM/RTHA P51P ONTO RT147 P51P } { ============================================ } ASSI P51P_147 ENVO ASSI END_147 MAPO AVEM 3 106 WRK_37 ENV P51P_37 107 WRK_HAM ENV P51P_HAM 108 WRK_HA ENV P51P_HA START 106 END 108 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P51P_37 DMAP P51P_HAM DMAP P51P_HA DMAP P51P_147 { Read P51T domain full envelopes } { =============================== } ASSI P51T_37 MAPI RMAP ENV_37:FULL_P51T.ASC ASSI P51T_HAM MAPI RMAP ENV_HAM:FULL_P51T.ASC ASSI P51T_HA MAPI RMAP ENV_HA:FULL_P51T.ASC ASSI P51T_147 MAPI RMAP ENV_147:FULL_P51T.ASC { average RTHAM/RTHA/RT147 P51T onto RT37 P51T } { ============================================ } ASSI P51T_37 ENVO ASSI END_37 MAPO AVEM 3 109 WRK_HAM ENV P51T_HAM 110 WRK_HA ENV P51T_HA 111 WRK_147 ENV P51T_147 START 109 END 111 USEO CORQ GO { average RT37/RTHA/RT147 P51T ONTO RTHAM P51T } { ============================================ } ASSI P51T_HAM ENVO ASSI END_HAM MAPO AVEM 3 112 WRK_37 ENV P51T_37 113 WRK_HA ENV P51T_HA 114 WRK_147 ENV P51T_147 START 112 END 114 USEO CORQ GO { average RT37/RTHAM/RT147 P51T ONTO RTHA P51T } { ============================================ } ASSI P51T_HA ENVO ASSI END_HA MAPO AVEM 3 115 WRK_37 ENV P51T_37 116 WRK_HAM ENV P51T_HAM 117 WRK_147 ENV P51T_147 START 115 END 117 USEO CORQ GO { average RT37/RTHAM/RTHA P51T ONTO RT147 P51T } { ============================================ } ASSI P51T_147 ENVO ASSI END_147 MAPO AVEM 3 118 WRK_37 ENV P51T_37 119 WRK_HAM ENV P51T_HAM 120 WRK_HA ENV P51T_HA START 118 END 120 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P51T_37 DMAP P51T_HAM DMAP P51T_HA DMAP P51T_147 { Read P51C domain full envelopes } { =============================== } ASSI P51C_37 MAPI RMAP ENV_37:FULL_P51C.ASC ASSI P51C_HAM MAPI RMAP ENV_HAM:FULL_P51C.ASC ASSI P51C_HA MAPI RMAP ENV_HA:FULL_P51C.ASC ASSI P51C_147 MAPI RMAP ENV_147:FULL_P51C.ASC { average RTHAM/RTHA/RT147 P51C onto RT37 P51C } { ============================================ } ASSI P51C_37 ENVO ASSI END_37 MAPO AVEM 3 121 WRK_HAM ENV P51C_HAM 122 WRK_HA ENV P51C_HA 123 WRK_147 ENV P51C_147 START 121 END 123 USEO CORQ GO { average RT37/RTHA/RT147 P51C ONTO RTHAM P51C } { ============================================ } ASSI P51C_HAM ENVO ASSI END_HAM MAPO AVEM 3 124 WRK_37 ENV P51C_37 125 WRK_HA ENV P51C_HA 126 WRK_147 ENV P51C_147 START 124 END 126 USEO CORQ GO { average RT37/RTHAM/RT147 P51C ONTO RTHA P51C } { ============================================ } ASSI P51C_HA ENVO ASSI END_HA MAPO AVEM 3 127 WRK_37 ENV P51C_37 128 WRK_HAM ENV P51C_HAM 129 WRK_147 ENV P51C_147 START 127 END 129 USEO CORQ GO { average RT37/RTHAM/RTHA P51C ONTO RT147 P51C } { ============================================ } ASSI P51C_147 ENVO ASSI END_147 MAPO AVEM 3 130 WRK_37 ENV P51C_37 131 WRK_HAM ENV P51C_HAM 132 WRK_HA ENV P51C_HA START 130 END 132 USEO CORQ GO { Delete envelopes now that we're done } { ==================================== } DMAP P51C_37 DMAP P51C_HAM DMAP P51C_HA DMAP P51C_147 { averaging all done } { ================== } YCSY { switch on cryst. symm } { Read RT37/RTHAM/RTHA/RT147 current wang envelopes } { ================================================= } ASSI WNG_37 MAPI RMAP ENV_37:WANG.ASC ASSI WNG_HAM MAPI RMAP ENV_HAM:WANG.ASC ASSI WNG_HA MAPI RMAP ENV_HA:WANG.ASC ASSI WNG_147 MAPI RMAP ENV_147:WANG.ASC { go back and flatten the original crystal assymetric units } { ========================================================= } ASSI MAP_37 MAPI ASSI WNG_37 ENVI FLAT GO ASSI MAP_HAM MAPI ASSI WNG_HAM ENVI FLAT GO ASSI MAP_HA MAPI ASSI WNG_HA ENVI FLAT GO ASSI MAP_147 MAPI ASSI WNG_147 ENVI FLAT GO { Delete envelopes now that we're done } { ==================================== } DMAP WNG_37 DMAP WNG_HAM DMAP WNG_HA DMAP WNG_147 { Read RT37/RTHAM/RTHA/RT147 envelopes over whole of averaged domains } { =================================================================== } ASSI ALL_37 MAPI RMAP ENV_37:ALL.ASC ASSI ALL_HAM MAPI RMAP ENV_HAM:ALL.ASC ASSI ALL_HA MAPI RMAP ENV_HA:ALL.ASC ASSI ALL_147 MAPI RMAP ENV_147:ALL.ASC { now fold the averaged map back into the flattened cryst. a.u. } { ============================================================= } ASSI END_37 MAPI { this is averaged protein density } ASSI MAP_37 MAPO { this is cryst a.u. } ASSI ALL_37 ENVI { this is envelope for averaged domains } ASSI OFF ENVO FOLD { fold into cryst a.u. } ASSI END_HAM MAPI { this is averaged protein density } ASSI MAP_HAM MAPO { this is cryst a.u. } ASSI ALL_HAM ENVI { this is envelope for averaged domains } ASSI OFF ENVO FOLD { fold into cryst a.u. } ASSI END_HA MAPI { this is averaged protein density } ASSI MAP_HA MAPO { this is cryst a.u. } ASSI ALL_HA ENVI { this is envelope for averaged domains } ASSI OFF ENVO FOLD { fold into cryst a.u. } ASSI END_147 MAPI { this is averaged protein density } ASSI MAP_147 MAPO { this is cryst a.u. } ASSI ALL_147 ENVI { this is envelope for averaged domains } ASSI OFF ENVO FOLD { fold into cryst a.u. } { Delete envelopes now that we're done } { ==================================== } DMAP ALL_37 DMAP ALL_HAM DMAP ALL_HA DMAP ALL_147 { Now write out the averaged solvent flattened maps !!! } { ===================================================== } ASSI MAP_37 MAPI WMAP WORK:GAP_37.ASC ASSI MAP_HAM MAPI WMAP WORK:GAP_HAM.ASC ASSI MAP_HA MAPI WMAP WORK:GAP_HA.ASC ASSI MAP_147 MAPI WMAP WORK:GAP_147.ASC { DONE } { ==== } RETURN TO CONTENTS <#contents> ------------------------------------------------------------------------ BUILDING THE PROGRAM ON THE ALPHA CLUSTER The important files for GAP on the alpha cluster are all in directories below /$t:[oscil.average...]/. GAP is interfaced with Robert Esnoufs parser, the source code for which is in directories below /$b:[robert.p2...]/. The help file is GAP, on the Mac. To build the program one needs basically 3 files: The source code, a file (containing commen blocks, etc) and the object library for R.E's parser. The fortran source code for GAP is in /$t:[oscil.average.src]/ and is currently average_v5_working.for. This references an include file /...average.fcm/ which defines the commen blocks and parameters. The file gw14.olb/a} is the object library for R.E parser and is located in directory /$b:[robert.p2]/ // The default executable of GAP at Oxford is: $t:[oscil.average.alpha]average_V5.exe To build the program execute /@make_working.com/ which contains the lines $for/ext [-.src]average_v5_working/obj=average_v5_working $lin average_v5_working,$b:[robert.p2.alpha]gw14/lib ON THE SGI MACHINES All the files for GAP can be found in btv/av/ on the SGIs. This contains the source code /average_v4_9_working.f/ (which is almost identical to the VMS version, except for commenting out a line which calls /set_auto(****)/ ), and /average.fcm/. Once again R.Es' parser is in /robert/p2// and the object library file is /robert/p2/gw14.a/. Once again use /make_av/ to compile and link the program. f77 -O2 -extend_source -static average_v5_working.f robert/p2/gw14.a -o average_v4_9_working RETURN TO CONTENTS <#contents> ------------------------------------------------------------------------ PROGRAMMING NOTES This program has been put together with pieces of code from a number of other programs written by various workers, in particular *A.Brunger, W.Kabsch and M.Rossmann*. Thank you! Input/output streams: stream 1 - map i/o , coordinate i/o 6 - standard output 60 - copy of output (record file) 70 - parser i/o Map geometry conventions: There are some naming conventions used in the code: o - orthogonal coords in Angstroms f - fractional coords 3 - coord in 3-d map grid points 1 - coord in 1-d map address space XO,YO,ZO - orthogonal axes X,Y,Z - fractional axes J3 - 3-d array pointers AJ3 - 3-d array pointers (non-integral) JSINGLE - pointer to 1-d array MAP - map number Since the array is stored bricked in the scratch array there are further functions etc to extract brick number, element within the brick, etc. We also need to take into account the offset of the map within the scratch array. Some of the functions manipulate coords while some do actually store or retrieve the contents of the map. RETURN TO CONTENTS <#contents> ------------------------------------------------------------------------ THE END