Loading...
Searching...
No Matches
shiftModel1D.h
Go to the documentation of this file.
#ifndef BALL_NMR_SHIFTMODEL1D_H
#define BALL_NMR_SHIFTMODEL1D_H
#ifndef BALL_NMR_SHIFTMODULE_H
# include <BALL/NMR/shiftModule.h>
#endif
#ifndef BALL_NMR_SPECTRUM_H
#include <BALL/NMR/spectrum.h>
#endif
namespace BALL
{
class BALL_EXPORT ShiftModel1D
: public ShiftModule
{
public:
BALL_CREATE(ShiftModel1D)
enum SPECTRUM_TYPE{
H = 1,
N,
C,
H_ON_BACKBONE,
N_BACKBONE,
C_BACKBONE
};
ShiftModel1D();
ShiftModel1D(const String& filename,SPECTRUM_TYPE st, bool compute_shifts=true);
ShiftModel1D(const String& filename,SPECTRUM_TYPE st, double origin, double dimension, double spacing, bool compute_shifts=true);
ShiftModel1D(const ShiftModel1D& model);
virtual ~ShiftModel1D();
void clear();
void setFilename(const String& filename);
const String& getFilename() const
{
return parameters_.getFilename();
};
const Parameters& getParameters() const
{
return parameters_;
};
const std::vector<Peak1D>& getPeaks() const
{
return peaks_;
};
void setPeaks(std::vector<Peak1D> peaks)
{
peaks_ = peaks;
};
const double& getOrigin() const
{
return origin_;
};
void setOrigin(const double& origin)
{
origin_ = origin;
};
const double& getDimension() const
{
return dimension_;
};
void setDimension( const double& dimension)
{
dimension_ = dimension;
}
const double getSpacing() const
{
return spacing_;
};
void setSystem( System* system)
{
system_ = system;
};
const System* getSystem() const
{
return system_;
};
void operator >> (Spectrum1D& 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_();
/*_ The spectrum peaks
* */
std::vector<Peak1D> peaks_;
/*_ The origin of the data
*/
double origin_;
/*_ Dimension of the data
*/
double dimension_;
/*_ spacing of the data
*/
double 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_;
bool hasType_(Atom* a, SPECTRUM_TYPE type);
}; // end of class
} // namespace BALL
#endif // BALL_NMR_SHIFTMODEL1D_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::ShiftModel1D::valid_
bool valid_
Definition shiftModel1D.h:231
BALL::ShiftModel1D::isValid
bool isValid() const
BALL::ShiftModel1D::SPECTRUM_TYPE
SPECTRUM_TYPE
Definition shiftModel1D.h:29
BALL::ShiftModel1D::H
@ H
Definition shiftModel1D.h:30
BALL::ShiftModel1D::C_BACKBONE
@ C_BACKBONE
Definition shiftModel1D.h:35
BALL::ShiftModel1D::H_ON_BACKBONE
@ H_ON_BACKBONE
Definition shiftModel1D.h:33
BALL::ShiftModel1D::N_BACKBONE
@ N_BACKBONE
Definition shiftModel1D.h:34
BALL::ShiftModel1D::C
@ C
Definition shiftModel1D.h:32
BALL::ShiftModel1D::N
@ N
Definition shiftModel1D.h:31
BALL::ShiftModel1D::getSystem
const System * getSystem() const
Definition shiftModel1D.h:154
BALL::ShiftModel1D::spacing_
double spacing_
Definition shiftModel1D.h:214
BALL::ShiftModel1D::setSystem
void setSystem(System *system)
Definition shiftModel1D.h:147
BALL::ShiftModel1D::parameters_
Parameters parameters_
Definition shiftModel1D.h:222
BALL::ShiftModel1D::peaks_
std::vector< Peak1D > peaks_
Definition shiftModel1D.h:202
BALL::ShiftModel1D::finish
bool finish()
BALL::ShiftModel1D::ShiftModel1D
ShiftModel1D(const String &filename, SPECTRUM_TYPE st, bool compute_shifts=true)
BALL::ShiftModel1D::origin_
double origin_
Definition shiftModel1D.h:206
BALL::ShiftModel1D::setDimension
void setDimension(const double &dimension)
Definition shiftModel1D.h:133
BALL::ShiftModel1D::setOrigin
void setOrigin(const double &origin)
Definition shiftModel1D.h:119
BALL::ShiftModel1D::getSpacing
const double getSpacing() const
Definition shiftModel1D.h:140
BALL::ShiftModel1D::getDimension
const double & getDimension() const
Definition shiftModel1D.h:126
BALL::ShiftModel1D::system_
System * system_
Definition shiftModel1D.h:226
BALL::ShiftModel1D::setPeaks
void setPeaks(std::vector< Peak1D > peaks)
Definition shiftModel1D.h:104
BALL::ShiftModel1D::dimension_
double dimension_
Definition shiftModel1D.h:210
BALL::ShiftModel1D::~ShiftModel1D
virtual ~ShiftModel1D()
BALL::ShiftModel1D::ShiftModel1D
ShiftModel1D(const String &filename, SPECTRUM_TYPE st, double origin, double dimension, double spacing, bool compute_shifts=true)
BALL::ShiftModel1D::type_
SPECTRUM_TYPE type_
Definition shiftModel1D.h:218
BALL::ShiftModel1D::ShiftModel1D
ShiftModel1D()
BALL::ShiftModel1D::setFilename
void setFilename(const String &filename)
BALL::ShiftModel1D::start
bool start()
BALL::ShiftModel1D::getOrigin
const double & getOrigin() const
Definition shiftModel1D.h:112
BALL::ShiftModel1D::compute_shifts_
bool compute_shifts_
Flag for shift computation.
Definition shiftModel1D.h:234
BALL::ShiftModel1D::hasType_
bool hasType_(Atom *a, SPECTRUM_TYPE type)
BALL::ShiftModel1D::init_
bool init_()
BALL::ShiftModel1D::getFilename
const String & getFilename() const
Definition shiftModel1D.h:83
BALL::ShiftModel1D::ShiftModel1D
ShiftModel1D(const ShiftModel1D &model)
BALL::ShiftModel1D::clear
void clear()
BALL::ShiftModel1D::getParameters
const Parameters & getParameters() const
Definition shiftModel1D.h:90
BALL::ShiftModel1D::getPeaks
const std::vector< Peak1D > & getPeaks() const
Definition shiftModel1D.h:97
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::Spectrum1D
Spectrum< RegularData1D, Peak1D > Spectrum1D
One-dimensional spectrum.
Definition spectrum.h:319
BALL
Definition constants.h:13
shiftModule.h
spectrum.h