49 #include <numeric/random/random.hh>
53 #include <basic/Tracer.hh>
63 #include <utility/vector1.hh>
66 static basic::Tracer
tr(
"protocols.general_abinitio",basic::t_info);
67 static numeric::random::RandomGenerator
RG(198121234);
83 tr.Debug <<
"KinematicTaskControl settings: "
84 <<
" return_full_atom " <<( !return_centroid() ?
"yes" :
"no" )
85 <<
" add side-chains " << ( sampling_protocol_->return_centroid() ?
"yes" :
"no" )
91 sampling_protocol_->start_from_centroid(),
92 sampling_protocol_->return_centroid()
101 pose = res_switch().start_pose();
102 if (
tr.Debug.visible() ) output_debug_structure( pose,
"start_pose" );
106 sampling_protocol_->set_current_tag( get_current_tag() );
108 success = inner_loop( pose );
110 set_current_tag( sampling_protocol_->get_current_tag() );
112 if ( !success )
tr.Warning <<
"[WARNING] no success in sampler... could be the loop-closing " << std::endl;
114 if (
tr.Debug.visible() ) output_debug_structure( pose,
"before resolution switch ");
116 if ( !return_centroid() ) res_switch().apply( pose );
117 tr.Debug <<
"return from KinematicTaskControl" << std::endl;
123 return "KinematicTaskControl";
129 bool success(
false );
132 current_kinematics_ = NULL;
133 while ( fail++ <= 10 && !current_kinematics_ ) {
135 current_kinematics_ = new_kinematics( pose );
139 if ( current_kinematics_ &&
tr.Info.visible() ) {
140 tr.Info <<
"kinematic choice:\n";
142 current_kinematics_->sampling_fold_tree(),
143 current_kinematics_->movemap(),
146 tr.Info <<
"\nfinal_fold-tree:\n";
151 if ( current_kinematics_ ) {
153 sampling_protocol_->set_kinematics( current_kinematics() );
154 sampling_protocol_->apply( pose );
167 tr.Debug <<
"extend structure for " << loops << std::endl;
170 for (
Size pos = std::max( 1, (
int) it->start()); pos<=end_extended; pos++ ) {
173 Real const init_phi ( -150.0 );
174 Real const init_psi ( 150.0 );
175 Real const init_omega( 180.0 );
182 for (
Size pos = it->start(); pos <= end_extended; pos++ ) {
183 if( pos != it->start() ) pose.
set_phi( pos, init_phi );
184 if( pos != end_extended ) pose.
set_psi( pos, init_psi );
185 if( ( pos != it->start() ) && ( pos != end_extended ) ) pose.
set_omega( pos, init_omega );