{+ file: den_make.inp +} {+ directory: xtal_refine +} {+ description: make DEN restraints +} {+ authors: Gunnar F. Schroeder, Michael Levitt, Axel T. Brunger +} {+ copyright: Yale University +} {+ reference: +} {- 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 - the selections store1 through store3 are available for general use -} {- 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=""; {========================== DEN selection ===========================} {* select groups of atoms to be included in DEN generation *} {* at least one group must be specified. Only distances within each specified group of atoms are used for DEN, i.e., no distances between groups are used *} {+ table: rows=20 "group 1" "group 2" "group 3" "group 4" "group 5" "group 6" "group 7" "group 8" "group 9" "group 10" "group 11" "group 12" "group 13" "group 14" "group 15" "group 16" "group 17" "group 18" "group 19" "group 20" cols=1 "atom selection" +} {===>} atom_select_1=(known); {===>} atom_select_2=(none); {===>} atom_select_3=(none); {===>} atom_select_4=(none); {===>} atom_select_5=(none); {===>} atom_select_6=(none); {===>} atom_select_7=(none); {===>} atom_select_8=(none); {===>} atom_select_9=(none); {===>} atom_select_10=(none); {===>} atom_select_11=(none); {===>} atom_select_12=(none); {===>} atom_select_13=(none); {===>} atom_select_14=(none); {===>} atom_select_15=(none); {===>} atom_select_16=(none); {===>} atom_select_17=(none); {===>} atom_select_18=(none); {===>} atom_select_19=(none); {===>} atom_select_20=(none); {* DEN selection criteria *} {+ list: DEN distances will be randomly picked from the following set of atom pairs: - both atoms are included in at least one of the atom selections specified above - the distance between atoms in the reference coordinates is within the lower and upper distance cutoffs - the residues are separated by less or equal the sequence separation limit within the same chain The number of picked distances will be (number of atoms) x (desired number of distances per atom) +} {+ table: rows=4 "lower distance cutoff" "upper distance cutoff" "lower sequence separation limit" "upper sequence separation limit" "desired number of distances per atom" "DEN atom selection" cols=1 " " +} {===>} den_lower_distance_cutoff=3; {===>} den_upper_distance_cutoff=15; {===>} den_sequence_separation_low=0; {===>} den_sequence_separation_limit=10; {===>} den_ndistance_ratio=1; {* random number seed *} {===>} seed=2352; {========================== output ===================================} {* DEN output file *} {===>} den_outfile="OUTPUT"; {===========================================================================} { 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 parameter nbonds nbxmod=3 cutnb=&den_upper_distance_cutoff atom end end {- calculate number of requested distance restraints for each atom selection and total number of restraints -} evaluate ($total_ndistance=0) evaluate ($counter=1) evaluate ($done=false) while ( $done = false ) loop ndist if ( &exist_atom_select_$counter = true ) then show sum ( 1 ) ( &atom_select_$counter) evaluate ($ndistance_$counter=$result * &den_ndistance_ratio) evaluate ($total_ndistance=$total_ndistance+$ndistance_$counter) evaluate ($counter=$counter+1) else evaluate ($done=true) end if end loop ndist evaluate ($total_ndistance=$total_ndistance+1) set display=&den_outfile end display nrestraints = $total_ndistance evaluate ($outline="set message ? end eval ($old_message=$result) set echo ? end eval ($old_echo=$result)") display $outline display set message=off echo=off end set seed=&seed end evaluate ($counter=1) evaluate ($done=false) while ( $done = false ) loop dist if ( &exist_atom_select_$counter = true ) then if ($ndistance_$counter > 0) then igroup interaction ( &atom_select_$counter ) ( &atom_select_$counter ) end distance cuton=&den_lower_distance_cutoff cutoff=&den_upper_distance_cutoff reslow=&den_sequence_separation_low resdelta=&den_sequence_separation_limit ndistance=$ndistance_$counter disposition=DEN output=&den_outfile end end if evaluate ($counter=$counter+1) else evaluate ($done=true) end if end loop dist evaluate ($outline="set message=$old_message echo=$old_echo end") display $outline close &den_outfile end stop