35 #include <basic/options/option.hh>
36 #include <basic/options/keys/match.OptionKeys.gen.hh>
37 #include <basic/options/keys/run.OptionKeys.gen.hh>
39 #include <basic/Tracer.hh>
40 #include <utility/tag/Tag.hh>
42 #include <utility/vector0.hh>
43 #include <utility/vector1.hh>
46 #if defined(WIN32) || defined(__CYGWIN__)
54 static basic::Tracer
tr(
"protocols.match.MatcherMover" );
71 return "MatcherMover";
75 Mover(
"MatcherMover" ),
76 incorporate_matches_into_pose_( incorporate_matches_into_pose ),
80 basic::options::option[basic::options::OptionKeys::run::preserve_header ].value(
true);
88 incorporate_matches_into_pose_( rval.incorporate_matches_into_pose_ ),
89 ligres_( rval.ligres_ ),
90 match_positions_( rval.match_positions_ )
116 basic::options::option[ basic::options::OptionKeys::match::lig_name ] ) );
118 if( !
ligres_->type().is_ligand() ) std::cerr <<
"WARNING: downstream residue " <<
ligres_->type().name3() <<
" set in the matcher mover does not seem to be a ligand residue, matcher will likely not behave properly." << std::endl;
132 Size cent, nbr1, nbr2;
133 ligres_->select_orient_atoms( cent, nbr1, nbr2 );
135 tr <<
"Selecting orientation atoms:";
138 tr <<
" " <<
ligres_->atom_name( nbr2 ) << std::endl;
140 mtask->set_upstream_pose( pose );
145 mtask->set_downstream_pose( ligpose, oats );
147 mtask->set_ignore_cmdline_for_build_points(
true );
151 mtask->initialize_from_command_line();
155 time_t matcher_start_time = time(NULL);
157 matcher->initialize_from_task( *mtask );
162 if( matcher->find_hits() ){
163 matcher->process_matches( *processor );
166 time_t matcher_end_time = time(NULL);
167 std::string success_str( processor->match_processing_successful() ?
"successful." :
"not sucessful." );
168 tr <<
"Matcher ran for " << (long)(matcher_end_time - matcher_start_time) <<
" seconds and was " << success_str << std::endl;
179 outputter->insert_match_into_pose( pose );
192 return "MatcherMover";