26 #include <basic/prof.hh>
35 #include <utility/vector1.fwd.hh>
36 #include <utility/pointer/ReferenceCount.hh>
38 #include <numeric/random/random.hh>
44 #include <utility/vector1.hh>
48 namespace simple_moves {
53 static numeric::random::RandomGenerator
RG(345);
84 return "SmoothFragmentMover";
98 PROF_START( basic::TEST4 );
101 typedef std::pair< Size, Size > FragID;
103 goodfrag.reserve( frames.size()*200 );
106 FragID minfrag ( 0 , 0 );
108 for (
Size fnr = 1; fnr <= frames.size(); fnr++ ) {
112 cost_->score( frame, pose, scores );
115 Real s = scores[ j ];
119 minfrag = FragID( fnr, j );
121 if ( s < cost_->cutoff() ) {
122 goodfrag.push_back( FragID( fnr, j ) );
129 PROF_STOP( basic::TEST4 );
131 if ( goodfrag.size()< 1 ) {
132 if ( costmin > 12. )
return false;
133 frame_num = minfrag.first;
134 frag_num = minfrag.second;
136 FragID choice = goodfrag[
static_cast< int >(
RG.uniform() * goodfrag.size() )+1 ];
137 frame_num = choice.first;
138 frag_num = choice.second;