39 #include <basic/Tracer.hh>
47 #include <ObjexxFCL/FArray1D.hh>
49 #include <utility/exit.hh>
60 #include <utility/vector1.hh>
74 static basic::Tracer
TR(
"protocols.swa.protein.stepwise_protein_ccd_closer" );
85 sample_generator_( sample_generator ),
86 working_bridge_res_( job_parameters->working_bridge_res() ),
87 moving_residues_( job_parameters->working_moving_res_list() ),
88 is_pre_proline_( job_parameters->is_pre_proline() ),
92 Mover::type(
"StepWiseProteinCCD_Closer");
93 if (
working_bridge_res_.size() >= 3 ) utility_exit_with_message(
"Cannot supply more than 2 bridge residues");
104 return "StepWiseProteinCCD_Closer";
113 clock_t
const time_start( clock() );
115 Pose pose_save = pose;
135 std::cout <<
"CCD closed: " << num_successes <<
" out of " <<
pose_count_ <<
" tries." << std::endl;
140 std::cout <<
"Total time in StepWiseProteinCCD_Closer: " <<
141 static_cast<Real>(clock() - time_start) / CLOCKS_PER_SEC << std::endl;
154 int const ccd_cycles = { 1000 };
155 Real const ccd_tol = { 0.001 };
156 bool const rama_check = {
true };
157 Real const max_rama_score_increase = { 100.0 };
158 Real const max_total_delta_helix = { 100.0 };
159 Real const max_total_delta_strand = { 500.0 };
160 Real const max_total_delta_loop = { 3600.0 };
162 Real const rmsd_acceptance_cutoff = 1.5;
164 Real forward_deviation, backward_deviation;
165 Real torsion_delta, rama_delta;
169 ccd_tol, rama_check, max_rama_score_increase, max_total_delta_helix,
170 max_total_delta_strand, max_total_delta_loop, forward_deviation,
171 backward_deviation, torsion_delta, rama_delta
177 TR <<
"CCD forward_dev: " << forward_deviation <<
" backward_dev: " << backward_deviation <<
" torsion_delta: " << torsion_delta <<
" rama_delta: " << rama_delta << std::endl;
178 if ( forward_deviation > rmsd_acceptance_cutoff || backward_deviation > rmsd_acceptance_cutoff )
return false;
207 TR <<
"trying CIS omega! " << omega_pos << std::endl;
222 using namespace protocols::loops;
223 using namespace core::chemical;
224 using namespace core::id;
226 Size loop_start( 0 ), loop_end( 0 ), cutpoint( 0 );
245 if ( cutpoint > 0 ) utility_exit_with_message(
"Cannot specify more than one closed cutpoint inside the bridge_residues in StepWiseProteinCCD_Closer! Consider using -ccd_close_res to specify, or else stick to one cutpoint_closed." );
252 if ( cutpoint == 0 ) utility_exit_with_message(
"Must specify one closed cutpoint within bridge_res in StepWiseProteinCCD_Closer!" );
254 if ( num_bridge_res == 0 ) {
256 loop_start = cutpoint;
257 loop_end = cutpoint+1;
263 if ( cutpoint < loop_start || cutpoint >= loop_end ) utility_exit_with_message(
"cutpoint must lie within loop" );
265 loop_ =
Loop( loop_start, loop_end, cutpoint );
270 for (
Size n = loop_start+1; n <= loop_end-1; n++ ){
286 using namespace core::id;
301 if ( is_moving_or_bridge_res[ n ] ) {
306 }
else if ( n < pose.
total_residue() && is_moving_or_bridge_res[ n+1 ] ) {
311 }
else if ( n > 1 && is_moving_or_bridge_res[ n-1 ] ) {