23 #include <basic/Tracer.hh>
24 #include <utility/tag/Tag.hh>
26 #include <boost/foreach.hpp>
27 #define foreach BOOST_FOREACH
30 #include <utility/vector0.hh>
31 #include <utility/vector1.hh>
39 #include <basic/Tracer.hh>
77 #include <basic/options/keys/symmetry.OptionKeys.gen.hh>
79 #include <utility/exit.hh>
93 #if defined(WIN32) || defined(__CYGWIN__)
110 #include <basic/options/keys/out.OptionKeys.gen.hh>
111 #include <basic/options/keys/loops.OptionKeys.gen.hh>
113 #include <basic/options/keys/in.OptionKeys.gen.hh>
115 #include <basic/options/keys/edensity.OptionKeys.gen.hh>
121 #include <utility/vector1.hh>
122 #include <basic/options/option.hh>
124 #include <basic/options/option_macros.hh>
126 #include <basic/options/keys/run.OptionKeys.gen.hh>
127 #include <basic/options/keys/hotspot.OptionKeys.gen.hh>
128 #include <basic/options/keys/packing.OptionKeys.gen.hh>
130 #include <boost/foreach.hpp>
133 namespace protocols {
134 namespace protein_interface_design {
137 using namespace protocols::moves;
139 static basic::Tracer
tr(
"protocols.protein_interface_design.movers.SetupHotspotConstraintsLoopsMover" );
155 return "SetupHotspotConstraintsLoops";
159 protocols::moves::
Mover(
"SetupHotspotConstraintsLoopsMover" ),
160 chain_to_design_( 2 ),
161 CB_force_constant_( 0.5 ),
162 worst_allowed_stub_bonus_( 0.0 ),
163 apply_self_energies_( true ),
165 apply_ambiguous_constraints_( true ),
190 protocols::moves::
Mover(
"SetupHotspotConstraintMover" ),
191 chain_to_design_( 2 ),
192 CB_force_constant_( 0.5 ),
193 worst_allowed_stub_bonus_( 0.0 ),
194 apply_self_energies_( true ),
196 apply_ambiguous_constraints_( true ),
214 protocols::moves::
Mover( init ),
215 chain_to_design_( init.chain_to_design_),
216 CB_force_constant_(init.CB_force_constant_),
217 worst_allowed_stub_bonus_(init.worst_allowed_stub_bonus_),
218 apply_self_energies_(init.apply_self_energies_),
219 bump_cutoff_(init.bump_cutoff_),
220 apply_ambiguous_constraints_(init.apply_ambiguous_constraints_),
221 colonyE_( init.colonyE_ ),
222 resfile_( init.resfile_ )
244 runtime_assert( worst_allowed_stub_bonus < 1
E-6 );
247 if (
resfile_ ==
"NONE" && basic::options::option[basic::options::OptionKeys::packing::resfile].user() ) {
257 for (
core::Size resnum=55; resnum <= 71; ++resnum ) {
264 tr.Info <<
"Making hotspot constraints..." << std::endl;
267 for (
core::Size resnum=55; resnum <= 71; ++resnum ) {
278 std::list< core::chemical::ResidueTypeCOP > allowed_aas = task->residue_task( resnum ).allowed_residue_types();
279 for (std::list< core::chemical::ResidueTypeCOP >::const_iterator restype = allowed_aas.begin();
280 restype != allowed_aas.end(); ++restype) {
284 for (std::multimap<core::Real,hotspot_hashing::HotspotStubOP >::iterator hs_stub = res_stub_set.begin();
285 hs_stub != res_stub_set.end(); ++hs_stub) {
289 tr.Info <<
"ERROR - Gly/Pro stubs cannot be used for constraints." << std::endl;
295 tr.Debug <<
"ERROR - Position " << resnum <<
" is currently Gly/Pro and cannot be used for stub constraints." << std::endl;
299 core::Real stub_bonus_value = hs_stub->second->bonus_value();
300 if ( stub_bonus_value < worst_allowed_stub_bonus ) {
336 tr.Info <<
"Applied " << ct_cst <<
" hotspots in " << constraints.size() <<
" constraints to the pose." << std::endl;
345 return "SetupHotspotConstraintsLoopsMover";
364 colonyE_ = tag->getOption<
bool>(
"colonyE", 0 );
367 if( tag->hasOption(
"stubfile" ) ){
369 hotspot_stub_set_->read_data( hotspot_fname );
372 foreach(
TagPtr const curr_tag, branch_tags ){
373 if( curr_tag->getName() ==
"HotspotFiles" ){
375 foreach(
TagPtr const curr_tag2, branch_tags2 ){
380 temp_stubset->read_data( file_name );
381 temp_stubset->remove_random_stubs_from_set( temp_stubset->size() - stub_num );
382 hotspot_stub_set_->add_stub_set( *temp_stubset );
383 tr.Info<<
"Read stubset from file "<<file_name<<
" and associating it with name "<<nickname<<
'\n';
384 tr.Info<<stub_num<<
" stubs kept in memory\n";
385 data.
add(
"hotspot_library", nickname, temp_stubset );
389 utility_exit_with_message( curr_tag->getName() +
" not recognized by SetupHotspotConstraints, did you mean HotspotFiles?" );
392 tr.Info<<
"applying hotspot hashing constraints to pose with " <<
" cb_force weight of "<<CB_force_constant_<<
", apply ambiguous constraints set to "<<apply_ambiguous_constraints_<<
" and colonyE set to " << colonyE_ <<
"\n";
393 data.
add(
"constraints" ,
"hotspot_stubset", hotspot_stub_set_ );