23 #include <basic/Tracer.hh>
24 #include <utility/tag/Tag.hh>
26 #include <boost/foreach.hpp>
27 #define foreach BOOST_FOREACH
29 #include <utility/vector0.hh>
30 #include <utility/vector1.hh>
35 namespace protein_interface_design {
38 using namespace protocols::moves;
40 static basic::Tracer
TR(
"protocols.protein_interface_design.movers.SetupHotspotConstraintsMover" );
56 return "SetupHotspotConstraints";
60 protocols::moves::
Mover(
"SetupHotspotConstraintsMover" ),
61 chain_to_design_( 2 ),
62 CB_force_constant_( 1.0 ),
63 worst_allowed_stub_bonus_( 0.0 ),
64 apply_self_energies_( true ),
66 apply_ambiguous_constraints_( true ),
85 bool const apply_self_energies,
87 bool const apply_ambiguous_constraints,
90 protocols::moves::
Mover(
"SetupHotspotConstraintMover" ),
91 chain_to_design_(chain_to_design),
92 CB_force_constant_(CB_force_constant),
93 worst_allowed_stub_bonus_(worst_allowed_stub_bonus),
94 apply_self_energies_(apply_self_energies),
95 bump_cutoff_(bump_cutoff),
96 apply_ambiguous_constraints_(apply_ambiguous_constraints),
105 protocols::moves::
Mover( init ),
106 chain_to_design_( init.chain_to_design_),
107 CB_force_constant_(init.CB_force_constant_),
108 worst_allowed_stub_bonus_(init.worst_allowed_stub_bonus_),
109 apply_self_energies_(init.apply_self_energies_),
110 bump_cutoff_(init.bump_cutoff_),
111 apply_ambiguous_constraints_(init.apply_ambiguous_constraints_),
112 colonyE_( init.colonyE_ )
134 return "SetupHotspotConstraintsMover";
149 core::Real const bb_stub_cst_weight( tag->getOption<
core::Real >(
"backbone_stub_constraint_weight", 1.0 ) );
151 colonyE_ = tag->getOption<
bool>(
"colonyE", 0 );
154 if( tag->hasOption(
"stubfile" ) ){
156 hotspot_stub_set_->read_data( hotspot_fname );
159 foreach(
TagPtr const curr_tag, branch_tags ){
160 if( curr_tag->getName() ==
"HotspotFiles" ){
162 foreach(
TagPtr const curr_tag2, branch_tags2 ){
167 temp_stubset->read_data( file_name );
168 temp_stubset->remove_random_stubs_from_set( temp_stubset->size() - stub_num );
169 hotspot_stub_set_->add_stub_set( *temp_stubset );
170 TR<<
"Read stubset from file "<<file_name<<
" and associating it with name "<<nickname<<
'\n';
171 TR<<stub_num<<
" stubs kept in memory\n";
172 data.
add(
"hotspot_library", nickname, temp_stubset );
176 utility_exit_with_message( curr_tag->getName() +
" not recognized by SetupHotspotConstraints, did you mean HotspotFiles?" );
179 TR<<
"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";
180 data.
add(
"constraints" ,
"hotspot_stubset", hotspot_stub_set_ );
182 for( std::map< std::string, utility::pointer::ReferenceCountOP >::const_iterator it = (data)[
"scorefxns" ].begin(); it!=(data)[
"scorefxns" ].
end(); ++it ){
183 using namespace core::scoring;
188 TR<<
"Setting bacbkone_stub_constraint weight in scorefxn "<<it->first<<
" to "<<bb_stub_cst_weight<<
'\n';
191 TR<<
"Skipping resetting of backbone_stub_constraint weight in "<<it->first<<
" which is already preset to "<<weight<<
'\n';