34 #include <basic/datacache/BasicDataCache.hh>
40 #include <numeric/xyzVector.hh>
41 #include <numeric/xyz.functions.hh>
45 #include <basic/options/option.hh>
46 #include <basic/options/keys/OptionKeys.hh>
47 #include <basic/options/keys/cm.OptionKeys.gen.hh>
49 #include <ObjexxFCL/FArray1D.hh>
50 #include <ObjexxFCL/FArray2D.hh>
51 #include <ObjexxFCL/format.hh>
52 #include <numeric/random/random.hh>
53 #include <numeric/model_quality/rms.hh>
54 #include <numeric/model_quality/maxsub.hh>
56 #include <basic/Tracer.hh>
58 static numeric::random::RandomGenerator
RG(1183103);
59 static basic::Tracer
TR(
"protocols.hybridization.InsertChunkMover" );
62 namespace hybridization {
66 using namespace ObjexxFCL;
69 registry_shift_(0), anchor_insert_only_(false), align_to_ss_only_(false), copy_ss_torsion_only_(false), secstruct_(
'L')
78 std::map <core::Size, core::Size>
const & sequence_alignment) {
101 while (counter < MAX_TRIAL) {
113 TR.Debug <<
"Align Seqpos: " << seqpos_pose << std::endl;
116 TR.Debug <<
"Found Seqpos: " << seqpos_pose+registry_shift <<
" -> " << seqpos_template << std::endl;
120 TR.Debug <<
"Passed SS" << std::endl;
134 if ( jres_template <= 0 || jres_template >
template_pose_->total_residue() )
continue;
136 if ( !
template_pose_->residue_type(jres_template).is_protein() )
continue;
143 TR.Debug <<
"Disconnect upper: " << ires_pose <<
" " << jres_template << std::endl;
152 if ( jres_template <= 0 || jres_template >
template_pose_->total_residue() )
continue;
154 if ( !
template_pose_->residue_type(jres_template).is_protein() )
continue;
161 TR.Debug <<
"Disconnect lower: " << ires_pose <<
" " << jres_template << std::endl;
173 if ( jres_template <= 0 || jres_template >
template_pose_->total_residue() )
continue;
175 if ( !
template_pose_->residue_type(jres_template).is_protein() )
continue;
190 if ( jres_template <= 0 || jres_template >
template_pose_->total_residue() )
continue;
192 if ( !
template_pose_->residue_type(jres_template).is_protein() )
continue;
205 if (atom_map_count >=3) {
245 TR.Debug <<
"Jump residue: " << jump_residue_pose << std::endl;
251 TR.Debug <<
"Copy xyz of residue " << ires_pose << std::endl;
279 for (
Size iatom = 1; iatom <= sch_ids.size(); ++iatom) {
280 sch_positions.push_back(
281 pose.
residue(sch_ids[iatom].rsd()).build_atom_ideal( sch_ids[iatom].atomno(), pose.
conformation() )
303 bool overlapped =
false;
311 if (xyz_iatom.distance_squared(xyz_jatom) < 1e-4) {
316 if (overlapped)
break;
337 return "InsertChunkMover";