CP TO CCP4 - Copy SPIDER file To CCP4 format file

(3/01/06)

PURPOSE

Copies a SPIDER-format file into a CCP4 format file.

SEE ALSO

CP FROM ASCII [Copy ASCII text file to SPIDER file]
CP FROM CCP4 [Copy CCP4 format File to SPIDER file]
CP FROM EMI [Copy EMISPEC format file to SPIDER file]
CP FROM MRC [Copy Old MRC format file to SPIDER file]
CP FROM NIK [Copy Nikon Coolscan format file to SPIDER file]
CP FROM PDB [Copy PDB file to SPIDER format]
CP FROM RAW [Copy Raw Image to SPIDER file]
CP FROM TERM [Copy Terminal input to SPIDER image/volume]
CP FROM VAX [Copy VAX SPIDER file to a Unix SPIDER file]
CP FROM XP [Copy X-PLOR ASCII file to SPIDER file]
CP TO ASCII [Copy SPIDER file to ASCII text format]
CP TO BRIX [Copy SPIDER volume to BRIX file for "O" input]
CP TO CCP4 [Copy SPIDER file To CCP4 format file]
CP TO MRC [Copy SPIDER file To MRC format file]
CP TO OPEND [Copy SPIDER file To Opposite Byte Endian]
CP TO POST [Copy SPIDER image to a POSTscript image]
CP TO RAW [Copy SPIDER file to a 8-bit raw image]
CP TO TIFF [Copy SPIDER file to a TIFF format]
CP TO XPLOR [Copy SPIDER volume to X-PLOR format]

USAGE

.OPERATION: CP TO CCP4

.SPIDER INPUT: spiin01
[Enter the SPIDER file you want to copy.]

.CCP4 OUTPUT FILE NAME: ccpout
[Enter name for CCP4 format output file.]

.ENTER DATA LENGTH FOR CCP4 FILE (8 OR 32 BITS): 32
[Can create either a CCP4 MODE=0 file containing 8 bit integer values or CCP4 MODE=2 file containing 32 bit floating point values with currrent machine byte-ordering.]

.ENTER STARTING X,Y, & Z OF CCP4 IMAGE: <CR>
[Default value for Start:((NX/2)+ 1, (NY/2)+1), (NZ/2)+1
(+1 ADDED ONLY IF AXIS LENGTH IS ODD)
Enter <CR> if you want to use the default values.]

.ENTER ANGSTROMS/PIXEL FOR X, Y, & Z AXIS: 12.0, 12.0, 5.0
[Angstrom/pixel scale will be be multiplied by the number of pixels in each axis to get the cell dimensions.]

.ENTER X,Y & Z ORIGIN OF CCP4 IMAGE: <CR>
[Default value for origin:((NX/2)+ 1, (NY/2)+1), (NZ/2)+1
(+1 ADDED ONLY IF AXIS LENGTH IS ODD)
Enter <CR> if you want to use the default values.]

NOTES

  1. Can not copy SPIDER Fourier format files or SPIDER stacks.

  2. Operation attempts to compenstate for non-native byte order execution.

  3. Procedure "fit_ccp4_to_pdb.spi" below creates a CCP4 file aligned for use in 'O'.

SUBROUTINES

COPYCCP4, SETHEDCCP4

CALLER

COPY1
; fit_ccp4_to_pdb.spi
;
; THIS PROCEDURE ORIENTS AND SHIFTS A SPIDER VOLUME THAT HAS BEEN CONVERTED TO
; A BRIX VOLUME BY "CP TO BRIX" AND HAS BEEN USED (THE BRIX VOLUME) TO
; FIT A PDB STRUCTURE USING "O" OR REAL SPACE REFINEMENT (RSR). THE OUTPUT 
; OF THIS PROCEDURE IS A CCP4 VOLUME WHICH IS AT THE CORRECT LOCATION AND 
; ORIENTATION AS THAT OF THE FITTED PDB STRUCTURE. THIS CAN BE VISUALIZED 
; USING "O" OR "CHIMERA" OR "PYMOL".

; ALTERNATIVELY, 

; (1) ONE CAN ALSO ORIENT AND SHIFT THE FITTED PDB FILE TO FIT THE CCP4 
; VOLUME WHICH IS GENERATED FROM THE UNROTATED AND UNSHIFTED SPIDER VOLUME,
; WHICH CAN BE VISUALIZED BY USING "O" OR "CHIMERA" OR "PYMOL". USE PROCEDURE 
; "fit_pdb_to_ccp4.spi" IN THE SPIDER PROCEDURE DIRECTORY"spider/proc/".

; (2) ONE CAN USE "CP TO BRIX" TO CONVERT THE UNROTATED AND UNSHIFTED 
; SPIDER VOLUME TO A BRIX VOLUME WHICH CAN BE USED TO VISUALIZE THE
; FITTED PDB STRUCTURE IN "O" OR "CHIMERA" OR "PYMOL".

;;;;;;;;;;;;;;;;;;;;;;;BEGINING OF INPUT PARAMETERS;;;;;;;;;;;;;;;;;;;

FR L
?INPUT SPIDER VOLUME NAME ?[input]
vol_spi

FR L
?OUTPUT CCP4 VOLUME NAME ?[output]
vol_ccp4.ccp4

;PIXEL SIZE "[ps]"
[ps] = 2.82

;DATA LENGTH FOR CCP4 FILE "[len]"
[len] = 32

;;;;;;;;;;;;;;;;;;;;;;;END OF INPUT PARAMETERS;;;;;;;;;;;;;;;;;;;;;;;;;

; ROTATE THE VOLUME SO THAT X = Y, Y = X AND Z = -Z
RT 3D
[input]
_1
90, 0, 0

RT 3D
_1
_2
0,180,0

RT 3D
_2
_3
180,0,0

; FIND NX, NY AND NZ
FI [NX],[NY],[NZ]
[input]
12,2,1

; FIND THE CENTER IN PIXELS, FOR EVEN DIMENSION, IT IS NX/2 ETC..
; FOR ODD DIMENSION, IT IS (NX/2 + 1) ETC..

[xc] = INT([NX]/2 )
[yc] = INT([NY]/2 )
[zc] = INT([NZ]/2 )

[x] = ([NX]  - 2*[xc])  + [xc]
[y] = ([NY]  - 2*[yc])  + [yc]
[z] = ([NZ]- 2*[zc])  + [zc]

; CALCULATE THE CENTER IN ANGSTROMS
[xa] = [x] * [ps]
[ya] = [y] * [ps]
[za] = [x] * [ps]

; CREATE THE CCP4 FILE
; NOTE: FOR DISPLAY, "CHIMERA" READS THE ORIGIN WHEREAS "O" READS THE STARTING 
; POINTS OF XYZ. ORIGIN IS GIVEN IN ANGSTROMS, STARTING POINTS ARE GIVEN IN PIXELS.
CP TO CCP4
_3
[output] 
[len]
-[x],-[y],-[z]
[ps],[ps],[ps]    
-[xa],-[ya],-[za]
 
EN
 

© Copyright Notice /       Enquiries: spider@wadsworth.org