23 #include <basic/options/keys/out.OptionKeys.gen.hh>
24 #include <utility/file/file_sys_util.hh>
25 #include <basic/options/option.hh>
26 #include <basic/Tracer.hh>
27 #include <utility/tag/Tag.hh>
35 #include <utility/vector0.hh>
36 #include <utility/vector1.hh>
40 namespace protein_interface_design {
45 using namespace core::scoring;
46 using namespace protocols::moves;
48 static basic::Tracer
TR(
"protocols.protein_interface_design.movers.HotspotHasherMover" );
64 return "HotspotHasher";
69 std::vector<std::string>
const resnames,
82 target_resnum_(target_resnum),
83 target_distance_(target_distance),
84 hashin_fname_(hashin_fname),
85 hashout_fname_(hashout_fname)
135 for( std::vector< std::string >::const_iterator it=
resnames_.begin() ; it!=
resnames_.end(); ++it ) {
138 TR <<
"Hash contains " << stubset.
size(resname) <<
" " << resname <<
" stubs." << std::endl;
142 stubs_left -= stubset.
size( resname );
143 if( stubs_left <= 0 )
146 if ( basic::options::option[ basic::options::OptionKeys::out::scorecut ].user() )
148 Real score_cutoff = basic::options::option[ basic::options::OptionKeys::out::scorecut ]();
156 cut_stubs->write_all( newfname );
166 if( n_cycles <= 0 ) n_cycles = 1;
168 for(
Size i = 1; i <= n_cycles; ++i )
172 TR <<
"Finding " << n_per*i <<
"/" <<
n_stubs_ <<
" " << resname <<
" stubs" ;
178 TR <<
"." << std::endl;
186 if ( basic::options::option[ basic::options::OptionKeys::out::scorecut ].user() )
188 Real score_cutoff = basic::options::option[ basic::options::OptionKeys::out::scorecut ]();
196 cut_stubs->write_all( newfname );
210 std::string const scorefxn( tag->getOption<
string>(
"scorefxn",
"score12" ));
218 if( tag->hasOption(
"target_residue_pdb_num" ) || tag->hasOption(
"target_residue_res_num" ) ) {
232 protocols::filters::Filters_map::const_iterator find_filter( filters.find( hotspot_filter_name ));
233 bool const filter_found( find_filter != filters.end() );
237 if( hotspot_filter_name !=
"true_filter" ){
238 TR<<
"***WARNING WARNING! Filter defined for HotspotHasher not found in filter_list!!!! Defaulting to truefilter***"<<std::endl;
239 runtime_assert( filter_found );
248 TagPtr const hash_tag_ptr = *hash_it;
250 if( tag_name ==
"residue" ) {
257 TR<<
"hashing mover finding residues: ";
258 for( std::vector< std::string >::const_iterator it=
resnames_.begin() ; it!=
resnames_.end(); ++it ) TR<<*it<<
" ";
259 if( target_resnum_ ) TR <<
target_distance_ <<
"A away from residue " << target_resnum_ << std::endl;