48 #include <basic/Tracer.hh>
49 #include <numeric/random/random.hh>
59 #include <utility/vector1.hh>
68 namespace loop_closure {
74 static numeric::random::RandomGenerator
RG(9781212);
75 static basic::Tracer
tr(
"protocols.loops.loop_closure.ccd.LoopClosure");
82 ) : loop_ ( loop_def ),
83 scorefxn_( scorefxn ),
88 bEnableCcdMoves_( loop_def.
size() >= 10 ? true : false ),
89 bRampChainbreak_( false )
102 bEnableCcdMoves_( false )
121 loop_movemap->set_bb(
false );
123 if (
movemap_->get_bb( pos ) ) loop_movemap->set_bb( pos,
true );
129 ptr->enable_end_bias_check(
false );
130 ptr->set_check_ss(
false );
137 using namespace fragment;
145 cycles_ =
static_cast< int > (20*std::max( (
int)
loop_.
size(), 5 ) *cycle_ratio);
165 Real best_score( 10000000.0 );
172 if ( !success )
tr.Warning <<
" could not make fragment move at loop position " << pos
173 <<
" seqpos: " << pos << std::endl;
179 tr.Trace <<
" before frag_cycles " <<
cycles_ << std::endl;
181 tr.Trace <<
"after frag_cycles" << std::endl;
184 score = (*scorefxn_)( pose );
185 tr.Trace <<
"start ccd " << std::endl;
187 fast_ccd.
apply( pose );
192 best_score = std::min( best_score,score);
195 tr.Debug <<
"LoopClosure: fragment " << c1 <<
" best_score: " << best_score <<
" pre ccd score: " << score
204 runtime_assert( total > 0 );
205 if ( iter < static_cast< Size >( total/2.0) ) {
206 core::Real const progress( iter/total * 2.0 );
225 frag_trial.
apply( pose );
227 if ( i % 10 ==0 )
tr.Trace <<
"loop-frag-trials: iterations: " << i << std::endl;
229 ccd_trial->apply( pose );
237 runtime_assert( success );