Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
TorsionFeature.cc
Go to the documentation of this file.
1 // -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
2 // vi: set ts=2 noet:
3 //
4 // (c) Copyright Rosetta Commons Member Institutions.
5 // (c) This file is part of the Rosetta software suite and is made available under license.
6 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
7 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
8 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
9 
10 /// @file protocols/comparative_modeling/TorsionFeature.cc
11 /// @brief
12 /// @author James Thompson
13 
14 #include <core/types.hh>
15 #include <core/pose/Pose.hh>
16 // AUTO-REMOVED #include <utility/vector1.hh>
17 
21 
23 
24 #include <utility/vector1.hh>
25 
26 
27 namespace protocols {
28 namespace comparative_modeling {
29 namespace features {
30 
32  torsion_bin_( INVALID )
33 {}
34 
37  torsion_bin_( other.torsion_bin() )
38 {}
39 
41  torsion_bin_( bin )
42 {}
43 
46  using core::Real;
47  using utility::vector1;
49 
50  for ( Size ii = 1; ii <= pose.total_residue(); ++ii ) {
51  vector1< Real > const & torsions( pose.residue(ii).mainchain_torsions() );
52  Real phi = torsions[1];
53  Real psi = torsions[2];
54  Real omega = torsions[3];
55  features.push_back(
56  new TorsionFeature( torsion2big_bin( phi, psi, omega ) )
57  );
58  }
59 
60  return features;
61 }
62 
64  return "torsion_bin";
65 }
66 
68  TorsionFeatureOP copy( new TorsionFeature( *this ) );
69  return copy;
70 }
71 
73  return torsion_bin_;
74 }
75 
78  core::Real const phi,
79  core::Real const psi,
80  core::Real const omega
81 )
82 {
83  if ( std::abs( omega ) < 90.0 ) {
84  return O; // cis-omega
85  } else if ( phi >= 0.0 ) {
86  if ( -100.0 < psi && psi <= 100.0 ) {
87  return G; // alpha-L
88  } else {
89  return E; // E
90  }
91  } else {
92  if ( -125.0 < psi && psi <= 50.0 ) {
93  return A; // helical
94  } else {
95  return B; // extended
96  }
97  }
98  return X;
99 }
100 
101 } // features
102 } // comparative_modeling
103 } // protocols