62 #include <utility/vector1.hh>
66 #include <ObjexxFCL/format.hh>
67 #include <ObjexxFCL/string.functions.hh>
77 namespace pose_metric_calculators{
86 if ( std::abs( omega ) < 90 ) {
88 }
else if ( phi >= 0.0 ) {
89 if ( -100 < psi && psi <= 100 ) {
95 if ( -125 < psi && psi <= 50 ) {
120 for (
Size ii = 1; ii <= rot_vec.size(); ++ii ) {
122 if ( ii != rot_vec.size() ) {
154 rots.push_back( rot );
169 chi_vec.push_back( pose.
chi(jj,ii) );
171 chis.push_back( chi_vec );
180 poses.push_back(compared_pose);
203 while( (other_poses_itr != other_poses_last ) ) {
210 runtime_assert( pose_bb_bins.size() == nat_bb_bins.size() );
211 runtime_assert( pose_rots.size() == pose_rots.size() );
213 if ( pose_bb_bins[ii] == nat_bb_bins[ii] ) {
214 bb_bins_correct[ii]++;
216 for (
core::Size jj = 1; jj <= pose_rots[ii].size(); ++jj ) {
218 if ( pose_rots[ii][jj] == nat_rots[ii][jj] ) {
219 rots_correct[ii][jj]++;
229 std::ostream & output( std::cout );
233 output <<
"# total = " << ObjexxFCL::string_of(total) << std::endl;
250 if ( bb_bins_correct[ii] > 0 ) {
252 static_cast< core::Real > ( bb_bins_correct[ii] ) /
253 static_cast< core::Real > ( total )
259 if ( jj <= nat_rots[ii].
size() ) {
261 if ( rots_correct[ii][jj] > 0 ) {
262 pct_natrots_correct = (
263 static_cast< core::Real > ( rots_correct[ii][jj] ) /
264 static_cast< core::Real > ( total )
267 pct_natrots.push_back( pct_natrots_correct );
268 out_nat_rots.push_back( nat_rots[ii][jj] );
271 pct_natrots.push_back( 0.0 );
272 out_nat_rots.push_back( 999 );
284 << ObjexxFCL::fmt::F( width, prec, pct_bb )
286 << ObjexxFCL::fmt::F( width, prec, pct_natrots[1] )
288 << ObjexxFCL::fmt::F( width, prec, pct_natrots[2] )
290 << ObjexxFCL::fmt::F( width, prec, pct_natrots[3] )
292 << ObjexxFCL::fmt::F( width, prec, pct_natrots[4] )
380 // print out stats on bb_bins_correct and rots_correct
381 std::ostream & output( std::cout );
382 Size const width(12);
385 output << "# total = " << string_of(total) << std::endl;
387 << A( width, "resi_idx" )
388 << A( width, "nat_bb_bin" )
389 << A( width, "pct_bb" )
390 << A( width, "nat_rot1" )
391 << A( width, "pct_rot1" )
392 << A( width, "nat_rot2" )
393 << A( width, "pct_rot2" )
394 << A( width, "nat_rot3" )
395 << A( width, "pct_rot3" )
396 << A( width, "nat_rot4" )
397 << A( width, "pct_rot4" )
400 for ( Size ii = 1; ii <= native.total_residue(); ++ii ) {
402 if ( bb_bins_correct[ii] > 0 ) {
404 static_cast< Real > ( bb_bins_correct[ii] ) /
405 static_cast< Real > ( total )
408 vector1< Real > pct_natrots;
409 vector1< Size > out_nat_rots;
410 for ( Size jj = 1; jj <= 4; ++jj ) {
411 if ( jj <= nat_rots[ii].size() ) {
412 Real pct_natrots_correct(0.0);
413 if ( rots_correct[ii][jj] > 0 ) {
414 pct_natrots_correct = (
415 static_cast< Real > ( rots_correct[ii][jj] ) /
416 static_cast< Real > ( total )
419 pct_natrots.push_back( pct_natrots_correct );
420 out_nat_rots.push_back( nat_rots[ii][jj] );
422 //std::cout << "no rot " << jj << std::endl;
423 pct_natrots.push_back( 0.0 );
424 out_nat_rots.push_back( 999 );
428 //std::cout << "nat_rots[" << ii << "][1] = "
429 // << nat_rots[ii][1] << std::endl;
430 //std::cout << "nat_rots[" << ii << "].size() = "
431 // << nat_rots[ii].size() << std::endl;
434 << A( width, string_of(ii) )
435 << A( width, nat_bb_bins[ii] )
436 << F( width, prec, pct_bb )
437 << A( width, string_of(out_nat_rots[1]) )
438 << F( width, prec, pct_natrots[1] )
439 << A( width, string_of(out_nat_rots[2]) )
440 << F( width, prec, pct_natrots[2] )
441 << A( width, string_of(out_nat_rots[3]) )
442 << F( width, prec, pct_natrots[3] )
443 << A( width, string_of(out_nat_rots[4]) )
444 << F( width, prec, pct_natrots[4] )
448 } // int main( int argc, char * argv [] )