Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DNAParameters.hh
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 // This file is part of the Rosetta software suite and is made available under license.
5 // The Rosetta software is developed by the contributing members of the Rosetta Commons consortium.
6 // (C) 199x-2009 Rosetta Commons participating institutions and developers.
7 // For more information, see http://www.rosettacommons.org/.
8 
9 /// @file src/protocols/dna/DNAParameters.hh
10 /// @brief A class to query for base-paired partners as well as base pair and base step parameters
11 /// @author Jim Havranek
12 
13 #ifndef INCLUDED_protocols_dna_DNAParameters
14 #define INCLUDED_protocols_dna_DNAParameters
15 
17 
18 #include <core/types.hh>
19 #include <core/pose/Pose.fwd.hh>
21 
22 #include <utility/vector1.hh>
23 #include <utility/pointer/ReferenceCount.hh>
24 
25 #include <iosfwd>
26 #include <map>
27 
28 namespace protocols {
29 namespace dna {
30 
31 class DNABase {
32 public: // constructor
33  DNABase() : alpha_( 0.0 ), beta_( 0.0 ), gamma_( 0.0 ), delta_( 0.0 ), epsilon_( 0.0 ), zeta_( 0.0 ),
34  chi_( 0.0 ), pseudorotation_( 0.0 ), amplitude_( 0.0 ) {}
35  // These next two use the formats from core::scoring::dna, which are ultimately used to generate the data
36  DNABase( core::conformation::Residue const & rsd );
37 
38 public:
39  // const getter methods
40  core::Real alpha() const { return alpha_; }
41  core::Real beta() const { return beta_; }
42  core::Real gamma() const { return gamma_; }
43  core::Real delta() const { return delta_; }
44  core::Real epsilon() const { return epsilon_; }
45  core::Real zeta() const { return zeta_; }
46  core::Real chi() const { return chi_; }
48  core::Real amplitude() const { return amplitude_; }
49  // setter methods
50  void alpha( core::Real in_value ) { alpha_ = in_value; }
51  void beta( core::Real in_value ) { beta_ = in_value; }
52  void gamma( core::Real in_value ) { gamma_ = in_value; }
53  void delta( core::Real in_value ) { delta_ = in_value; }
54  void epsilon( core::Real in_value ) { epsilon_ = in_value; }
55  void zeta( core::Real in_value ) { zeta_ = in_value; }
56  void chi( core::Real in_value ) { chi_ = in_value; }
57  void pseudorotation( core::Real in_value ) { pseudorotation_ = in_value; }
58  void amplitude( core::Real in_value ) { amplitude_ = in_value; }
59 
60 private:
70 };
71 
72 class DNABasepair {
73 public: // constructor
74  DNABasepair() : stretch_( 0.0 ), stagger_( 0.0 ), shear_( 0.0 ), propeller_( 0.0 ), opening_( 0.0 ), buckle_( 0.0 ) {}
75  // These next two use the formats from core::scoring::dna, which are ultimately used to generate the data
76  DNABasepair( utility::vector1<core::Real> const & init_values );
78 
79 public:
80  // const getter methods
81  core::Real stretch() const { return stretch_; }
82  core::Real stagger() const { return stagger_; }
83  core::Real shear() const { return shear_; }
84  core::Real propeller() const { return propeller_; }
85  core::Real opening() const { return opening_; }
86  core::Real buckle() const { return buckle_; }
87  // setter methods
88  void stretch( core::Real in_value ) { stretch_ = in_value; }
89  void stagger( core::Real in_value ) { stagger_ = in_value; }
90  void shear( core::Real in_value ) { shear_ = in_value; }
91  void propeller( core::Real in_value ) { propeller_ = in_value; }
92  void opening( core::Real in_value ) { opening_ = in_value; }
93  void buckle( core::Real in_value ) { buckle_ = in_value; }
94 
95 private:
102 };
103 
104 
105 class DNABasestep {
106 public: // constructor
107  DNABasestep() : slide_( 0.0 ), shift_( 0.0 ), rise_( 0.0 ), roll_( 0.0 ), twist_( 0.0 ), tilt_( 0.0 ) {}
108  // These next two use the formats from core::scoring::dna, which are ultimately used to generate the data
109  DNABasestep( utility::vector1<core::Real> const & init_values );
111  core::conformation::Residue const & rsd1_next, core::conformation::Residue const & rsd2_prev );
112 
113 public:
114  // const getter methods
115  core::Real slide() const { return slide_; }
116  core::Real shift() const { return shift_; }
117  core::Real rise() const { return rise_; }
118  core::Real roll() const { return roll_; }
119  core::Real twist() const { return twist_; }
120  core::Real tilt() const { return tilt_; }
121  // setter methods
122  void slide( core::Real in_value ) { slide_ = in_value; }
123  void shift( core::Real in_value ) { shift_ = in_value; }
124  void rise( core::Real in_value ) { rise_ = in_value; }
125  void roll( core::Real in_value ) { roll_ = in_value; }
126  void twist( core::Real in_value ) { twist_ = in_value; }
127  void tilt( core::Real in_value ) { tilt_ = in_value; }
128 
129 private:
136 };
137 
138 
140 public: // constructors
142  DNAParameters( core::pose::Pose const & pose ) { calculate( pose ); }
144 
145  core::Size number_of_bases() { return bases_.size(); }
148  core::Size random_basepair() const;
149  core::Size random_basestep() const;
150 
151  core::Size const & nth_dna_base( core::Size index ) const { return dna_base_positions_[ index ]; }
152  DNABase const & base( core::Size resid ) const;
153  DNABasepair const & basepair( core::Size resid ) const;
154  DNABasestep const & basestep( core::Size resid ) const;
155 
156  std::map< core::Size, DNABase >::const_iterator bases_begin() const { return bases_.begin(); }
157  std::map< core::Size, DNABase >::const_iterator bases_end() const { return bases_.end(); }
158  std::map< core::Size, DNABasepair >::const_iterator basepairs_begin() const { return basepairs_.begin(); }
159  std::map< core::Size, DNABasepair >::const_iterator basepairs_end() const { return basepairs_.end(); }
160  std::map< core::Size, DNABasestep >::const_iterator basesteps_begin() const { return basesteps_.begin(); }
161  std::map< core::Size, DNABasestep >::const_iterator basesteps_end() const { return basesteps_.end(); }
162 
163  core::Size find_partner( core::Size resid ) const;
164  bool is_base_paired( core::Size resid ) const;
165  bool valid_basestep_start( core::Size resid ) const;
166 
167  void calculate( core::pose::Pose const & pose );
168 
169 private:
170  // vectors to hold the actual data
171  std::map< core::Size, DNABasepair > basepairs_;
172  std::map< core::Size, DNABasestep > basesteps_;
173  std::map< core::Size, DNABase > bases_;
178 
179 };
180 
181 } // namespace dna
182 } // namespace protocols
183 
184 #endif