BALL 1.5.0
Loading...
Searching...
No Matches
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
6#endif
7
8#ifndef BALL_NMR_SPECTRUM_H
9 #include <BALL/NMR/spectrum.h>
10#endif
11
12
13namespace BALL
14{
19 : public ShiftModule
20 {
21
22 public:
24
25
28
30 H = 1,
35 C_BACKBONE
36 };
37
39
42
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
62
65 virtual ~ShiftModel1D();
66
69 void clear();
70
72
75
79 void setFilename(const String& filename);
80
83 const String& getFilename() const
84 {
85 return parameters_.getFilename();
86 };
87
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 @throws BALL::Exception::FileNotFound
197 */
198 bool init_();
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 */
223
224 /*_ pointer to the system
225 */
227
228 /*_ The validity flag.
229 Set to <b> true </b> if the object was initialized correctly.
230 */
231 bool valid_;
232
235
237
238 }; // end of class
239
240} // namespace BALL
241
242#endif // BALL_NMR_SHIFTMODEL1D_H
#define BALL_CREATE(name)
Definition create.h:62
Spectrum< RegularData1D, Peak1D > Spectrum1D
One-dimensional spectrum.
Definition spectrum.h:319
bool isValid() const
const System * getSystem() const
void setSystem(System *system)
Parameters parameters_
std::vector< Peak1D > peaks_
ShiftModel1D(const String &filename, SPECTRUM_TYPE st, bool compute_shifts=true)
void setDimension(const double &dimension)
void setOrigin(const double &origin)
const double getSpacing() const
const double & getDimension() const
void setPeaks(std::vector< Peak1D > peaks)
virtual ~ShiftModel1D()
ShiftModel1D(const String &filename, SPECTRUM_TYPE st, double origin, double dimension, double spacing, bool compute_shifts=true)
SPECTRUM_TYPE type_
void setFilename(const String &filename)
const double & getOrigin() const
bool compute_shifts_
Flag for shift computation.
bool hasType_(Atom *a, SPECTRUM_TYPE type)
const String & getFilename() const
ShiftModel1D(const ShiftModel1D &model)
const Parameters & getParameters() const
const std::vector< Peak1D > & getPeaks() const
#define BALL_EXPORT