38 #include <basic/Tracer.hh>
42 #include <ObjexxFCL/FArray1D.hh>
43 #include <ObjexxFCL/FArray2D.hh>
44 #include <ObjexxFCL/StaticIndexRange.hh>
49 #include <numeric/random/random.hh>
50 #include <utility/exit.hh>
52 #include <utility/vector1.hh>
56 namespace ObjexxFCL {
namespace fmt { } }
using namespace ObjexxFCL::fmt;
65 static basic::Tracer
tr(
"protocols.jumping");
66 static numeric::random::RandomGenerator
RG(92384);
71 using namespace ObjexxFCL;
74 secondary_structure_( ss )
89 : ReferenceCount( other )
130 float strand1,strand2,strand_ceiling,k_strand;
138 strand_ceiling = std::max(0.2f, std::min(strand1,strand2));
140 int const i = std::min(pos1,pos2);
141 int const j = std::max(pos1,pos2);
145 }
else if ( j-i < 2 ) {
149 for (
int k = i+1, ke = j-1; k <= ke; ++k ) {
151 loop = 1.0 - k_strand;
152 if ( loop < 0.3 ) loop = 0.0;
182 utility::io::izstream data( fn );
184 tr.Fatal <<
"can't secondary structure file!!!" << fn << std::endl;
186 utility::exit( EXIT_FAILURE, __FILE__, __LINE__);
190 getline( data, line);
191 std::istringstream line_stream( line );
195 line_stream >> dummy >> dummy >> dummy >> dummy >>
total_residue_;
198 loop_fraction_.dimension( total_residue_, 0.0 );
199 strand_fraction_.dimension( total_residue_, 0.0 );
201 while ( getline( data, line ) ) {
202 std::istringstream line_stream( line );
206 line_stream >> pos >> ef >> hf >> lf;
208 if ( line_stream.fail() ) {
209 std::cout <<
"parse error: " << line << std::endl;
213 loop_fraction_( pos ) = lf;
214 strand_fraction_( pos ) = ef;
215 if ( std::abs( helix_fraction( pos ) - hf ) > 0.01 ) {
216 tr.Warning <<
"inconsistency in secondary structure file at position "
217 << pos <<
" H ( read ) = " << hf <<
" 1.0-L-E ( expected ) " << helix_fraction( pos ) << std::endl;
228 out << (
eval(i,j) ?
"E" :
"." );