#!/bin/csh # # resolve_pattern.csh # T. Terwilliger 5-9-03 # # Statistical density modification using local patterns of density # # Requires version 2.05 or higher of SOLVE/RESOLVE # # Input file: solve.mtz or equivalent # Output file: solve_image.mtz # # The output file solve_image.mtz contains phase information from patterns # combined with solve.mtz phase information. Does not contain information # from solvent flattening, etc. except as transmitted through the patterns # #=========================================================================== # Here are the things you might want to modify: #=========================================================================== # set resolution = '200 2.6' set solvent_content = UNKNOWN # set to "UNKNOWN" if you want resolve to guess set input_phases = solve.mtz set labin = 'FP=FP PHIB=PHIB FOM=FOM HLA=HLA HLB=HLB HLC=HLC HLD=HLD' set hklout = solve_image.mtz # setenv SOLVEDIR /usr/local/lib/solve/ setenv SOLVETMPDIR /var/tmp unlimit # set resolve = /usr/local/bin/resolve set resolve_pattern = /usr/local/bin/resolve_pattern # #=========================================================================== # Normally do not edit below here #=========================================================================== # # # Procedure: # # 1. begin with solve.mtz and carry out statistical density modification # in the usual way, including NCS, solvent flattening as appropriate. # result: resolve_std.mtz (density modified phases) # # 2. use resolve_std.mtz phases to make a map, get patterns with # resolve_patterns algorithm. Write the recovered map to # recovered_map.dat. # # 3. Use image-based phasing in resolve with recovered_map.dat to get # new phase estimates based only on information from the patterns, # combine these phase estimates with solve.mtz phases (NOT with # resolve_std.mtz phase) to yield solve_image.mtz. # # 4. repeat steps 1-3 beginning with solve_image.mtz instead of solve.mtz # # #------------------------------------------------------------------------ # setenv SYMOP $SOLVEDIR/symop.lib setenv CCP4_OPEN UNKNOWN # echo " " echo "resolve_pattern script" date echo " " if ( ! -f ${input_phases} )then echo "Sorry you need the file ${input_phases} for this script" exit endif # echo "FP PHIB FOM SIGFP etc from ${input_phases}" echo "solvent content ${solvent_content}" echo "resolution ${resolution}" echo " " # set solvent content if it is known # if ( ${solvent_content} != 'UNKNOWN' ) then echo "Using solvent content of ${solvent_content} throughout" set find_solvent_content = 'NO' else echo "Identifying optimal solvent content on first cycle" set find_solvent_content = 'YES' endif # if ( -f ha.pdb )then echo "Using coordinates in ha.pdb to identify NCS if any" endif # echo "Output phases (from $input_phases and image) will be in $hklout" # run resolve on input_phases(normally solve.mtz, never density-modified phases) # #===================================================================== if ( $find_solvent_content == 'NO' )then # # we have solvent content... # echo "Running resolve on ${input_phases} with " echo "solvent content $solvent_content to get resolve_std.mtz" # ${resolve}<resolve_std.log hklin ${input_phases} labin ${labin} resolution ${resolution} solvent_content $solvent_content no_build nohl hklout resolve_std.mtz EOD # else # # we do not have solvent content... echo "Running resolve on ${input_phases} to get resolve_std.mtz" echo "Finding solvent content automatically" # ${resolve}<resolve_std.log hklin ${input_phases} labin ${labin} resolution ${resolution} no_build nohl hklout resolve_std.mtz EOD # echo "Approximate solvent content is `cat resolve.solvent`" echo " " endif #===================================================================== # cp resolve_std.mtz resolve.mtz # #=================================================================== foreach cycle (1 2 3 ) echo " " echo "Cycle $cycle of pattern identification" # # get recovered image from resolve map # ${resolve_pattern}<pattern.log hklin resolve.mtz labin FP=FP PHIB=PHIM FOM=FOMM resolution ${resolution} recover_image cc_map_file recovered_map.dat EOD # # combine image with solve to get solve_image # ${resolve}<recover.log resolution ${resolution} hklin ${input_phases} labin ${labin} no_build pattern_phase prior_weight 1.0 hklout ${hklout} read_cc_map cc_map_file recovered_map.dat use_input_solv use_input_db EOD # echo "New cycle $cycle phases from $input_phases and images are in $hklout" # run resolve on this new solve_image.mtz: # ${resolve}<resolve_cycle.log hklin $hklout labin FP=FP PHIB=PHIM FOM=FOMM HLA=HLAM HLB=HLBM HLC=HLCM HLD=HLDM resolution ${resolution} no_build nohl hklout resolve_cycle.mtz use_input_solv use_input_db EOD cp resolve_cycle.mtz resolve.mtz # echo "End of cycle $cycle. Current combined phases (solve+image) " echo "are in $hklout" end #===================================================================