{+ file: fractional_transform.inp +} {+ directory: general +} {+ description: Apply transformations to molecules in fractional space +} {+ comment: Applies a specified symmetry operator and translation vector in fractional space to each selected molecule. +} {+ 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="amy.mtf"; {* coordinate file *} {===>} coordinate_infile="amy.pdb"; {====================== crystallographic data ========================} {* space group *} {* use International Table conventions with subscripts substituted by parenthesis *} {===>} sg="P2(1)2(1)2(1)"; {* unit cell parameters in Angstroms and degrees *} {+ table: rows=1 "cell" cols=6 "a" "b" "c" "alpha" "beta" "gamma" +} {===>} a=61.76; {===>} b=40.73; {===>} c=26.74; {===>} alpha=90; {===>} beta=90; {===>} gamma=90; {============================ molecule 1 =============================} {* select atoms to be transformed *} {===>} atom_select_1=(all); {* symmetry operator *} {===>} symm_op_1=(-x+1/2,-y,z+1/2); {* translation vector *} {===>} vector_1=( 0 1 0 ); {============================ molecule 2 =============================} {* select atoms to be transformed *} {===>} atom_select_2=(none); {* symmetry operator *} {===>} symm_op_2=(x,y,z); {* translation vector *} {===>} vector_2=( 0 0 0 ); {============================ molecule 3 =============================} {* select atoms to be transformed *} {===>} atom_select_3=(none); {* symmetry operator *} {===>} symm_op_3=(x,y,z); {* translation vector *} {===>} vector_3=( 0 0 0 ); {============================ molecule 4 =============================} {* select atoms to be transformed *} {===>} atom_select_4=(none); {* symmetry operator *} {===>} symm_op_4=(x,y,z); {* translation vector *} {===>} vector_4=( 0 0 0 ); {============================ molecule 5 =============================} {* select atoms to be transformed *} {===>} atom_select_5=(none); {* symmetry operator *} {===>} symm_op_5=(x,y,z); {* translation vector *} {===>} vector_5=( 0 0 0 ); {============================ molecule 6 =============================} {* select atoms to be transformed *} {===>} atom_select_6=(none); {* symmetry operator *} {===>} symm_op_6=(x,y,z); {* translation vector *} {===>} vector_6=( 0 0 0 ); {============================ molecule 7 =============================} {* select atoms to be transformed *} {===>} atom_select_7=(none); {* symmetry operator *} {===>} symm_op_7=(x,y,z); {* translation vector *} {===>} vector_7=( 0 0 0 ); {============================ molecule 8 =============================} {* select atoms to be transformed *} {===>} atom_select_8=(none); {* symmetry operator *} {===>} symm_op_8=(x,y,z); {* translation vector *} {===>} vector_8=( 0 0 0 ); {============================ molecule 9 =============================} {* select atoms to be transformed *} {===>} atom_select_9=(none); {* symmetry operator *} {===>} symm_op_9=(x,y,z); {* translation vector *} {===>} vector_9=( 0 0 0 ); {============================ molecule 10 ============================} {* select atoms to be transformed *} {===>} atom_select_10=(none); {* symmetry operator *} {===>} symm_op_10=(x,y,z); {* translation vector *} {===>} vector_10=( 0 0 0 ); {=========================== output files ============================} {* output coordinate file *} {===>} coordinate_outfile="fractional_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 xray @CNS_XTALLIB:spacegroup.lib (sg=&sg; sgparam=$sgparam;) a=&a b=&b c=&c alpha=&alpha beta=&beta gamma=&gamma 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 symmetry &symm_op_$counter selection=(&atom_select_$counter) end coord fractionalize end coord translate selection=(&atom_select_$counter) vector=&vector_$counter end coordinate orthogonalize 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