{+ file: realspace_transform.inp +} {+ directory: general +} {+ description: Apply real-space transformations to molecules +} {+ comment: Applies a specified rotation matrix and translation vector to each selected molecule. This can be used to superpose NCS related molecules on a reference molecule for subsequent comparison. +} {+ authors: Axel T. Brunger, and Paul D. Adams +} {+ copyright: Yale University +} {- Guidelines for using this file: - all strings must be quoted by double-quotes - logical variables (true/false) are not quoted - do not remove any evaluate statements from the file -} {- begin block parameter definition -} define( {======================= molecular structure =========================} {* structure file *} {===>} structure_infile="eg1_dimer.mtf"; {* coordinate file *} {===>} coordinate_infile="eg1_dimer.pdb"; {============================ molecule 1 =============================} {* select atoms to be transformed *} {===>} atom_select_1=(segid CCCC or segid DDDD); {* real-space rotation matrix *} {===>} matrix_1=( -0.99993 0.01083 -0.00435 ) ( -0.01124 -0.79318 0.60889 ) ( 0.00314 0.60889 0.79325 ); {* real-space translation vector *} {===>} vector_1=( 174.45038 0.33061 -0.18440 ); {============================ molecule 2 =============================} {* select atoms to be transformed *} {===>} atom_select_2=(none); {* real-space rotation matrix *} {===>} matrix_2=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} vector_2=( 0 0 0 ); {============================ molecule 3 =============================} {* select atoms to be transformed *} {===>} atom_select_3=(none); {* real-space rotation matrix *} {===>} matrix_3=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} vector_3=( 0 0 0 ); {============================ molecule 4 =============================} {* select atoms to be transformed *} {===>} atom_select_4=(none); {* real-space rotation matrix *} {===>} matrix_4=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} vector_4=( 0 0 0 ); {============================ molecule 5 =============================} {* select atoms to be transformed *} {===>} atom_select_5=(none); {* real-space rotation matrix *} {===>} matrix_5=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} vector_5=( 0 0 0 ); {============================ molecule 6 =============================} {* select atoms to be transformed *} {===>} atom_select_6=(none); {* real-space rotation matrix *} {===>} matrix_6=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} vector_6=( 0 0 0 ); {============================ molecule 7 =============================} {* select atoms to be transformed *} {===>} atom_select_7=(none); {* real-space rotation matrix *} {===>} matrix_7=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} vector_7=( 0 0 0 ); {============================ molecule 8 =============================} {* select atoms to be transformed *} {===>} atom_select_8=(none); {* real-space rotation matrix *} {===>} matrix_8=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} vector_8=( 0 0 0 ); {============================ molecule 9 =============================} {* select atoms to be transformed *} {===>} atom_select_9=(none); {* real-space rotation matrix *} {===>} matrix_9=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} vector_9=( 0 0 0 ); {============================ molecule 10 ============================} {* select atoms to be transformed *} {===>} atom_select_10=(none); {* real-space rotation matrix *} {===>} matrix_10=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} vector_10=( 0 0 0 ); {=========================== output files ============================} {* output coordinate file *} {===>} coordinate_outfile="realspace_transform.pdb"; {* format output coordinates for use in o *} {* if false then the default CNS output coordinate format will be used *} {+ choice: true false +} {===>} pdb_o_format=true; {===========================================================================} { things below this line do not normally need to be changed } {===========================================================================} ) {- end block parameter definition -} checkversion 1.2 evaluate ($log_level=quiet) structure @@&structure_infile end coordinates @@&coordinate_infile evaluate ($sg="P1") xray @CNS_XTALLIB:spacegroup.lib (sg=$sg; sgparam=$sgparam;) end evaluate ($counter=1) evaluate ($done=false) while ( $done = false ) loop main if ( &EXIST%atom_select_$counter = true ) then show sum(1) ( &atom_select_$counter ) if ( $result > 0 ) then coord rotate selection=(&atom_select_$counter) matrix=&matrix_$counter end coord translate selection=(&atom_select_$counter) vector=&vector_$counter end end if evaluate ($counter=$counter+1) else evaluate ($done=true) end if end loop main @CNS_XTALMODULE:write_pdb (pdb_o_format=&pdb_o_format; coordinate_outfile=&coordinate_outfile; sgparam=$sgparam;) stop