21 #include <basic/Tracer.hh>
22 #include <numeric/random/random.hh>
23 #include <utility/exit.hh>
24 #include <utility/vector1.hh>
25 #include <utility/tag/Tag.hh>
51 static basic::Tracer
TR(
"protocols.nonlocal.SingleFragmentMover");
58 :
Parent(
"SingleFragmentMover") {
65 :
Parent(
"SingleFragmentMover") {
113 TR.Warning <<
"No move possible-- 0 chunks" << std::endl;
119 while (!
movable_->get_bb(insertion_pos))
120 insertion_pos = chunk->
choose();
126 TR.Debug <<
"Inserted fragment at position " << insertion_pos << std::endl;
130 return "SingleFragmentMover";
154 string fragments_file = tag->getOption<
string>(
"fragments");
155 FragSetOP fragments = FragmentIO().read_data(fragments_file);
163 string policy_type = tag->getOption<
string>(
"policy",
"uniform");
170 utility::lua::LuaObject
const & ,
171 utility::lua::LuaObject
const & ,
181 string fragments_file = def[
"fragments"].to<
string>();
182 FragSetOP fragments = FragmentIO().read_data(fragments_file);
186 movable->set_bb(
true );
187 movable->set_chi(
true );
188 movable->set_jump(
true );
194 string policy_type = def[
"policy"] ? def[
"policy"].to<
string>() :
"uniform";
207 Size position = (*i)->start();
232 if (region->increasing()) {
238 TR.Debug <<
"Added chunk: " << region->start() <<
"-" << region->stop() << std::endl;
241 TR.Debug <<
"Skipped chunk: " << region->start() <<
"-" << region->stop() <<
": no movable positions" << std::endl;
246 }
while (p < last_pos);
260 TR <<
"P(c_" << i <<
")=" <<
probs_[i] << std::endl;
273 Size n = fitnesses.size();
274 for (
Size i = 2; i <= n; ++i)
275 fitnesses[i] += fitnesses[i-1];
278 Real x = numeric::random::uniform();
281 for (
Size i = 2; i <= n; ++i) {
282 if (fitnesses[i-1] < x && x <= fitnesses[i])
291 TR.Warning <<
"Input pose is full atom (centroid required)" << std::endl;
292 TR.Warning <<
"Performing implicit conversion..." << std::endl;