Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HelicalFragment.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 /rosetta/rosetta_source/src/protocols/features/helixAssembly/HelicalFragment.cc
11 ///
12 /// @brief
13 
14 /// @author Tim jacobs
15 
16 //Unit Headers
18 
19 //Core
21 
22 //Utility
23 #include <utility/string_util.hh>
24 
25 //Numeric
26 #include <numeric/xyzVector.hh>
27 #include <numeric/HomogeneousTransform.hh>
28 
29 //C++
30 #include <cmath>
31 #include <iostream>
32 
33 namespace protocols {
34 namespace features {
35 namespace helixAssembly {
36 
38 start_(start),
39 end_(end)
40 {}
41 
43 
45 core::Size HelicalFragment::seq_start() const { return std::min(start_, end_); }
46 
48 core::Size HelicalFragment::seq_end() const { return std::max(start_, end_); }
49 bool HelicalFragment::reversed() const { return start_ > end_; }
50 
53 {
54  this->com_ = com;
55 }
56 
59 {
61 }
62 
65 {
66  this->sasa_ = sasa;
67 }
68 
70 {
71  return (end_ > start_) ? end_-start_+1 : start_-end_+1;
72 }
73 
74 std::ostream &
75 operator <<( std::ostream & os, HelicalFragment const & t )
76 {
77  os << "(" << t.start() << ", " << t.end() << ")";
78  return os;
79 }
80 
81 } //namespace helixAssembly
82 } //namespace features
83 } //namespace protocols
84