Rosetta 3.5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PseudocontactShiftTensor.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  //////////////////////////////////////////////
11  /// @begin
12  ///
13  /// @brief Hold chi- tensor information for the Pseudocontact Shift calculation
14  ///
15  /// @detailed
16  ///
17  /// @param
18  ///
19  /// @return
20  ///
21  /// @remarks
22  ///
23  /// @references JBNMR 2008 41:179-189 schmitz et all will explains the tensor convention used
24  ///
25  /// @authorsv Christophe Schmitz
26  ///
27  /// @last_modified June 2009
28  ////////////////////////////////////////////////
29 
30 
31 // Unit headers
33 
34 // Package headers
35 
36 // Project headers
37 
38 // Utility headers
39 #include <utility/exit.hh>
40 
41 // Numeric headers
42 
43 // Objexx headers
44 
45 // C++ headers
46 #include <iostream>
47 
48 
49 namespace protocols{
50 namespace scoring{
51 namespace methods{
52 namespace pcs{
53 
55  utility_exit_with_message( "You shouldn't call the empty constructor for PCS_tensor" );
56 }
57 
59 }
60 
62  a_ = other.a_;
63  b_ = other.b_;
64  g_ = other.g_;
65  ax_ = other.ax_;
66  rh_ = other.rh_;
67  chi_xx_ = other.chi_xx_;
68  chi_yy_ = other.chi_yy_;
69  chi_xy_ = other.chi_xy_;
70  chi_xz_ = other.chi_xz_;
71  chi_yz_ = other.chi_yz_;
72  label_ = other.label_;
73 }
74 
75 PCS_tensor &
77 
78  if ( this != &other ) {
79  a_ = other.a_;
80  b_ = other.b_;
81  g_ = other.g_;
82  ax_ = other.ax_;
83  rh_ = other.rh_;
84  chi_xx_ = other.chi_xx_;
85  chi_yy_ = other.chi_yy_;
86  chi_xy_ = other.chi_xy_;
87  chi_xz_ = other.chi_xz_;
88  chi_yz_ = other.chi_yz_;
89  label_ = other.label_;
90  }
91  return *this;
92 }
93 
94 ///////////////////////////////////////////////
95 /// @brief The constructeur use the chi matrix parameters (not the alpha beta gamma Ax and Rh component...)
96 ///////////////////////////////////////////////
98  core::Real const chi_xy,
99  core::Real const chi_xz,
100  core::Real const chi_yy,
101  core::Real const chi_yz,
102  std::string const label)
103 {
104  chi_xx_ = chi_xx;
105  chi_yy_ = chi_yy;
106  chi_xy_ = chi_xy;
107  chi_xz_ = chi_xz;
108  chi_yz_ = chi_yz;
109  label_ = label;
110 
111  set_abgar();
112 }
113 
114 void
116  core::Real const chi_xy,
117  core::Real const chi_xz,
118  core::Real const chi_yy,
119  core::Real const chi_yz){
120  chi_xx_ = chi_xx;
121  chi_yy_ = chi_yy;
122  chi_xy_ = chi_xy;
123  chi_xz_ = chi_xz;
124  chi_yz_ = chi_yz;
125 
126  set_abgar();
127 }
128 
129 std::ostream &
130 operator<<(std::ostream& out, const PCS_tensor &PCS_t){
131 
132  out << "The tensor parameters of " << "'" <<PCS_t.label_ << "' are:" << std::endl;
133  out << "Delta Chi xx: " << PCS_t.chi_xx_ << std::endl;
134  out << "Delta Chi yy: " << PCS_t.chi_yy_ << std::endl;
135  out << " => Delta Chi zz: " << PCS_t.delta_chi_zz() << std::endl;
136  out << "Delta Chi xy: " << PCS_t.chi_xy_ << std::endl;
137  out << "Delta Chi xz: " << PCS_t.chi_xz_ << std::endl;
138  out << "Delta Chi yz: " << PCS_t.chi_yz_ << std::endl;
139 
140  out << "In the UTR representation: " << std::endl;
141  out << "Alpha: " << PCS_t.a_ << std::endl;
142  out << "Beta: " << PCS_t.b_ << std::endl;
143  out << "Gamma: " << PCS_t.g_ << std::endl;
144  out << "Axial: " << PCS_t.ax_ << std::endl;
145  out << "Rhombic: " << PCS_t.rh_ << std::endl;
146  out << " => Xxx: " << PCS_t.delta_X_xx() << std::endl;
147  out << " => Xyy: " << PCS_t.delta_X_yy() << std::endl;
148  out << " => Xzz: " << PCS_t.delta_X_zz() << std::endl;
149 
150  return out;
151 }
152 
153 void
155  a_ = other.a_;
156  b_ = other.b_;
157  g_ = other.g_;
158  ax_ = other.ax_;
159  rh_ = other.rh_;
160 
161  chi_xx_ = other.chi_xx_;
162  chi_yy_ = other.chi_yy_;
163  chi_xy_ = other.chi_xy_;
164  chi_xz_ = other.chi_xz_;
165  chi_yz_ = other.chi_yz_;
166 
167  label_ = other.label_;
168 }
169 
170 void
172  //This has to be updated once I get the translation right
173  //from the chi parameters, i should get the a b g ax rh (abgar) parameters
174  //TODO
175  a_ = 0;
176  b_ = 0;
177  g_ = 0;
178  ax_ = 0;
179  rh_ = 0;
180 }
181 
182 std::string const &
184  return label_;
185 }
186 
189  return(rh_ / 2.0 - ax_ / 3.0);
190 }
191 
194  return(-rh_ / 2.0 - ax_ / 2.0);
195 }
196 
199  return(2.0/3.0 * ax_);
200 }
201 
204  return(-chi_xx_ -chi_yy_);
205 }
206 
207 
210  return(chi_xx_);
211 }
212 
215  return(chi_yy_);
216 }
217 
220  return(chi_xy_);
221 }
222 
225  return(chi_xz_);
226 }
227 
230  return(chi_yz_);
231 }
232 
233 }//namespace pcs
234 }//namespace methods
235 }//namespace scoring
236 }//namespace protocols