31 #include <utility/vector1.hh>
33 #include <ObjexxFCL/FArray1D.fwd.hh>
34 #include <ObjexxFCL/FArray2D.hh>
35 #include <basic/Tracer.hh>
46 static basic::Tracer
TR(
"protocols.docking.DockingProtocol.metrics");
55 using namespace scoring;
57 Real interaction_energy(0);
73 Real const bound_energy = (*docking_scorefxn)( complex_pose );
78 for( DockJumps::const_iterator it = movable_jumps.begin(); it != movable_jumps.end(); ++it ) {
79 Size const rb_jump = *it;
87 Real trans_magnitude = 1000;
89 translate_away->step_size( trans_magnitude );
90 translate_away->apply( unbound_pose );
92 Real const unbound_energy = (*docking_scorefxn)( unbound_pose );
94 interaction_energy += (bound_energy - unbound_energy);
97 return interaction_energy;
102 using namespace scoring;
105 for( DockJumps::const_iterator it = movable_jumps.begin(); it != movable_jumps.end(); ++it ) {
106 Size const rb_jump = *it;
107 ObjexxFCL::FArray1D_bool temp_part ( pose.
total_residue(), false );
108 ObjexxFCL::FArray1D_bool superpos_partner ( pose.
total_residue(), false );
115 if (temp_part(i)) superpos_partner(i)=
false;
116 else superpos_partner(i)=
true;
120 using namespace core::scoring;
128 using namespace scoring;
131 for( DockJumps::const_iterator it = movable_jumps.begin(); it != movable_jumps.end(); ++it ) {
134 TR <<
"Irmsd calc called with non-fullatom pose!!!"<<std::endl;
139 using namespace kinematics;
145 (*scorefxn)( native_docking_pose );
148 interface.distance( 8.0 );
149 interface.calculate( native_docking_pose );
150 ObjexxFCL::FArray1D_bool is_interface ( pose.
total_residue(), false );
153 if (interface.is_interface(i)) is_interface(i) =
true;
157 using namespace core::scoring;
165 using namespace scoring;
166 using namespace conformation;
169 for( DockJumps::const_iterator it = movable_jumps.begin(); it != movable_jumps.end(); ++it ) {
173 TR <<
"Fnat calc called with non-fullatom pose!!!"<<std::endl;
178 using namespace kinematics;
185 (*scorefxn)( native_docking_pose );
187 ObjexxFCL::FArray1D_bool temp_part ( pose.
total_residue(), false );
195 interface.
calculate( native_docking_pose );
200 if (!temp_part(i)) partner1.push_back(i);
201 if (temp_part(i)) partner2.push_back(i);
206 ObjexxFCL::FArray2D_bool contact_list(partner1.size(), partner2.size(),
false);
210 for (
Size i=1; i<= partner1.size(); i++){
212 for (
Size j=1; j<=partner2.size();j++){
218 Real native_ncontact = 0;
219 Real decoy_ncontact = 0;
222 for (
Size i=1; i<=partner1.size(); i++){
223 for (
Size j=1; j<=partner2.size(); j++){
224 if (contact_list(i,j)){
233 Fnat += decoy_ncontact/native_ncontact;
244 Real dist_cutoff2 = dist_cutoff*dist_cutoff;
246 for (
Size m=1; m<=rsd1->nheavyatoms(); m++){
247 for (
Size n=1; n<=rsd2->nheavyatoms(); n++){
248 double dist2 = rsd1->xyz(m).distance_squared( rsd2->xyz(n) );
249 if (dist2 <= dist_cutoff2)
return true;