57 #include <basic/Tracer.hh>
59 #include <utility/vector1.hh>
60 #include <utility/string_util.hh>
66 #include <basic/options/option.hh>
67 #include <basic/options/keys/cm.OptionKeys.gen.hh>
75 namespace comparative_modeling {
77 static basic::Tracer
tr(
"protocols.comparative_modeling.threading");
83 protocols::moves::
Mover(
"ThreadingMover" ),
86 template_pose_( template_pose ),
88 build_query_loops_( true ),
89 repack_query_( true ),
90 randomize_loop_coords_( false ),
180 using namespace core::id;
181 using namespace core::sequence;
197 aligned_template->ungapped_sequence(),
198 aligned_template->id() +
"_align_seq",
199 aligned_template->start()
206 aligned_template->id() +
"_pdb_seq",
216 tr.Debug <<
"query sequence : " << query_pose.
sequence() << std::endl;
217 tr.Debug <<
"query sequence : " << (*query_sequence) << std::endl;
218 tr.Debug <<
"aligned_template : " << (*aligned_template) << std::endl;
219 tr.Debug <<
"template_sequence (aln): " << (*t_align_seq) << std::endl;
220 tr.Debug <<
"template_sequence (pdb): " << (*t_pdb_seq) << std::endl;
224 if ( intermediate.identities() != intermediate.length() ) {
225 tr.Warning <<
"Error: potential mismatch between sequence from alignment ";
226 tr.Warning <<
" and sequence from PDB!" << std::endl;
227 tr.Warning <<
"alignment: " << std::endl << intermediate
238 query_to_fullseq.show(
tr.Debug );
245 query_to_fullseq, intermed_map
247 tr.Debug <<
"Transitive Map" << std::endl;
248 query_to_pdbseq.show(
tr.Debug );
250 return query_to_pdbseq;
260 using namespace basic::options;
261 using namespace basic::options::OptionKeys;
266 query_to_pdbseq.show(
tr.Debug );
278 Size const t_resi = query_to_pdbseq[ resi ];
286 tr.Error <<
"Error: don't have residue " << t_resi
287 <<
" in template_pose!" << std::endl;
289 tr.Error <<
"template_pose.total_residue() == "
294 tr.Debug <<
"copying residue in query " << resi <<
" from template residue "
295 << t_resi << std::endl;
314 t_atom_name =
" OXT";
324 tr.Warning <<
"skipping atom,position " << atom_name <<
"," << resi
325 <<
" because query doesn't have atom " << atom_name <<
"."
330 tr.Warning <<
"skipping atom,position " << atom_name <<
"," << resi
331 <<
" because template doesn't have atom " << t_atom_name <<
"."
348 tr.Debug <<
"Built threading model for sequence "
349 << query_pose.
sequence() << std::endl;
350 tr.Debug <<
"Copied " << n_copied <<
" / "
367 tr.Debug <<
"building query loops." << std::endl;
371 query_loops->choose_cutpoints( query_pose );
372 tr.Debug << query_loops << std::endl;
374 if ( query_loops->size() > 0 ) {
384 option[ cm::loop_mover ](), query_loops
387 loop_mover->add_fragments(
frag_libs()[ii] );
389 loop_mover->apply( query_pose );
399 tr.Warning <<
"No loops found!" << std::endl;
411 using namespace core::scoring;
417 tr.Debug <<
"repacking residues on pose with ScoreFunction: " << std::endl;
418 scorefxn->show(
tr.Debug );
419 tr.Debug << std::endl << std::endl;
422 tr.Debug <<
"setting up ideal hydrogen geometry on all residues."
430 tr.Debug <<
"optimizing hydrogen placement with the packer."
435 (*scorefxn)(query_pose);
436 scorefxn->show(
tr.Debug, query_pose );
444 return "ThreadingMover";