26 #include <basic/Tracer.hh>
29 #include <numeric/random/random.hh>
31 #include <utility/excn/Exceptions.hh>
32 #include <basic/options/option.hh>
33 #include <basic/options/keys/fold_and_dock.OptionKeys.gen.hh>
34 #include <basic/options/keys/docking.OptionKeys.gen.hh>
40 #include <utility/vector0.hh>
41 #include <utility/vector1.hh>
46 static basic::Tracer
tr(
"protocols.topo_broker.asym_fold_and_dock",basic::t_info);
47 static numeric::random::RandomGenerator
RG(24278357);
50 namespace topology_broker {
58 input_pose_(input_pose)
78 return "AsymFoldandDockClaimer";
90 using namespace basic::options;
91 using namespace protocols::loops;
92 using namespace protocols::simple_moves;
100 rb_weight(option[ OptionKeys::fold_and_dock::rigid_body_frequency ]()),
101 slide_weight(option[ OptionKeys::fold_and_dock::slide_contact_frequency ]());
103 random_mover.
add_mover( move_anchor_mover, move_anchor_weight );
104 random_mover.
add_mover( rb_trial_mover, rb_weight );
105 random_mover.
add_mover( slide_mover, slide_weight );
109 if ( tag ==
"loop_file" || tag ==
"LOOP_FILE" ) {
112 std::ifstream infile( file.c_str() );
114 if (!infile.good()) {
115 utility_exit_with_message(
"[ERROR] Error opening RBSeg file '" + file +
"'" );
121 tr <<
"Flexible residues: " << loop_defs << std::endl;
123 }
else if (tag ==
"CHAIN_BREAK_ASSYM_FND" || tag ==
"chain_break_assym_fnd" ) {
126 throw utility::excn::EXCN_BadInput(
" Unknown tag, only LOOP, CHAIN_BREAK_ASSYM_FND definition is allowed at this stage");
136 using namespace loops;
137 using namespace kinematics;
139 if (
moving_res_.
size() == 0 )
throw utility::excn::EXCN_BadInput(
" missing definition of moving residues, add a LOOP definition ");
140 if (
moving_res_.
size() > 1 )
throw utility::excn::EXCN_BadInput(
" Only one movable region possible at this stage ");
141 if (
chain_break_res_ == 0 )
throw utility::excn::EXCN_BadInput(
" No chainbreak defined... ");
155 for (
Size i=1; i<= pdb_info->nres(); ++i ) {
157 chain.push_back(
'A' );
159 chain.push_back(
'B' );
163 pdb_info->set_chains( chain );
166 docking_local_refine_ = basic::options::option[ basic::options::OptionKeys::docking::docking_local_refine ]();
182 dock_init.
apply( pose );
185 movemap->set_bb(
true );
186 movemap->set_jump(
true );
188 for ( DofClaims::const_iterator it = init_dofs.begin(), eit = init_dofs.end();
190 if ( (*it)->owner()==this ) {
191 (*it)->toggle( *movemap,
true );
204 for (
Size i = 1; i <= cuts.size(); ++i ) {
211 using namespace core::kinematics;
215 runtime_assert( chain_break_res > 1 && chain_break_res <= nres );
220 for (
Size i=1; i<= f.num_jump(); ++i ) {
221 Size res( f.downstream_jump_residue( i ) );
222 if ( res > chain_break_res ) {