MD SET MP 0 ; mrc.spi : get defocus using MRC program CTFFIND2 ; ; Requires ; ctffind* a shell script ; readmrc.py a python script ; ; Inputs: ; micrographs (in SPIDER format) ; start, end micrograph numbers ; parameters to ctffind, including ; - spherical aberration ; - electron beam voltage (in kV) ; - amplitude contrast ratio ; - magnification ; - pixel size on scanner (in microns) ; (see ctffind script for more) ; Outputs: ; doc file of defocus and astigmatism information. ; power spectrum generated by ctffind2 (in SPIDER format). ; text report generated by ctffind2. ; Exclude the edges of the micrograph x27 = 100 ; X distance from border x28 = 100 ; Y distance from border ; Parameters for CTFFIND2. Use symbolic vars to send to shell script. FR G [cs] 2.26 ; Spherical aberration FR G [kv] 300 ; Electron beam voltage in kV FR G [ac] 0.1 ; amplitude contrast ratio FR G <<<<<<< mrc.spi [mag] 50000 ; Magnification of original image (final mag on the F30) ======= [mag] 100000 ; Magnification of original image (final mag on the F30) >>>>>>> 1.5 FR G [scansize] 15 ; Pixel size on scanner in microns (7, 14, etc.) ; ----------- Input files -------------- FR G <<<<<<< mrc.spi [FILENUMS]filenum1 ; ../all_micrographs ; file numbers ======= [FILENUMS]../all_micrographs ; file numbers >>>>>>> 1.5 FR G <<<<<<< mrc.spi [mic]../Micrographs/mic{****x11} ; input template for micrographs ======= [mic]../Micrographs/mic{*****x11} ; input template for micrographs >>>>>>> 1.5 ; ----------- Output files -------------- FR G [defocus]new/defocus ; output doc file FR G [mrc_out]new/powmrc ; output power spectrum template FR G [report]new/report ; output report file, created by CTFFIND2 ; -------------------- END BATCH HEADER ----------------------- x15=[scansize]/[mag]*10000 ; pixel size ; DE [defocus] ; temporary files FR G [tmp1]tmp89769 FR G [tmp2]tmp92451.mrc ; use for MRC power spectrum FR G [mrc_mic]tmpmic45.mrc ; column labels for the output file SD / micrograph avg.defocus defocus1 defocus2 angle astigmatism [defocus] sd e [defocus] ; get the filenumbers UD N,x20 [FILENUMS] DO LB1 x65 = 1,x20 UD x65,x11 [FILENUMS] ; x11 is now the file number FI x21,x22 [mic] (12,2) x31 = x21 - (2*x27) ; dimensions x32 = x22 - (2*x28) WI [mic] ; input [tmp1] ; output (x31,x32) ; dimensions (x27,x28) ; start coords CP TO CCP4 [tmp1] [mrc_mic] <<<<<<< mrc.spi (32) (x15,x15,x15) ; pixel size ; let the blank above and below (call default values) ======= (32) (x15,x15,x15) ; pixel size ; leave blanks above and below (call default values) >>>>>>> 1.5 <<<<<<< mrc.spi ; ; ======= ; VM echo "calling ctffind with micrograph {****x11}" ; >>>>>>> 1.5 VM ./ctffind [mrc_mic] [tmp2] [cs] [kv] [ac] [mag] [scansize] > [report]{****x11} <<<<<<< mrc.spi CP FROM MRC ; Comment out these 3 lines if you [tmp2] ; don't want to keep the output [mrc_out]{****x11} ; power spectrum generated by CTFFIND2. ======= CP FROM CCP4 ; Comment out these lines if you [tmp2] ; don't want to keep the output [mrc_out]{****x11} ; power spectrum generated by CTFFIND3. N >>>>>>> 1.5 VM \rm [tmp2] VM ./readmrc.py [report]{****x11} {****x11} >> [defocus].$DATEXT ;VM ; Comment out these 2 lines if ;\rm [report]{****x11} ; you want to keep the report. LB1 DE [tmp1] VM \rm [mrc_mic] EN D