{+ 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( {============================ coordinates ============================} {* coordinate file *} {===>} coordinate_infile="amy.pdb"; {==================== molecular information ==========================} {* topology files *} {===>} topology_infile_1="CNS_TOPPAR:protein.top"; {===>} topology_infile_2="CNS_TOPPAR:dna-rna.top"; {===>} topology_infile_3="CNS_TOPPAR:water.top"; {===>} topology_infile_4="CNS_TOPPAR:ion.top"; {===>} topology_infile_5="CNS_TOPPAR:carbohydrate.top"; {===>} topology_infile_6=""; {===>} topology_infile_7=""; {===>} topology_infile_8=""; {* linkage files for linear, continuous polymers (protein, DNA, RNA) *} {===>} link_infile_1="CNS_TOPPAR:protein.link"; {===>} link_infile_2="CNS_TOPPAR:dna-rna-pho.link"; {===>} link_infile_3=""; {* parameter files *} {===>} parameter_infile_1="CNS_TOPPAR:protein_rep.param"; {===>} parameter_infile_2="CNS_TOPPAR:dna-rna_rep.param"; {===>} parameter_infile_3="CNS_TOPPAR:water_rep.param"; {===>} parameter_infile_4="CNS_TOPPAR:ion.param"; {===>} parameter_infile_5="CNS_TOPPAR:carbohydrate.param"; {===>} parameter_infile_6=""; {===>} parameter_infile_7=""; {===>} parameter_infile_8=""; {* molecular topology file: optional (leave blank for auto generation) *} {* Auto generation of the molecular topology from the coordinates should only be used if: (1) Each distinct protein, DNA, or RNA chain must have a separate segid (or chainid if the chainid is non-blank). (2) Each contiguous protein, RNA, or RNA chain must not be disrupted by other types of residues or ligands. Rather, these other residues should be listed after protein, RNA/DNA chains. (3) Disulphides are automatically detected based on distances between the sulfur atoms (must be less than 3 A apart). (4) Broken protein/RNA/DNA chains without terminii must be more than 2.5 A apart to be recognized as such. (5) N-linked glycan links are automatically recognized if the bonded atoms are less than 2.5 A apart. (6) Automatic generation cannot be used with alternate conformations. For ligands, the user must make suitable topology and parameter files. For non-standard covalent linkages, the custom patch file should be used. Alternatively, the generate.inp or generate_easy.inp task files can be used to generated the mtf prior to running this task file. *} {===>} structure_infile="amy.mtf"; {* for auto generation: extra linkages and modifications by custom patches *} {===>} patch_infile=""; {====================== 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"; {===========================================================================} { things below this line do not normally need to be changed } {===========================================================================} ) {- end block parameter definition -} checkversion 1.3 evaluate ($log_level=quiet) if ( $log_level = verbose ) then set message=normal echo=on end else set message=off echo=off end end if if ( &BLANK%structure_infile = true ) then {- read topology files -} topology evaluate ($counter=1) evaluate ($done=false) while ( $done = false ) loop read if ( &exist_topology_infile_$counter = true ) then if ( &BLANK%topology_infile_$counter = false ) then @@&topology_infile_$counter end if else evaluate ($done=true) end if evaluate ($counter=$counter+1) end loop read end @CNS_XTALMODULE:mtfautogenerate ( coordinate_infile=&coordinate_infile; convert=true; separate=true; atom_delete=(not known); hydrogen_flag=true; break_cutoff=2.5; disulphide_dist=3.0; carbo_dist=2.5; patch_infile=&patch_infile; O5_becomes="O"; ) else structure @&structure_infile end coordinates @&coordinate_infile end if {- read parameter files -} parameter evaluate ($counter=1) evaluate ($done=false) while ( $done = false ) loop read if ( &exist_parameter_infile_$counter = true ) then if ( &BLANK%parameter_infile_$counter = false ) then @@¶meter_infile_$counter end if else evaluate ($done=true) end if evaluate ($counter=$counter+1) end loop read end set message=normal echo=on end 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=true; coordinate_outfile=&coordinate_outfile; sgparam=$sgparam;) stop