{+ file: ncs.def +} {+ directory: auxiliary +} {+ description: Defines non-crystallographic constraints or restraints +} {+ authors: Axel T. Brunger, and Paul D. Adams +} {+ copyright: Yale University +} {- begin block parameter definition -} define( {============================ NCS type ===============================} {- modification, allow both NCS types, ATB, 12/14/08 -} {* NCS type *} {+ choice: "strict" "restrain" "both" +} {===>} ncs_type="restrain"; {===================== strict NCS (Skew matrix) ======================} {* Skew matrix *} {* use the skew matrix *} {+ choice: true false +} {===>} skew_use=false; {* real-space skew matrix *} {===>} skew_matrix=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space skew vector *} {===>} skew_vector=( 0 0 0 ); {=============== strict NCS (X-ray and nonbonded terms) ==============} {* these operators are used to generate the complete asymmetric unit for structure factor and nonbonded energy calculations *} {* NCS operator 1 - the identity operator *} {* use this operator *} {+ choice: true false +} {===>} ncs_op_1=true; {* real-space rotation matrix *} {===>} ncs_matrix_1=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} ncs_vector_1=( 0 0 0 ); {* NCS operator 2 *} {* use this operator *} {+ choice: true false +} {===>} ncs_op_2=true; {* real-space rotation matrix *} {===>} ncs_matrix_2=( -0.999932 -0.011239 0.003138 ) ( 0.010826 -0.793178 0.608894 ) ( -0.004354 0.608886 0.793246 ); {* real-space translation vector *} {===>} ncs_vector_2=( 174.4428 -1.5140 0.7045 ); {* NCS operator 3 *} {* use this operator *} {+ choice: true false +} {===>} ncs_op_3=false; {* real-space rotation matrix *} {===>} ncs_matrix_3=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} ncs_vector_3=( 0 0 0 ); {* NCS operator 4 *} {* use this operator *} {+ choice: true false +} {===>} ncs_op_4=false; {* real-space rotation matrix *} {===>} ncs_matrix_4=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} ncs_vector_4=( 0 0 0 ); {* NCS operator 5 *} {* use this operator *} {+ choice: true false +} {===>} ncs_op_5=false; {* real-space rotation matrix *} {===>} ncs_matrix_5=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} ncs_vector_5=( 0 0 0 ); {* NCS operator 6 *} {* use this operator *} {+ choice: true false +} {===>} ncs_op_6=false; {* real-space rotation matrix *} {===>} ncs_matrix_6=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} ncs_vector_6=( 0 0 0 ); {* NCS operator 7 *} {* use this operator *} {+ choice: true false +} {===>} ncs_op_7=false; {* real-space rotation matrix *} {===>} ncs_matrix_7=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} ncs_vector_7=( 0 0 0 ); {* NCS operator 8 *} {* use this operator *} {+ choice: true false +} {===>} ncs_op_8=false; {* real-space rotation matrix *} {===>} ncs_matrix_8=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} ncs_vector_8=( 0 0 0 ); {* NCS operator 9 *} {* use this operator *} {+ choice: true false +} {===>} ncs_op_9=false; {* real-space rotation matrix *} {===>} ncs_matrix_9=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} ncs_vector_9=( 0 0 0 ); {* NCS operator 10 *} {* use this operator *} {+ choice: true false +} {===>} ncs_op_10=false; {* real-space rotation matrix *} {===>} ncs_matrix_10=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} ncs_vector_10=( 0 0 0 ); {================= strict NCS (nonbonded term only) ==================} {* these operators can be used to generate the full nonbonded environment around the protomer *} {* NCS nonbonded operator 1 *} {* use this operator *} {+ choice: true false +} {===>} nb_ncs_op_1=false; {* real-space rotation matrix *} {===>} nb_ncs_matrix_1=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} nb_ncs_vector_1=( 0 0 0 ); {* NCS nonbonded operator 2 *} {* use this operator *} {+ choice: true false +} {===>} nb_ncs_op_2=false; {* real-space rotation matrix *} {===>} nb_ncs_matrix_2=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} nb_ncs_vector_2=( 0 0 0 ); {* NCS nonbonded operator 3 *} {* use this operator *} {+ choice: true false +} {===>} nb_ncs_op_3=false; {* real-space rotation matrix *} {===>} nb_ncs_matrix_3=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} nb_ncs_vector_3=( 0 0 0 ); {* NCS nonbonded operator 4 *} {* use this operator *} {+ choice: true false +} {===>} nb_ncs_op_4=false; {* real-space rotation matrix *} {===>} nb_ncs_matrix_4=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} nb_ncs_vector_4=( 0 0 0 ); {* NCS nonbonded operator 5 *} {* use this operator *} {+ choice: true false +} {===>} nb_ncs_op_5=false; {* real-space rotation matrix *} {===>} nb_ncs_matrix_5=( 1 0 0 ) ( 0 1 0 ) ( 0 0 1 ); {* real-space translation vector *} {===>} nb_ncs_vector_5=( 0 0 0 ); {====================== NCS restraint group 1 ========================} {* NCS-restraint weight *} {===>} group.1.weight=300; {* target sigma for NCS related B-values *} {===>} group.1.sigb=2; {* equivalence selection 1 *} {===>} group.1.equiv.1=(segid AAAA or segid BBBB); {* equivalence selection 2 *} {===>} group.1.equiv.2=(segid CCCC or segid DDDD); {* equivalence selection 3 *} {===>} group.1.equiv.3=(none); {* equivalence selection 4 *} {===>} group.1.equiv.4=(none); {* equivalence selection 5 *} {===>} group.1.equiv.5=(none); {* equivalence selection 6 *} {===>} group.1.equiv.6=(none); {* equivalence selection 7 *} {===>} group.1.equiv.7=(none); {* equivalence selection 8 *} {===>} group.1.equiv.8=(none); {* equivalence selection 9 *} {===>} group.1.equiv.9=(none); {* equivalence selection 10 *} {===>} group.1.equiv.10=(none); {====================== NCS restraint group 2 ========================} {* NCS-restraint weight *} {===>} group.2.weight=300; {* target sigma for NCS related B-values *} {===>} group.2.sigb=2; {* equivalence selection 1 *} {===>} group.2.equiv.1=(none); {* equivalence selection 2 *} {===>} group.2.equiv.2=(none); {* equivalence selection 3 *} {===>} group.2.equiv.3=(none); {* equivalence selection 4 *} {===>} group.2.equiv.4=(none); {* equivalence selection 5 *} {===>} group.2.equiv.5=(none); {* equivalence selection 6 *} {===>} group.2.equiv.6=(none); {* equivalence selection 7 *} {===>} group.2.equiv.7=(none); {* equivalence selection 8 *} {===>} group.2.equiv.8=(none); {* equivalence selection 9 *} {===>} group.2.equiv.9=(none); {* equivalence selection 10 *} {===>} group.2.equiv.10=(none); {====================== NCS restraint group 3 ========================} {* NCS-restraint weight *} {===>} group.3.weight=300; {* target sigma for NCS related B-values *} {===>} group.3.sigb=2; {* equivalence selection 1 *} {===>} group.3.equiv.1=(none); {* equivalence selection 2 *} {===>} group.3.equiv.2=(none); {* equivalence selection 3 *} {===>} group.3.equiv.3=(none); {* equivalence selection 4 *} {===>} group.3.equiv.4=(none); {* equivalence selection 5 *} {===>} group.3.equiv.5=(none); {* equivalence selection 6 *} {===>} group.3.equiv.6=(none); {* equivalence selection 7 *} {===>} group.3.equiv.7=(none); {* equivalence selection 8 *} {===>} group.3.equiv.8=(none); {* equivalence selection 9 *} {===>} group.3.equiv.9=(none); {* equivalence selection 10 *} {===>} group.3.equiv.10=(none); {====================== NCS restraint group 4 ========================} {* NCS-restraint weight *} {===>} group.4.weight=300; {* target sigma for NCS related B-values *} {===>} group.4.sigb=2; {* equivalence selection 1 *} {===>} group.4.equiv.1=(none); {* equivalence selection 2 *} {===>} group.4.equiv.2=(none); {* equivalence selection 3 *} {===>} group.4.equiv.3=(none); {* equivalence selection 4 *} {===>} group.4.equiv.4=(none); {* equivalence selection 5 *} {===>} group.4.equiv.5=(none); {* equivalence selection 6 *} {===>} group.4.equiv.6=(none); {* equivalence selection 7 *} {===>} group.4.equiv.7=(none); {* equivalence selection 8 *} {===>} group.4.equiv.8=(none); {* equivalence selection 9 *} {===>} group.4.equiv.9=(none); {* equivalence selection 10 *} {===>} group.4.equiv.10=(none); {====================== NCS restraint group 5 ========================} {* NCS-restraint weight *} {===>} group.5.weight=300; {* target sigma for NCS related B-values *} {===>} group.5.sigb=2; {* equivalence selection 1 *} {===>} group.5.equiv.1=(none); {* equivalence selection 2 *} {===>} group.5.equiv.2=(none); {* equivalence selection 3 *} {===>} group.5.equiv.3=(none); {* equivalence selection 4 *} {===>} group.5.equiv.4=(none); {* equivalence selection 5 *} {===>} group.5.equiv.5=(none); {* equivalence selection 6 *} {===>} group.5.equiv.6=(none); {* equivalence selection 7 *} {===>} group.5.equiv.7=(none); {* equivalence selection 8 *} {===>} group.5.equiv.8=(none); {* equivalence selection 9 *} {===>} group.5.equiv.9=(none); {* equivalence selection 10 *} {===>} group.5.equiv.10=(none); {====================== NCS restraint group 6 ========================} {* NCS-restraint weight *} {===>} group.6.weight=300; {* target sigma for NCS related B-values *} {===>} group.6.sigb=2; {* equivalence selection 1 *} {===>} group.6.equiv.1=(none); {* equivalence selection 2 *} {===>} group.6.equiv.2=(none); {* equivalence selection 3 *} {===>} group.6.equiv.3=(none); {* equivalence selection 4 *} {===>} group.6.equiv.4=(none); {* equivalence selection 5 *} {===>} group.6.equiv.5=(none); {* equivalence selection 6 *} {===>} group.6.equiv.6=(none); {* equivalence selection 7 *} {===>} group.6.equiv.7=(none); {* equivalence selection 8 *} {===>} group.6.equiv.8=(none); {* equivalence selection 9 *} {===>} group.6.equiv.9=(none); {* equivalence selection 10 *} {===>} group.6.equiv.10=(none); {====================== NCS restraint group 7 ========================} {* NCS-restraint weight *} {===>} group.7.weight=300; {* target sigma for NCS related B-values *} {===>} group.7.sigb=2; {* equivalence selection 1 *} {===>} group.7.equiv.1=(none); {* equivalence selection 2 *} {===>} group.7.equiv.2=(none); {* equivalence selection 3 *} {===>} group.7.equiv.3=(none); {* equivalence selection 4 *} {===>} group.7.equiv.4=(none); {* equivalence selection 5 *} {===>} group.7.equiv.5=(none); {* equivalence selection 6 *} {===>} group.7.equiv.6=(none); {* equivalence selection 7 *} {===>} group.7.equiv.7=(none); {* equivalence selection 8 *} {===>} group.7.equiv.8=(none); {* equivalence selection 9 *} {===>} group.7.equiv.9=(none); {* equivalence selection 10 *} {===>} group.7.equiv.10=(none); {====================== NCS restraint group 8 ========================} {* NCS-restraint weight *} {===>} group.8.weight=300; {* target sigma for NCS related B-values *} {===>} group.8.sigb=2; {* equivalence selection 1 *} {===>} group.8.equiv.1=(none); {* equivalence selection 2 *} {===>} group.8.equiv.2=(none); {* equivalence selection 3 *} {===>} group.8.equiv.3=(none); {* equivalence selection 4 *} {===>} group.8.equiv.4=(none); {* equivalence selection 5 *} {===>} group.8.equiv.5=(none); {* equivalence selection 6 *} {===>} group.8.equiv.6=(none); {* equivalence selection 7 *} {===>} group.8.equiv.7=(none); {* equivalence selection 8 *} {===>} group.8.equiv.8=(none); {* equivalence selection 9 *} {===>} group.8.equiv.9=(none); {* equivalence selection 10 *} {===>} group.8.equiv.10=(none); {====================== NCS restraint group 9 ========================} {* NCS-restraint weight *} {===>} group.9.weight=300; {* target sigma for NCS related B-values *} {===>} group.9.sigb=2; {* equivalence selection 1 *} {===>} group.9.equiv.1=(none); {* equivalence selection 2 *} {===>} group.9.equiv.2=(none); {* equivalence selection 3 *} {===>} group.9.equiv.3=(none); {* equivalence selection 4 *} {===>} group.9.equiv.4=(none); {* equivalence selection 5 *} {===>} group.9.equiv.5=(none); {* equivalence selection 6 *} {===>} group.9.equiv.6=(none); {* equivalence selection 7 *} {===>} group.9.equiv.7=(none); {* equivalence selection 8 *} {===>} group.9.equiv.8=(none); {* equivalence selection 9 *} {===>} group.9.equiv.9=(none); {* equivalence selection 10 *} {===>} group.9.equiv.10=(none); {====================== NCS restraint group 10 ========================} {* NCS-restraint weight *} {===>} group.10.weight=300; {* target sigma for NCS related B-values *} {===>} group.10.sigb=2; {* equivalence selection 1 *} {===>} group.10.equiv.1=(none); {* equivalence selection 2 *} {===>} group.10.equiv.2=(none); {* equivalence selection 3 *} {===>} group.10.equiv.3=(none); {* equivalence selection 4 *} {===>} group.10.equiv.4=(none); {* equivalence selection 5 *} {===>} group.10.equiv.5=(none); {* equivalence selection 6 *} {===>} group.10.equiv.6=(none); {* equivalence selection 7 *} {===>} group.10.equiv.7=(none); {* equivalence selection 8 *} {===>} group.10.equiv.8=(none); {* equivalence selection 9 *} {===>} group.10.equiv.9=(none); {* equivalence selection 10 *} {===>} group.10.equiv.10=(none); {===========================================================================} { things below this line do not normally need to be changed } {===========================================================================} ) {- end block parameter definition -} set message ? end evaluate ($message_old=$result) set echo ? end evaluate ($echo_old=$result) if ( $log_level = verbose ) then set message=normal echo=on end else set message=off echo=off end end if checkversion 1.3 {- modification: allow both NCS types, ATB, 12/14/08 -} eval ($ncs_strict=false) eval ($ncs_restrain=false) if ( &ncs_type = "strict" ) then eval ($ncs_strict=true) elseif ( &ncs_type = "restrain" ) then eval ($ncs_restrain=true) elseif ( &ncs_type = "both" ) then eval ($ncs_strict=true) eval ($ncs_restrain=true) else display >>> Error: unknown NCS type, aborting abort end if if ( $ncs_strict=true ) then ncs strict if ( &skew_use = true ) then skew matrix=&skew_matrix translation=&skew_vector end end if evaluate ($counter=1) evaluate ($done=false) while ( $done = false ) loop xncs if ( &exist_ncs_op_$counter = true ) then if ( &ncs_op_$counter = true ) then xncsrel matrix=&ncs_matrix_$counter translation=&ncs_vector_$counter end end if else evaluate ($done=true) end if evaluate ($counter=$counter+1) end loop xncs evaluate ($counter=1) evaluate ($done=false) while ( $done = false ) loop ncs if ( &exist_nb_ncs_op_$counter = true ) then if ( &nb_ncs_op_$counter = true ) then ncsrel matrix=&nb_ncs_matrix_$counter translation=&nb_ncs_vector_$counter end end if else evaluate ($done=true) end if evaluate ($counter=$counter+1) end loop ncs end ncs strict ? end end if if ( $ncs_restrain=true ) then evaluate ($1=1) evaluate ($group=1) evaluate ($done=false) while ( $done = false ) loop ncs if ( &exist_group.$group.equiv.1 = true ) then evaluate ($nequiv=0) evaluate ($counter=1) evaluate ($innerdone=false) while ( $innerdone = false ) loop equiv if ( &exist_group.$group.equiv.$counter = true ) then show sum(1) (&group.$group.equiv.$counter) if ( $result > 0 ) then evaluate ($nequiv=$nequiv+1) else evaluate ($innerdone=true) end if else evaluate ($innerdone=true) end if evaluate ($counter=$counter+1) end loop equiv ncs restraint group evaluate ($counter=1) while ( $counter <= $nequiv ) loop equiv equiv=(&group.$group.equiv.$counter) evaluate ($counter=$counter+1) end loop equiv weight=&group.$group.weight sigb=&group.$group.sigb end end else evaluate ($done=true) end if evaluate ($group=$group+1) end loop ncs ncs restrain ? end flags include ncs end end if set message=$message_old echo=$echo_old end