BALL 1.5.0
Loading...
Searching...
No Matches
shiftModel2D.h
Go to the documentation of this file.
1#ifndef BALL_NMR_SHIFTMODEL2D_H
2#define BALL_NMR_SHIFTMODEL2D_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#include <vector>
13
14namespace BALL
15{
20 : public ShiftModule
21 {
22 public:
23
25
26
29
31 HSQC_NH = 1,
33 COSY_HH, // ist noch nicht implementiert!!! muesste ueber 2 Bindungslaengen spin = 1/2 pruefen....
37 TOCSY_NH
38 };
39
41
44
48
53 ShiftModel2D(const String& filename,SPECTRUM_TYPE st, bool compute_shifts=true);
54
59 ShiftModel2D(const String& filename,SPECTRUM_TYPE st, Vector2 origin, Vector2 dimension, Vector2 spacing, bool compute_shifts=true);
60
64
67 virtual ~ShiftModel2D();
68
71 void clear();
72
74
77
81 void setFilename(const String& filename);
82
85 const String& getFilename() const
86 {
87 return parameters_.getFilename();
88 };
89
93 {
94 return parameters_;
95 };
96
99 const std::vector<Peak2D>& getPeaks() const
100 {
101 return peaks_;
102 };
103
106 void setPeaks(std::vector<Peak2D> peaks)
107 {
108 peaks_ = peaks;
109 };
110
113 const Vector2& getOrigin() const
114 {
115 return origin_;
116 };
117
120 void setOrigin(const Vector2& origin)
121 {
122 origin_ = origin;
123 };
124
127 const Vector2& getDimension() const
128 {
129 return dimension_;
130 };
131
134 void setDimension(const Vector2& dimension)
135 {
136 dimension_ = dimension;
137 }
138
141 const Vector2& getSpacing() const
142 {
143 return spacing_;
144 };
145
146
149 void setSystem( System* system)
150 {
151 system_ = system;
152 };
153
156 const System* getSystem() const
157 {
158 return system_;
159 };
160
161
162 void operator >> (Spectrum2D& spectrum);
163
165
168
171 bool isValid() const;
172
173
175
178
181 bool start();
182
185 bool finish();
186
189 Processor::Result operator () (Composite& composite);
191
192 protected:
193
194 /*_ Initialize the model from the parameter file.
195 This method assumes that object has a valid parameter file assigned.
196 It sets {\tt valid_} to <b> true </b> if it could create a shift model
197 from the contents of the parameter file.
198 @throws BALL::Exception::FileNotFound
199 */
200 bool init_();
201
202 void createPeak_(Atom* proton, Atom* atom, float peakwidth_proton, float peakwidth_atom);
203 /*_ The spectrum peaks
204 * */
205 std::vector<Peak2D> peaks_;
206
207 /*_ The origin of the data
208 */
210
211 /*_ Dimension of the data
212 */
214
215 /*_ spacing of the data
216 */
218
219 /*_ spectrum type
220 * */
222
223 /*_ The parameters object ?? Why do we need them??? evtl durch String filename ersetzten
224 */
226
227 /*_ pointer to the system
228 */
230
231 /*_ The validity flag.
232 Set to <b> true </b> if the object was initialized correctly.
233 */
234 bool valid_;
235
238
239 };
240
241 std::ostream& operator << (std::ostream& os, const BALL::ShiftModel2D& shiftmodel);
242
243} // namespace BALL
244
245#endif // BALL_NMR_SHIFTMODEL2D_H
#define BALL_CREATE(name)
Definition create.h:62
BALL_EXPORT std::ostream & operator<<(std::ostream &os, const Exception::GeneralException &e)
ShiftModel2D(const ShiftModel2D &model)
ShiftModel2D(const String &filename, SPECTRUM_TYPE st, Vector2 origin, Vector2 dimension, Vector2 spacing, bool compute_shifts=true)
virtual ~ShiftModel2D()
void setDimension(const Vector2 &dimension)
void setOrigin(const Vector2 &origin)
Parameters parameters_
SPECTRUM_TYPE type_
const Vector2 & getOrigin() const
const String & getFilename() const
const std::vector< Peak2D > & getPeaks() const
void createPeak_(Atom *proton, Atom *atom, float peakwidth_proton, float peakwidth_atom)
void setFilename(const String &filename)
void setSystem(System *system)
bool compute_shifts_
Flag for shift computation.
const Vector2 & getDimension() const
const System * getSystem() const
const Vector2 & getSpacing() const
bool isValid() const
ShiftModel2D(const String &filename, SPECTRUM_TYPE st, bool compute_shifts=true)
const Parameters & getParameters() const
std::vector< Peak2D > peaks_
void setPeaks(std::vector< Peak2D > peaks)
#define BALL_EXPORT