Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SSFeature.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
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 
22 
23 #include <utility/vector1.hh>
24 
25 
26 namespace protocols {
27 namespace comparative_modeling {
28 namespace features {
29 
31  ss_type_( INVALID_SS )
32 {}
33 
34 SSFeature::SSFeature( SSFeature const & other ) :
36  ss_type_( other.ss_type() )
37 {}
38 
40  ss_type_( ss )
41 {}
42 
45  using core::Real;
46  using std::string;
47  using utility::vector1;
48 
49  vector1< SSFeatureOP > features;
50 
51  //protocols::jumping::assign_ss_dssp( pose );
52  string const & secstruct( pose.secstruct() );
53  for ( Size ii = 1; ii <= secstruct.size(); ++ii ) {
54  features.push_back(
55  new SSFeature( char2ss_type(secstruct.at(ii)) )
56  );
57  }
58 
59  return features;
60 }
61 
63  return "ss";
64 }
65 
67  SSFeatureOP copy( new SSFeature( *this ) );
68  return copy;
69 }
70 
72  return ss_type_;
73 }
74 
75 SSType SSFeature::char2ss_type( char const ss ) {
76  if ( ss == 'H' ) {
77  return H_SS;
78  } else if ( ss == 'E' ) {
79  return E_SS;
80  } else if ( ss == 'L' ) {
81  return L_SS;
82  }
83 
84  return INVALID_SS;
85 }
86 
87 } // features
88 } // comparative_modeling
89 } // protocols