26 #include <utility/tag/Tag.hh>
35 #include <basic/options/keys/hotspot.OptionKeys.gen.hh>
36 #include <basic/options/option.hh>
42 #include <numeric/xyzVector.hh>
46 #include <basic/Tracer.hh>
52 #include <boost/foreach.hpp>
53 #define foreach BOOST_FOREACH
56 #include <utility/vector0.hh>
57 #include <utility/vector1.hh>
63 using namespace protocols::protein_interface_design;
65 static basic::Tracer
TR(
"protocols.protein_interface_design.movers.PlacementMinimizationMover" );
68 namespace protein_interface_design {
71 using namespace protocols::moves;
75 PlacementMinimizationMoverCreator::keyname()
const
77 return PlacementMinimizationMoverCreator::mover_name();
81 PlacementMinimizationMoverCreator::create_mover()
const {
86 PlacementMinimizationMoverCreator::mover_name()
88 return "PlacementMinimization";
99 using namespace protocols::hotspot_hashing;
100 using namespace core::pack::task;
101 using namespace core::kinematics;
122 restricted_packer_task = task_factory()->create_task_and_apply_taskoperations( pose );
124 restricted_packer_task = TaskFactory::create_packer_task( pose );
129 for(
core::Size resi( host_chain_begin ); resi<=host_chain_end; ++resi ){
130 using namespace core::chemical;
131 using namespace basic::options;
132 using namespace basic::options::OptionKeys;
133 if( std::find( prevent_repacking_.begin(), prevent_repacking_.end(), resi ) != prevent_repacking_.end() ||
134 !restricted_packer_task->nonconst_residue_task( resi ).being_packed() )
135 stub_task->nonconst_residue_task( resi ).prevent_repacking();
136 if( (pose.
residue( resi ).
aa() ==
aa_gly && !option[hotspot::allow_gly]() ) || ( pose.
residue( resi ).
aa() ==
aa_pro && !option[hotspot::allow_proline ] ))
137 stub_task->nonconst_residue_task( resi ).prevent_repacking();
140 runtime_assert( cb_force_ > -0.000001 );
141 all_stubs->add_hotspot_constraints_to_pose( pose, fixed_atom_id, stub_task, all_stubs, cb_force_, 0,
false, 10.0,
true );
144 core::Size const constraint_num( stub_constraints.size() );
145 TR<<
"adding "<<constraint_num<<
" stub constraints to pose"<<std::endl;
154 using namespace protocols::hotspot_hashing;
155 using namespace core::scoring;
158 bbcst_scorefxn->reset();
160 (*bbcst_scorefxn)( pose );
164 refresh_bbstub_constraints( pose );
166 BuildAlaPose toAla( host_chain_ == 1, host_chain_ == 2 );
168 if( !prevent_repacking().empty() ) no_repack = prevent_repacking();
169 if( !no_repack.empty() ){
170 std::sort( no_repack.begin(), no_repack.end() );
171 std::unique( no_repack.begin(), no_repack.end() );
175 TR<<
"switching interface to alanine\n";
178 setup_packer_and_movemap( pose );
184 MinimizeInterface( pose, stub_scorefxn, no_min, curr_min_sc_, min_rb(), optimize_foldtree(), no_targets,
true);
195 PlacementMinimizationMover::host_chain(
core::Size const hc ){
201 stub_sets_ = stub_sets;
205 PlacementMinimizationMover::parse_my_tag(
TagPtr const tag,
211 host_chain( tag->getOption<
core::Size>(
"host_chain", 2 ) );
212 cb_force( tag->getOption<
core::Real >(
"cb_force", 0.5 ) );
216 foreach(
TagPtr const btag, branch_tags ){
217 if( btag->hasOption(
"cb_force" ) )
218 cb_force( btag->getOption<
core::Real >(
"cb_force" ) );
220 runtime_assert( cb_force_ >= -0.000001 );
221 design_partner1_ = host_chain_ == 1 ?
true :
false;
222 design_partner2_ = host_chain_ == 2 ?
true :
false;
223 repack_partner1_ =
true;
224 repack_partner2_ =
true;
225 optimize_foldtree_ = tag->getOption<
bool >(
"optimize_foldtree", false );
226 min_rb( tag->getOption<
bool >(
"minimize_rb", 1 ));
228 runtime_assert( stub_sets_.size() );
229 TR<<
"optimize_foldtree set to: "<<optimize_foldtree_<<
'\n';
230 TR<<
"cb_force is set to "<<cb_force_<<std::endl;
234 PlacementMinimizationMover::fresh_instance()
const {
238 PlacementMinimizationMover::~PlacementMinimizationMover(){}
240 PlacementMinimizationMover::PlacementMinimizationMover() :