Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ICoorOrbitalData.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 /// @begin AtomTypeSet
11 ///
12 /// @brief
13 /// A class for reading in the orbital type properties
14 ///
15 /// @detailed
16 /// This class contains the ORBITALS INTERNAL_ICOOR data that is read in from residue_io.cc. Actually,
17 /// the data is set when residue_io.cc calls the command from residuetype.cc set_orbital_icoor. The data
18 /// is set and chills out in memory until needed. The actual xyz coordinates are not stored at this point.
19 /// xyz coordinates are constructed when conformation/Residue.hh asks for the build function in this class.
20 /// At that point, the coordinates are built and returned.
21 ///
22 /// But wait, you say, why do you store the names of the atoms instead of the index of the atoms!? Well, the
23 /// problem occurs when residuetype reorders the indices of the atoms. When this occurrs, the indices for the icoor
24 /// are not reordered here. Another problem ocurs because orbital indices are not reordered in this process because
25 /// orbital indices are seperate from the atom indices. Regardless, when you build the xyz coords, this step is transparent
26 /// because the function orbital_xyz() in residue.hh takes care of this conversion of indice to string.
27 ///
28 /// @note NOTE!!!!!!!!!!! The internal coordinates cannot contain an orbital as the stub1, stub2, or stub3 atom.
29 /// This is because the xyz coordinates are not updated when the conformation changes. The stub1, stub2, stub2 atoms
30 /// must be actual atoms and not orbitals!!!!! (design feature or flaw? you decide)
31 ///
32 ///
33 /// @authors
34 /// Steven Combs
35 ///
36 ///
37 /// @last_modified December 12 2010
38 /////////////////////////////////////////////////////////////////////////
39 
40 
41 
43 
44 
47 // AUTO-REMOVED #include <core/conformation/Conformation.hh>
48 // AUTO-REMOVED #include <core/id/AtomID.hh>
49 
50 // Utility headers
51 #include <utility/exit.hh>
52 #include <numeric/xyz.functions.hh>
53 #include <core/kinematics/Jump.hh>
54 #include <utility/vector1.hh>
55 
56 //Auto Headers
57 namespace core{
58 namespace chemical{
59 namespace orbitals{
60 
61 /// @brief construct ICoorOrbitalData.
63  phi_(0.0),
64  theta_(0.0),
65  distance_(0.0),
66  stub1_(""),
67  stub2_(""),
68  stub3_("")
69 
70 {}
71 
72 /// @brief construct ICoorOrbitalData.
74  Real phi,
75  Real theta,
76  Real distance,
77  std::string stub1,
78  std::string stub2,
79  std::string stub3
80 
81 ):
82 phi_(phi),
83 theta_(theta),
84 distance_(distance),
85 stub1_(stub1),
86 stub2_(stub2),
87 stub3_(stub3)
88 {}
89 
90 
91 //Testing size orbitals
93  Real phi,
94  Real theta,
95  Real distance,
96  Size stub1,
97  Size stub2,
98  Size stub3
99 ):
100 phi_(phi),
101 theta_(theta),
102 distance_(distance),
103 s_stub1_(stub1),
104 s_stub2_(stub2),
105 s_stub3_(stub3)
106 {
107 
108 }
109 
110 
111 
112 ///@brief return the phi for a given orbital
114 {
115  return phi_;
116 }
117 
118 ///@brief return the theta for a given orbital
120 {
121  return theta_;
122 }
123 
124 ///@brief return the distance for a given orbital
126 {
127  return distance_;
128 }
129 
130 ///@brief return the stub1 for a given orbital
132 {
133  return stub1_;
134 }
135 
136 ///@brief return the stub2 for a given orbital
138 {
139  return stub2_;
140 }
141 
142 ///@brief return the stub3 for a given orbital
144 {
145  return stub3_;
146 }
147 
148 
149 
150 
151 
152 ///@brief build the xyz coordinates for an orbital based upon the stub1, stub2, stub3 xyz coordinates.
153 /// @note NOTE!!!!!!!!!!! The internal coordinates cannot contain an orbital as the stub1, stub2, or stub3 atom.
154 /// This is because the xyz coordinates are not updated when the conformation changes. The stub1, stub2, stub2 atoms
155 /// must be actual atoms and not orbitals!!!!11111!!!!!!!11111!(design feature or flaw? you decide)
156 Vector
158  Vector stub1_xyz,
159  Vector stub2_xyz,
160  Vector stub3_xyz) const
161 {
162  assert( kinematics::Stub( stub1_xyz,
163  stub2_xyz,
164  stub3_xyz).is_orthogonal( 0.001 ) );
165 
166  return kinematics::Stub(stub1_xyz, stub2_xyz, stub3_xyz).spherical(phi_, theta_, distance_);
167 }
168 
169 
170 
171 
172 
173 }
174 }
175 }