BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
shiftModel1D.h
Go to the documentation of this file.
1 #ifndef BALL_NMR_SHIFTMODEL1D_H
2 #define BALL_NMR_SHIFTMODEL1D_H
3 
4 #ifndef BALL_NMR_SHIFTMODULE_H
5 # include <BALL/NMR/shiftModule.h>
6 #endif
7 
8 #ifndef BALL_NMR_SPECTRUM_H
9  #include <BALL/NMR/spectrum.h>
10 #endif
11 
12 
13 namespace BALL
14 {
19  : public ShiftModule
20  {
21 
22  public:
24 
25 
28 
30  H = 1,
31  N,
32  C,
35  C_BACKBONE
36  };
37 
39 
42 
45  ShiftModel1D();
46 
51  ShiftModel1D(const String& filename,SPECTRUM_TYPE st, bool compute_shifts=true);
52 
57  ShiftModel1D(const String& filename,SPECTRUM_TYPE st, double origin, double dimension, double spacing, bool compute_shifts=true);
58 
61  ShiftModel1D(const ShiftModel1D& model);
62 
65  virtual ~ShiftModel1D();
66 
69  void clear();
70 
72 
75 
78  void setFilename(const String& filename)
80 
83  const String& getFilename() const
84  {
85  return parameters_.getFilename();
86  };
87 
90  const Parameters& getParameters() const
91  {
92  return parameters_;
93  };
94 
97  const std::vector<Peak1D>& getPeaks() const
98  {
99  return peaks_;
100  };
101 
104  void setPeaks(std::vector<Peak1D> peaks)
105  {
106  peaks_ = peaks;
107  };
108 
109 
112  const double& getOrigin() const
113  {
114  return origin_;
115  };
116 
119  void setOrigin(const double& origin)
120  {
121  origin_ = origin;
122  };
123 
126  const double& getDimension() const
127  {
128  return dimension_;
129  };
130 
133  void setDimension( const double& dimension)
134  {
135  dimension_ = dimension;
136  }
137 
140  const double getSpacing() const
141  {
142  return spacing_;
143  };
144 
147  void setSystem( System* system)
148  {
149  system_ = system;
150  };
151 
154  const System* getSystem() const
155  {
156  return system_;
157  };
158 
159 
160  void operator >> (Spectrum1D& spectrum);
161 
163 
166 
169  bool isValid() const;
170 
172 
175 
178  bool start();
179 
182  bool finish();
183 
186  Processor::Result operator () (Composite& composite);
188 
189  protected:
190 
191 
192  /*_ Initialize the model from the parameter file.
193  This method assumes that object has a valid parameter file assigned.
194  It sets {\tt valid_} to <b> true </b> if it could create a shift model
195  from the contents of the parameter file.
196  */
197  bool init_()
198  throw(Exception::FileNotFound);
199 
200  /*_ The spectrum peaks
201  * */
202  std::vector<Peak1D> peaks_;
203 
204  /*_ The origin of the data
205  */
206  double origin_;
207 
208  /*_ Dimension of the data
209  */
210  double dimension_;
211 
212  /*_ spacing of the data
213  */
214  double spacing_;
215 
216  /*_ spectrum type
217  * */
219 
220  /*_ The parameters object ?? Why do we need them??? evtl durch String filename ersetzten
221  */
222  Parameters parameters_;
223 
224  /*_ pointer to the system
225  */
226  System* system_;
227 
228  /*_ The validity flag.
229  Set to <b> true </b> if the object was initialized correctly.
230  */
231  bool valid_;
232 
234  bool compute_shifts_;
235 
236  bool hasType_(Atom* a, SPECTRUM_TYPE type);
237 
238  }; // end of class
239 
240 } // namespace BALL
241 
242 #endif // BALL_NMR_SHIFTMODEL1D_H
const double & getOrigin() const
Definition: shiftModel1D.h:112
#define BALL_CREATE(name)
Definition: create.h:62
void setPeaks(std::vector< Peak1D > peaks)
Definition: shiftModel1D.h:104
const double getSpacing() const
Definition: shiftModel1D.h:140
const System * getSystem() const
Definition: shiftModel1D.h:154
std::istream & operator>>(std::istream &is, TRegularData1D< ValueType > &grid)
Input operator.
void setOrigin(const double &origin)
Definition: shiftModel1D.h:119
const double & getDimension() const
Definition: shiftModel1D.h:126
const String & getFilename() const
Definition: shiftModel1D.h:83
void setSystem(System *system)
Definition: shiftModel1D.h:147
const Parameters & getParameters() const
Definition: shiftModel1D.h:90
#define BALL_EXPORT
Definition: COMMON/global.h:50
void setDimension(const double &dimension)
Definition: shiftModel1D.h:133
const std::vector< Peak1D > & getPeaks() const
Definition: shiftModel1D.h:97