Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BranchCoef2.hh
Go to the documentation of this file.
1 // (c) Copyright Rosetta Commons Member Institutions.
2 // (c) This file is part of the Rosetta software suite and is made available under license.
3 // (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
4 // (c) For more information, see http://www.rosettacommons.org. Questions about this can be
5 // (c) addressed to University of Washington UW TechTransfer, email: license@u.washington.edu.
6 
7 /// @file protocols/branch_angle/BranchCoef2.hh
8 /// @brief definition/implementation of BranchCoef2 class and methods
9 /// @author Colin A. Smith (colin.smith@ucsf.edu)
10 
11 
12 #ifndef INCLUDED_protocols_branch_angle_BranchCoef2_hh
13 #define INCLUDED_protocols_branch_angle_BranchCoef2_hh
14 
16 
17 // Protocols Headers
19 
20 // Core Headers
21 #include <core/types.hh>
22 
23 namespace protocols {
24 namespace branch_angle {
25 
26 /// @brief
27 /// a class to store coefficients for branching angle optimization around a
28 /// single atom atom with three bonded neighbors
29 class BranchCoef2 : public BranchCoef1 {
30 
31 public:
32 
49  ):
51  overall_Ktheta,
52  overall_theta0,
53  overall_energy0,
54  b1_torsion_offset_A,
55  b1_torsion_offset_B,
56  b1_torsion_offset_C,
57  b1_bond_angle_A,
58  b1_bond_angle_B,
59  b1_bond_angle_C
60  ),
61  b2_torsion_offset_A_(b2_torsion_offset_A),
62  b2_torsion_offset_B_(b2_torsion_offset_B),
63  b2_torsion_offset_C_(b2_torsion_offset_C),
64  b2_bond_angle_A_(b2_bond_angle_A),
65  b2_bond_angle_B_(b2_bond_angle_B),
66  b2_bond_angle_C_(b2_bond_angle_C)
67  {}
68 
69  /// @brief get branching atom 2 torsion offset A coefficient (angle^0)
72  {
73  return b2_torsion_offset_A_;
74  }
75 
76  /// @brief get branching atom 2 torsion offset B coefficient (angle^1)
79  {
80  return b2_torsion_offset_B_;
81  }
82 
83  /// @brief get branching atom 2 torsion offset C coefficient (angle^2)
86  {
87  return b2_torsion_offset_C_;
88  }
89 
90  /// @brief get branching atom 2 bond angle A coefficient (angle^0)
93  {
94  return b2_bond_angle_A_;
95  }
96 
97  /// @brief get branching atom 2 bond angle B coefficient (angle^1)
100  {
101  return b2_bond_angle_B_;
102  }
103 
104  /// @brief get branching atom 2 bond angle C coefficient (angle^2)
105  core::Real
107  {
108  return b2_bond_angle_C_;
109  }
110 
111  /// @brief calculate single branching angles for a main chain bond angle
112  void
114  core::Real const m2_bond_angle,
115  core::Real & b1_torsion_offset,
116  core::Real & b1_bond_angle,
117  core::Real & b2_torsion_offset,
118  core::Real & b2_bond_angle
119  ) const
120  {
121  evaluate(m2_bond_angle, b1_torsion_offset, b1_bond_angle);
122 
123  b2_torsion_offset = b2_torsion_offset_A_ +
124  m2_bond_angle * (b2_torsion_offset_B_ + m2_bond_angle * b2_torsion_offset_C_);
125  b2_bond_angle = b2_bond_angle_A_ + m2_bond_angle * (b2_bond_angle_B_ + m2_bond_angle * b2_bond_angle_C_);
126  }
127 
128 private:
129 
136 
137  using BranchCoef1::evaluate;
138 };
139 
140 } // branch_angle
141 } // protocols
142 
143 #endif