25 #include <numeric/conversions.hh>
29 #include <basic/options/keys/OptionKeys.hh>
32 #include <basic/Tracer.hh>
39 #include <utility/vector1.hh>
47 namespace frag_picker {
50 using namespace basic::options;
51 using namespace basic::options::OptionKeys;
54 "protocols.frag_picker.scores.JCoupling");
58 CachingScoringMethod(priority, lowest_acceptable_value, use_lowest,
"JCoupling"), data_(reader) {
69 if (ctmp.compare(
"change to 'cached_scores_id_' when ready") != 0) {
78 return score( fragment, scores );
137 Size offset_q = fragment->get_first_index_in_query();
138 Size offset_v = fragment->get_first_index_in_vall();
143 for (
Size i = 1; i <= fragment->get_length(); ++i) {
145 Size query_res = offset_q + i - 1;
146 Size vall_res = offset_v + i - 1;
149 Real cos_phi( cos( numeric::conversions::radians(r->phi()) +
THETA_ ) );
151 bool has_data(
false);
153 std::pair< Real, Real > datum(
data_.
get_data( query_res, has_data ) );
156 Real val = datum.first;
157 Real dev = datum.second;
159 Real tmp((val - (
A_ * cos_phi * cos_phi +
B_ * cos_phi +
C_)) / dev);
171 score = score / ((
Real) fragment->get_length());
173 scores->set_score_component(score,
id_);
198 if (input_file !=
"") {
201 <<
"Experimental Data for JCoupling scoring loaded from file: "
202 << input_file << std::endl;
206 lowest_acceptable_value, use_lowest, reader);
209 utility_exit_with_message(
210 "Can't read JCoupling file.");