BALL 1.5.0
List of all members

#include <BALL/NMR/shiftModule.h>

Inheritance diagram for BALL::ShiftModule:
BALL::UnaryProcessor< Composite > BALL::UnaryFunctor< Composite, Processor::Result > BALL::AnisotropyShiftProcessor BALL::ClearShiftProcessor BALL::CreateSpectrumProcessor BALL::EFShiftProcessor BALL::EmpiricalHSShiftProcessor BALL::Experiment< PeakListType > BALL::HBondShiftProcessor BALL::HaighMallionShiftProcessor BALL::JohnsonBoveyShiftProcessor BALL::RandomCoilShiftProcessor BALL::ShiftModel BALL::ShiftModel1D BALL::ShiftModel2D

Public Member Functions

Constructors and Destructors
 ShiftModule ()
 
 ShiftModule (Parameters &parameters, const String &name="")
 
 ShiftModule (const ShiftModule &module)
 
virtual ~ShiftModule ()
 
virtual void clear ()
 
Assignment
const ShiftModuleoperator= (const ShiftModule &module)
 
Accessors
void setName (const String &name)
 
const StringgetName () const
 
void setParameters (Parameters &parameters)
 
const ParametersgetParameters () const
 
virtual void init ()
 
Processor related methods
virtual bool start ()
 
virtual bool finish ()
 
- Public Member Functions inherited from BALL::UnaryProcessor< Composite >
 UnaryProcessor ()
 
 UnaryProcessor (const UnaryProcessor &)
 
virtual ~UnaryProcessor ()
 
virtual Processor::Result operator() (Composite &)
 

Static Public Attributes

Enums and Constants
static const char * PROPERTY__SHIFT
 
static const char * PROPERTY__EXPERIMENTAL__SHIFT
 

Predicates

String module_name_
 
Parametersparameters_
 
bool valid_
 
bool isValid () const
 

Additional Inherited Members

- Public Types inherited from BALL::UnaryFunctor< Composite, Processor::Result >
typedef Processor::Result result_type
 
typedef Composite argument_type
 
typedef Compositeargument_reference
 
typedef const Compositeconst_argument_reference
 
typedef Compositeargument_pointer
 
typedef const Compositeconst_argument_pointer
 

Detailed Description

A single contribution of a NMR shift model. NMR shift models typically consist of a number of different contributions (e.g. ring current, ansisotopy, etc.). Each of these contributions is implemented in a ShiftModule. Several of these ShiftModules can then be combined to a complete ShiftModel . Since ShiftModules are derived from UnaryProcessor , they can be applied to arbitrary kernel data structures.

Caveat: The shifts are usually stored in a property of the corresponding atom. Applying the same processor multiply will give incorrect results, as the ShiftModules \emph{add} their shift contribution. Before applying a ShiftModule, these properties can be reset to zero by applying a ClearShiftProcessor .

Definition at line 41 of file shiftModule.h.

Constructor & Destructor Documentation

◆ ShiftModule() [1/3]

BALL::ShiftModule::ShiftModule ( )

Default Constructor

◆ ShiftModule() [2/3]

BALL::ShiftModule::ShiftModule ( Parameters parameters,
const String name = "" 
)

Detailed constructor

◆ ShiftModule() [3/3]

BALL::ShiftModule::ShiftModule ( const ShiftModule module)

Copy constructor

◆ ~ShiftModule()

virtual BALL::ShiftModule::~ShiftModule ( )
virtual

Destructor

Member Function Documentation

◆ clear()

virtual void BALL::ShiftModule::clear ( )
virtual

Clear method. Clear the name and the pointer to the parameters.

Reimplemented in BALL::ShiftModel, BALL::ShiftModel1D, and BALL::ShiftModel2D.

◆ finish()

virtual bool BALL::ShiftModule::finish ( )
virtual

◆ getName()

const String & BALL::ShiftModule::getName ( ) const

Return the module name

◆ getParameters()

const Parameters * BALL::ShiftModule::getParameters ( ) const

Return a pointer to the parameters

◆ init()

virtual void BALL::ShiftModule::init ( )
virtual

Parameter initalization. Use this method to implement the extraction and initialization of the module's parameters. init is called by ShiftModel as soon as the ShiftModule is constructed and parameters and name are assigned.

All implementations in derived classes should set the valid_ flag to true if the initialization was successful and to false otherwise.

Reimplemented in BALL::AnisotropyShiftProcessor, BALL::CreateSpectrumProcessor, BALL::EFShiftProcessor, BALL::EmpiricalHSShiftProcessor, BALL::HaighMallionShiftProcessor, BALL::HBondShiftProcessor, BALL::JohnsonBoveyShiftProcessor, and BALL::RandomCoilShiftProcessor.

◆ isValid()

bool BALL::ShiftModule::isValid ( ) const

Return the module state. The module is valid if init was executed successfully.

Returns
the module state

◆ operator=()

const ShiftModule & BALL::ShiftModule::operator= ( const ShiftModule module)

Assignment operator

◆ setName()

void BALL::ShiftModule::setName ( const String name)

Set the modules name

◆ setParameters()

void BALL::ShiftModule::setParameters ( Parameters parameters)

Set the parameters. After the assignment, the state of the module is \emph{invalid}, so it is required to run init .

Parameters
parametersthe new parameters
See also
isValid

◆ start()

virtual bool BALL::ShiftModule::start ( )
virtual

Member Data Documentation

◆ module_name_

String BALL::ShiftModule::module_name_
protected

Definition at line 165 of file shiftModule.h.

◆ parameters_

Parameters* BALL::ShiftModule::parameters_
protected

Definition at line 169 of file shiftModule.h.

◆ PROPERTY__EXPERIMENTAL__SHIFT

const char* BALL::ShiftModule::PROPERTY__EXPERIMENTAL__SHIFT
static

Definition at line 59 of file shiftModule.h.

◆ PROPERTY__SHIFT

const char* BALL::ShiftModule::PROPERTY__SHIFT
static

Named property to store the shift values. Use this string constant to access the shift values stored in the single atoms.

Example: atom.setProperty(ShiftModule::PROPERTY__SHIFT, 0.0);

Definition at line 58 of file shiftModule.h.

◆ valid_

bool BALL::ShiftModule::valid_
protected

Definition at line 175 of file shiftModule.h.