27 #include <basic/Tracer.hh>
36 #include <utility/vector1.hh>
38 #include <basic/options/option.hh>
39 #include <basic/options/keys/loops.OptionKeys.gen.hh>
53 #if defined(WIN32) || defined(__CYGWIN__)
60 #include <numeric/random/random.hh>
69 namespace ObjexxFCL {
namespace fmt { } }
using namespace ObjexxFCL::fmt;
78 namespace loop_mover {
82 using namespace ObjexxFCL;
83 using namespace ObjexxFCL::fmt;
85 LoopMover::LoopMover() :
115 guarded_loops_( guarded_loops )
123 Mover::type(
"LoopMover" );
228 Real const init_phi ( -150.0 );
229 Real const init_psi ( 150.0 );
230 Real const init_omega( 180.0 );
232 static int counter = 0;
234 tr().Debug <<
"Extending loop torsions" << loop.
start() <<
" " << loop.
stop()
241 for (
Size i = start_extended; i <= end_extended; ++i ) {
242 if ( i != start_extended ) pose.
set_phi( i, init_phi );
243 if ( i != end_extended ) pose.
set_psi( i, init_psi );
244 if ( ( i != start_extended ) && ( i != end_extended ) ) pose.
set_omega( i, init_omega );
258 if ( fragset->size() > 0 ) {
273 for(
core::Size i = 1; i <= segments.size(); ++i ){
275 if( loop_end <= segments[i].first )
continue;
276 tr() <<
"Setting loop from observer cache between seqpos " << segments[i].first <<
" and " << loop_end <<
"." << std::endl;
277 loops->add_loop( segments[i].first, loop_end, numeric::random::random_range(
int(segments[i].first),
int(loop_end) ) );
282 utility_exit_with_message(
"trying to set loops from observer cache even though no cache was detected in the pose");
290 bool const use_linear_chainbreak( basic::options::option[basic::options::OptionKeys::loops::kic_use_linear_chainbreak]() );
291 if ( use_linear_chainbreak ){
309 if (
this == &rhs)
return *
this;
311 Mover::operator=(rhs);
342 if (torsion_bins !=
"") {
345 for (
core::Size i = it->start(), l_end = it->stop(); i <= l_end; i++ ) {