18 #include <basic/Tracer.hh>
28 #include <ObjexxFCL/string.functions.hh>
29 #include <numeric/angle.functions.hh>
32 #include <utility/vector1.hh>
35 static basic::Tracer
tr(
"protocols.comparative_modeling.Align_RotamerEvaluator");
38 namespace comparative_modeling {
48 AlignEvaluator( native_pose, tag, true, aln ),
56 using namespace core::pack::dunbrack;
63 rots.push_back( rot );
80 for (
Size jj = 1; jj <= n_chi; ++jj ) {
81 chi_vec.push_back( pose.
chi(jj,ii) );
83 chis.push_back( chi_vec );
98 using namespace core::pack::dunbrack;
100 SequenceMapping mapping(
get_alignment(pose)->sequence_mapping(1,2) );
102 tr.flush_all_channels();
103 static Size const MAX_N_CHI (4);
110 Size const native_ii( mapping[ii] );
120 if ( model_rots.size() == native_rots.size() ) {
121 for (
Size chi_idx = 1; chi_idx <= model_rots.size(); ++chi_idx ) {
123 if ( model_rots[chi_idx] == native_rots[chi_idx] ) {
124 n_rots_equiv[chi_idx]++;
130 Real const model_chi ( pose.
chi(chi_idx,ii) );
132 using numeric::nearest_angle_degrees;
133 if ( nearest_angle_degrees(model_chi,native_chi) <= max_dev ) {
134 n_chis_equiv[chi_idx]++;
145 for (
Size ii = 1; ii <= n_chis_equiv.size(); ++ii ) {
147 using ObjexxFCL::string_of;
149 string const chi_tag(
"chi" + string_of(ii) +
"_equiv_" +
tag() );
150 Real const chi_equiv( coverage * (
Real) n_chis_equiv[ii] / (
Real) native_nres );
153 string const rot_tag(
"rot" + string_of(ii) +
"_equiv_" +
tag() );
154 Real const rot_equiv( coverage * (
Real) n_rots_equiv[ii] / (
Real) native_nres );