/usr/include/BALL/NMR/shiftModule.h is in libball1.4-dev 1.4.1+20111206-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | // -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: shiftModule.h,v 1.18 2005/12/23 17:01:56 amoll Exp $
//
#ifndef BALL_NMR_SHIFTMODULE_H
#define BALL_NMR_SHIFTMODULE_H
#ifndef BALL_KERNEL_SYSTEM_H
# include<BALL/KERNEL/system.h>
#endif
#ifndef BALL_DATATYPE_STRING_H
# include<BALL/DATATYPE/string.h>
#endif
#ifndef BALL_CONCEPT_PROCESSOR_H
# include<BALL/CONCEPT/processor.h>
#endif
#ifndef BALL_FORMAT_PARAMETERS_H
# include<BALL/FORMAT/parameters.h>
#endif
namespace BALL
{
/** 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 \link ShiftModel ShiftModel \endlink .
Since ShiftModules are derived from \link UnaryProcessor UnaryProcessor \endlink , they can be applied
to arbitrary kernel data structures. \par
<b>Caveat:</b> 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 \link ClearShiftProcessor ClearShiftProcessor \endlink . \par
\ingroup ShiftModel
*/
class BALL_EXPORT ShiftModule
: public UnaryProcessor<Composite>
{
public:
BALL_CREATE(ShiftModule)
/** @name Enums and Constants
*/
//@{
/** Named property to store the shift values.
Use this string constant to access the shift values stored in the single
atoms. \par
<b>Example:</b>
<tt>atom.setProperty(ShiftModule::PROPERTY__SHIFT, 0.0);</tt>
*/
static const char* PROPERTY__SHIFT;
static const char* PROPERTY__EXPERIMENTAL__SHIFT;
//@}
/** @name Constructors and Destructors
*/
//@{
/** Default Constructor
*/
ShiftModule();
/** Detailed constructor
*/
ShiftModule(Parameters& parameters, const String& name = "");
/** Copy constructor
*/
ShiftModule(const ShiftModule& module);
/** Destructor
*/
virtual ~ShiftModule();
/** Clear method.
Clear the name and the pointer to the parameters.
*/
virtual void clear();
//@}
/** @name Assignment
*/
//@{
/** Assignment operator
*/
const ShiftModule& operator = (const ShiftModule& module);
//@}
/** @name Accessors
*/
//@{
/** Set the modules name
*/
void setName(const String& name);
/** Return the module name
*/
const String& getName() const;
/** Set the parameters.
After the assignment, the state of the module is \emph{invalid},
so it is required to run \link init init \endlink .
@param parameters the new parameters
@see isValid
*/
void setParameters(Parameters& parameters);
/** Return a pointer to the parameters
*/
const Parameters* getParameters() const;
/** Parameter initalization.
Use this method to implement the extraction and initialization of
the module's parameters.
\link init init \endlink is called by \link ShiftModel ShiftModel \endlink as soon as the \link ShiftModule ShiftModule \endlink
is constructed and parameters and name are assigned. \par
All implementations in derived classes should set the \link valid_ valid_ \endlink flag
to <b>true</b> if the initialization was successful and to <b>false</b> otherwise.
*/
virtual void init();
//@}
/** @name Processor related methods
*/
//@{
/** Start method.
This method aborts, if the module is not correctly initialized.
@see isValid
*/
virtual bool start();
/** Finish method.
This method aborts, if the module is not correctly initialized.
@see isValid
*/
virtual bool finish();
//@}
/** @name Predicates
*/
//@{
/** Return the module state.
The module is valid if \link init init \endlink was executed successfully.
@return the module state
*/
bool isValid() const;
//@}
protected:
/*_ The module name
*/
String module_name_;
/*_ A pointer to the modules parameters
*/
Parameters* parameters_;
/*_ The module's validity flag.
This flag should indicate that the module was correctly
initialized (using \Ref{init}).
*/
bool valid_;
};
} // namespace BALL
#endif // BALL_NMR_SHIFTMODULE_H
|