24 #include <basic/options/option.hh>
25 #include <basic/options/keys/OptionKeys.hh>
26 #include <basic/options/keys/in.OptionKeys.gen.hh>
29 #include <basic/Tracer.hh>
32 #include <numeric/model_quality/rms.hh>
35 #include <ObjexxFCL/FArray2D.hh>
36 #include <ObjexxFCL/FArray1D.hh>
37 #include <basic/prof.hh>
44 #include <utility/io/izstream.hh>
50 namespace frag_picker {
53 using namespace basic::options;
54 using namespace basic::options::OptionKeys;
57 "protocols.frag_picker.scores.FragmentCrmsd");
89 FArray2_double& coords,
Size n_atoms) {
91 trRmsScore.Debug <<
"Copying coordinates from ... The first residues are: "
99 coords(d, i) = xyz[d - 1];
106 PROF_START( basic::CA_RMSD_EVALUATION );
112 for (
Size i = 1; i <= f->get_length(); i++) {
114 Size qindex = i + f->get_first_index_in_query() - 1;
115 VallResidueOP r = chunk->at( f->get_first_index_in_vall() + i - 1 );
123 Real rms = numeric::model_quality::rms_wrapper(f->get_length(),
126 empty_map->set_score_component(rms,
id_);
127 PROF_STOP( basic::CA_RMSD_EVALUATION );
138 for (
core::Size i = 1; i <= current_chunk->size(); i++) {
149 std::string tmp = fragment->get_chunk()->chunk_key();
153 PROF_START( basic::CA_RMSD_EVALUATION );
154 Size frag_len = fragment->get_length();
163 + fragment->get_first_index_in_vall() - 1);
165 + fragment->get_first_index_in_query() - 1);
168 Real rms = numeric::model_quality::rms_wrapper(frag_len,
171 scores->set_score_component(rms,
id_);
172 PROF_STOP( basic::CA_RMSD_EVALUATION );
186 if (option[in::file::native].user()) {
188 <<
"Reference structure to score fragments by crmsd loaded from: "
189 << option[in::file::native]() << std::endl;
194 lowest_acceptable_value, use_lowest, nativePose);
196 if (option[in::file::s].user()) {
198 <<
"Reference structure to score fragments by crmsd loaded from: "
199 << option[in::file::s]()[1] << std::endl;
204 lowest_acceptable_value, use_lowest, nativePose);
209 <<
"Reference structure to score fragments by crmsd loaded from: "
216 while( getline( input, line ) ) {
218 if ( line.substr(0,1) ==
"#" )
continue;
219 std::istringstream line_stream( line );
222 line_stream >> x >> y >> z;
226 xyz.push_back( row );
228 trRmsScore << xyz.size() <<
" atoms found in the reference" << std::endl;
231 lowest_acceptable_value, use_lowest, xyz);
233 utility_exit_with_message(
234 "Can't read a reference structure. Provide it with in::file::s flag");