! !! copyright by X. Cai Zhang (modified on 010607) ! This macro calculate the matrix from one protein molecule to another. ! It require v01b or higher version EDPDB to run this macro. ! A PDB file, tmp_.pdb, is written to output the rotated-translated molecule. ! Note: the PDB file should not contain a 'j' chain. ! also see: matchzn.edp, match1ds.edp, match1d.edp ! Syntax: ! @match3d target_chain moving_chain ! example: to overlay chain b to chain a, type ! @match3d a b ! define secondary structures initialize ; ca ; setw 0.0 @find_helices setw 1.0 @find_strands setw 2.0 ! define molecule A and B parameter ch_a = $(p1) parameter ch_b = $(p2) ! overlay B to A based on secondary structure alignment initialize ; ca | chain $(ch_a) ; group a initialize ; ca | chain $(ch_b) ; group b setenv -s verbose 2 match3d a 4 5.0 rtn_.txt !! ^ parameters that can be varied if (-i status == -3 ) goto abort chain $(ch_b) ; rtn file rtn_.txt ; initialize ca ; seti ; setw 1.0 ; initialize ! refine the overlay based on ! maximizing the number of matched atoms ! and minimizing the overall coordinate difference setenv verbose 0 @align3d $(ch_a) $(ch_b) 7.0 !! ^ a parameter that can be varied if ( -i istatus == -1 ) goto abort @align3d , , 6 if ( -i istatus == -1 ) goto abort @align3d , , 5 if ( -i istatus == -1 ) goto abort @align3d , , 4 if ( -i istatus == -1 ) goto abort @align3d , , 3 if ( -i istatus == -1 ) goto abort @align3d , , if ( -i istatus == -1 ) goto abort system rm tmp_.pdb ; write tmp_.pdb ; close; reset read tmp_.pdb j ; chain j ; group jnk ; initialize chain $(ch_b) ; overlay jnk $(ch_b)2$(ch_a)_.txt ; initialize setenv -r verbose ! NOTE THAT THE ORINGINAL FILE(S) HAVE NOT BEEN CHANGED YET. ! ! match3d mainly does two things. first it calculates ! the rotation-translation matrix from one molecule ($(ch_b)) ! to the other ($(ch_a)), named as $(ch_b)2$(ch_a)_.txt; second, it creates a PDB file, ! tmp_.pdb of the rotated-translated molecule ($(ch_b)). ! the input PDB file(s) are reset to the oringinal ones ! at the end of the procedure. ! Suggested action: ! initialize ; chain $(ch_b) ; rtn file $(ch_b)2$(ch_a)_.txt ! return abort: ; setenv -r verbose !