24 #include <basic/Tracer.hh>
25 #include <basic/datacache/CacheableString.fwd.hh>
35 #include <utility/vector1.hh>
38 #include <numeric/statistics.functions.hh>
41 #include <ObjexxFCL/format.hh>
42 #include <ObjexxFCL/string.functions.hh>
54 using basic::datacache::CacheableString;
64 using numeric::statistics::mean;
65 using numeric::statistics::std_dev_with_provided_mean;
67 using ObjexxFCL::string_of;
69 using ObjexxFCL::fmt::F;
72 namespace rotamer_recovery {
74 static Tracer
TR(
"protocol.rotamer_recovery.RRReporterHuman");
79 initialized_( false ),
89 Pose const & native_pose
91 initialized_( false ),
107 ReferenceCount( src ),
108 initialized_( src.initialized_ ),
109 native_pose_( src.native_pose_ ),
110 nat_bb_bins_( src.nat_bb_bins_ ),
111 nat_rots_( src.nat_rots_ ),
112 nat_chis_( src.nat_chis_ ),
113 res_scores_(src.res_scores_),
114 res_recovered_(src.res_recovered_)
131 if ( std::abs( omega ) < 90 ) {
133 }
else if ( phi >= 0.0 ) {
134 if ( -100 < psi && psi <= 100 ) {
140 if ( -125 < psi && psi <= 50 ) {
153 Pose const & native_pose) {
157 TR <<
"Attempting to set the native pose in PerNativeRRReporterHuman after it has already been initialized." << endl;
165 res.mainchain_torsion(1),
166 res.mainchain_torsion(2),
167 res.mainchain_torsion(3)
178 for (
Size jj = 1; jj <= res.nchi(); ++jj ) {
196 bool const recovered)
199 utility_exit_with_message(
"Attempting to report rotamer recovery when the native has not be set");
215 Size const column_width,
223 Real mean_score = mean(
226 Real std_dev_score = std_dev_with_provided_mean(
229 out <<
A(column_width,string_of(ii));
231 for(
Size i=1; i <= 4; ++i ){
233 out << F(column_width,
235 static_cast< long double >(
nat_rots_[ii][i]));
237 out <<
A(column_width,
"");
240 out << F(column_width,precision,mean_score);
241 out << F(column_width,precision,std_dev_score);
254 per_native_recovery_(),
255 residues_considered_(0),
256 rotamers_recovered_(0),
257 recovery_score_mean_(0),
258 recovery_score_m2_(0)
263 protocol_name_(src.protocol_name_),
264 protocol_params_(src.protocol_params_),
265 comparer_name_(src.comparer_name_),
266 comparer_params_(src.comparer_params_),
267 column_width_(src.column_width_),
268 precision_(src.precision_),
269 per_native_recovery_(src.per_native_recovery_),
270 residues_considered_(src.residues_considered_),
271 rotamers_recovered_(src.rotamers_recovered_),
272 recovery_score_mean_(src.recovery_score_mean_),
273 recovery_score_m2_(src.recovery_score_m2_)
280 string const & protocol_name,
281 string const & protocol_params
289 string const & comparer_name,
290 string const & comparer_params
336 out <<
"#Rotamer Recovery Benchmark" << endl;
346 out <<
"#Recovery rate: " << recovery_rate << endl;
351 out <<
"#" <<
comparer_name_ <<
" Recovery score sample variance: " << recovery_score_sample_variance << endl;
373 for(map< string, PerNativeRRReporterHuman >::const_iterator
376 nat_it != nat_it_end; ++nat_it)
378 nat_it->second.show( out );
388 <<
" for a recovery rate of " <<
recovery_rate() <<
"." << endl;