19 #include <numeric/random/random.hh>
20 #include <utility/exit.hh>
22 static numeric::random::RandomGenerator
RG(8401848);
25 namespace hybridization {
44 for (
Size i_frag_set = 1; i_frag_set<=
frag_libs_.size(); ++i_frag_set) {
46 for (
Size i_frame = 1; i_frame <=
frag_libs_[i_frag_set]->nr_frames(); ++i_frame) {
48 advance(frame_it, i_frame-1);
49 core::Size seqpos_start = (*frame_it)->start();
53 bool cross_anchor =
false;
54 for (
Size i_anchor = 1; i_anchor <=
anchor_reses_.size() && !cross_anchor; ++i_anchor) {
57 if (cross_anchor)
continue;
59 for (
Size seqpos = seqpos_start; seqpos <= seqpos_end; ++seqpos) {
60 if (seqpos < 1 || seqpos > residue_weights.size()) {
61 utility_exit_with_message(
"FATAL. Fragment library size doesn't match with the size of protein.");
63 frame_weights[i_frame] += residue_weights[seqpos];
79 advance(frame_it, insert_pos-1);
82 Size i_frag =
RG.random_range(1, nr_frags);
84 frame_it->apply( i_frag, pose );
89 return "WeightedFragmentTrialMover";