Loading...
Searching...
No Matches
shiftModel2D.h
Go to the documentation of this file.
#ifndef BALL_NMR_SHIFTMODEL2D_H
#define BALL_NMR_SHIFTMODEL2D_H
#ifndef BALL_NMR_SHIFTMODULE_H
# include <BALL/NMR/shiftModule.h>
#endif
#ifndef BALL_NMR_SPECTRUM_H
#include <BALL/NMR/spectrum.h>
#endif
#include <vector>
namespace BALL
{
class BALL_EXPORT ShiftModel2D
: public ShiftModule
{
public:
BALL_CREATE(ShiftModel2D)
enum SPECTRUM_TYPE{
HSQC_NH = 1,
HSQC_CH,
COSY_HH, // ist noch nicht implementiert!!! muesste ueber 2 Bindungslaengen spin = 1/2 pruefen....
COSY_CH, //
TOCSY_HH,
TOCSY_CH,
TOCSY_NH
};
ShiftModel2D();
ShiftModel2D(const String& filename,SPECTRUM_TYPE st, bool compute_shifts=true);
ShiftModel2D(const String& filename,SPECTRUM_TYPE st, Vector2 origin, Vector2 dimension, Vector2 spacing, bool compute_shifts=true);
ShiftModel2D(const ShiftModel2D& model);
virtual ~ShiftModel2D();
void clear();
void setFilename(const String& filename);
const String& getFilename() const
{
return parameters_.getFilename();
};
const Parameters& getParameters() const
{
return parameters_;
};
const std::vector<Peak2D>& getPeaks() const
{
return peaks_;
};
void setPeaks(std::vector<Peak2D> peaks)
{
peaks_ = peaks;
};
const Vector2& getOrigin() const
{
return origin_;
};
void setOrigin(const Vector2& origin)
{
origin_ = origin;
};
const Vector2& getDimension() const
{
return dimension_;
};
void setDimension(const Vector2& dimension)
{
dimension_ = dimension;
}
const Vector2& getSpacing() const
{
return spacing_;
};
void setSystem( System* system)
{
system_ = system;
};
const System* getSystem() const
{
return system_;
};
void operator >> (Spectrum2D& spectrum);
bool isValid() const;
bool start();
bool finish();
Processor::Result operator () (Composite& composite);
protected:
/*_ Initialize the model from the parameter file.
This method assumes that object has a valid parameter file assigned.
It sets {\tt valid_} to <b> true </b> if it could create a shift model
from the contents of the parameter file.
@throws BALL::Exception::FileNotFound
*/
bool init_();
void createPeak_(Atom* proton, Atom* atom, float peakwidth_proton, float peakwidth_atom);
/*_ The spectrum peaks
* */
std::vector<Peak2D> peaks_;
/*_ The origin of the data
*/
Vector2 origin_;
/*_ Dimension of the data
*/
Vector2 dimension_;
/*_ spacing of the data
*/
Vector2 spacing_;
/*_ spectrum type
* */
SPECTRUM_TYPE type_;
/*_ The parameters object ?? Why do we need them??? evtl durch String filename ersetzten
*/
Parameters parameters_;
/*_ pointer to the system
*/
System* system_;
/*_ The validity flag.
Set to <b> true </b> if the object was initialized correctly.
*/
bool valid_;
bool compute_shifts_;
};
std::ostream& operator << (std::ostream& os, const BALL::ShiftModel2D& shiftmodel);
} // namespace BALL
#endif // BALL_NMR_SHIFTMODEL2D_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::Atom
Definition atom.h:90
BALL::Composite
Definition composite.h:74
BALL::Parameters
Definition parameters.h:25
BALL::Processor::Result
int Result
Definition processor.h:36
BALL::ShiftModel2D
Definition shiftModel2D.h:21
BALL::ShiftModel2D::start
bool start()
BALL::ShiftModel2D::ShiftModel2D
ShiftModel2D(const ShiftModel2D &model)
BALL::ShiftModel2D::origin_
Vector2 origin_
Definition shiftModel2D.h:209
BALL::ShiftModel2D::ShiftModel2D
ShiftModel2D(const String &filename, SPECTRUM_TYPE st, Vector2 origin, Vector2 dimension, Vector2 spacing, bool compute_shifts=true)
BALL::ShiftModel2D::~ShiftModel2D
virtual ~ShiftModel2D()
BALL::ShiftModel2D::setDimension
void setDimension(const Vector2 &dimension)
Definition shiftModel2D.h:134
BALL::ShiftModel2D::setOrigin
void setOrigin(const Vector2 &origin)
Definition shiftModel2D.h:120
BALL::ShiftModel2D::parameters_
Parameters parameters_
Definition shiftModel2D.h:225
BALL::ShiftModel2D::type_
SPECTRUM_TYPE type_
Definition shiftModel2D.h:221
BALL::ShiftModel2D::finish
bool finish()
BALL::ShiftModel2D::system_
System * system_
Definition shiftModel2D.h:229
BALL::ShiftModel2D::spacing_
Vector2 spacing_
Definition shiftModel2D.h:217
BALL::ShiftModel2D::getOrigin
const Vector2 & getOrigin() const
Definition shiftModel2D.h:113
BALL::ShiftModel2D::clear
void clear()
BALL::ShiftModel2D::getFilename
const String & getFilename() const
Definition shiftModel2D.h:85
BALL::ShiftModel2D::ShiftModel2D
ShiftModel2D()
BALL::ShiftModel2D::getPeaks
const std::vector< Peak2D > & getPeaks() const
Definition shiftModel2D.h:99
BALL::ShiftModel2D::valid_
bool valid_
Definition shiftModel2D.h:234
BALL::ShiftModel2D::createPeak_
void createPeak_(Atom *proton, Atom *atom, float peakwidth_proton, float peakwidth_atom)
BALL::ShiftModel2D::setFilename
void setFilename(const String &filename)
BALL::ShiftModel2D::setSystem
void setSystem(System *system)
Definition shiftModel2D.h:149
BALL::ShiftModel2D::compute_shifts_
bool compute_shifts_
Flag for shift computation.
Definition shiftModel2D.h:237
BALL::ShiftModel2D::getDimension
const Vector2 & getDimension() const
Definition shiftModel2D.h:127
BALL::ShiftModel2D::SPECTRUM_TYPE
SPECTRUM_TYPE
Definition shiftModel2D.h:30
BALL::ShiftModel2D::HSQC_CH
@ HSQC_CH
Definition shiftModel2D.h:32
BALL::ShiftModel2D::HSQC_NH
@ HSQC_NH
Definition shiftModel2D.h:31
BALL::ShiftModel2D::TOCSY_NH
@ TOCSY_NH
Definition shiftModel2D.h:37
BALL::ShiftModel2D::COSY_CH
@ COSY_CH
Definition shiftModel2D.h:34
BALL::ShiftModel2D::COSY_HH
@ COSY_HH
Definition shiftModel2D.h:33
BALL::ShiftModel2D::TOCSY_HH
@ TOCSY_HH
Definition shiftModel2D.h:35
BALL::ShiftModel2D::TOCSY_CH
@ TOCSY_CH
Definition shiftModel2D.h:36
BALL::ShiftModel2D::getSystem
const System * getSystem() const
Definition shiftModel2D.h:156
BALL::ShiftModel2D::getSpacing
const Vector2 & getSpacing() const
Definition shiftModel2D.h:141
BALL::ShiftModel2D::init_
bool init_()
BALL::ShiftModel2D::isValid
bool isValid() const
BALL::ShiftModel2D::ShiftModel2D
ShiftModel2D(const String &filename, SPECTRUM_TYPE st, bool compute_shifts=true)
BALL::ShiftModel2D::getParameters
const Parameters & getParameters() const
Definition shiftModel2D.h:92
BALL::ShiftModel2D::dimension_
Vector2 dimension_
Definition shiftModel2D.h:213
BALL::ShiftModel2D::peaks_
std::vector< Peak2D > peaks_
Definition shiftModel2D.h:205
BALL::ShiftModel2D::setPeaks
void setPeaks(std::vector< Peak2D > peaks)
Definition shiftModel2D.h:106
BALL::ShiftModule::ShiftModule
ShiftModule()
BALL::String
Definition string.h:57
BALL::System
Definition KERNEL/system.h:40
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
BALL::operator<<
BALL_EXPORT std::ostream & operator<<(std::ostream &os, const Exception::GeneralException &e)
BALL::Vector2
TVector2< float > Vector2
Definition vector2.h:771
BALL
Definition constants.h:13
BALL::Spectrum2D
Spectrum< RegularData2D, Peak2D > Spectrum2D
Two-dimensional spectrum.
Definition spectrum.h:322
shiftModule.h
spectrum.h