21 #include <utility/tag/Tag.hh>
39 #include <numeric/xyzVector.hh>
43 #include <basic/Tracer.hh>
49 #include <boost/foreach.hpp>
51 #include <utility/vector0.hh>
52 #include <utility/vector1.hh>
60 #define foreach BOOST_FOREACH
62 using namespace protocols::protein_interface_design;
64 static basic::Tracer
TR(
"protocols.protein_interface_design.movers.PlacementAuctionMover" );
67 namespace protein_interface_design {
70 using namespace protocols::moves;
74 PlacementAuctionMoverCreator::keyname()
const
76 return PlacementAuctionMoverCreator::mover_name();
80 PlacementAuctionMoverCreator::create_mover()
const {
85 PlacementAuctionMoverCreator::mover_name()
90 PlacementAuctionMover::PlacementAuctionMover() :
153 using namespace protocols::hotspot_hashing;
154 using namespace core::scoring;
158 using namespace core::scoring;
160 only_stub_scorefxn->
reset();
170 typedef std::pair< core::Real, std::pair< core::Size, StubsetStubPair > >
ResidueAuctionItem;
171 typedef std::multimap< core::Real, std::pair< core::Size, StubsetStubPair > >
ResidueAuction;
173 using namespace core::pack::task;
180 for(
core::Size host_position( host_chain_begin+1 ); host_position<=host_chain_end-1; ++host_position ){
181 using namespace core::chemical;
184 if(
task->nonconst_residue_task( host_position ).being_packed() )
185 host_positions.push_back( host_position );
193 foreach(
core::Size const host_residue, host_positions )
197 core::Real const bonus( stub->bonus_value() );
201 using namespace core::scoring::constraints;
207 if( bb_cst_score <= -0.5 )
208 insert( std::make_pair( bb_cst_score, std::make_pair( host_residue, std::make_pair( stub_set, stub ) ) ) );
214 TR<<
"No pairing found. Failing."<<std::endl;
224 core::Size const position( lowest_energy->second.first );
230 if( hs_set.first == stubset ){
231 hs_set.second.first = stub;
232 hs_set.second.second = position;
237 for( ResidueAuction::iterator energy_set_pair =
begin(); energy_set_pair !=
end(); ){
238 ResidueAuction::iterator next_it = energy_set_pair;
239 core::Size const erased_pos( energy_set_pair->second.first );
242 if( position == erased_pos || stubset == erased_stubset ){
244 erase( energy_set_pair );
245 energy_set_pair = next_it;
247 else ++energy_set_pair;
252 core::Size const pos( stubset_pos_pair.second.second );
254 TR<<
"Pairing failed"<<std::endl;
261 TR<<
"Pairing successful."<<std::endl;
309 using namespace protocols::hotspot_hashing;
310 using namespace protocols::filters;
311 using namespace core::scoring;
320 TR<<
"PlacementAuction mover on chain "<<
host_chain_<<
" with repack_non_ala set to "<<std::endl;