/usr/include/BALL/NMR/createSpectrumProcessor.h is in libball1.4-dev 1.4.3~beta1-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 181 182 183 184 185 186 187 188 189 | // -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: createSpectrumProcessor.h,v 1.26 2005/12/23 17:01:55 amoll Exp $
//
#ifndef BALL_NMR_CREATESPECTRUMPROCESSOR_H
#define BALL_NMR_CREATESPECTRUMPROCESSOR_H
#ifndef BALL_NMR_PEAK_H
# include <BALL/NMR/peak.h>
#endif
#ifndef BALL_NMR_PEAKLIST_H
# include <BALL/NMR/peakList.h>
#endif
#ifndef BALL_KERNEL_ATOM_H
# include <BALL/KERNEL/atom.h>
#endif
#ifndef BALL_DATATYPE_REGULARDATA1D_H
# include <BALL/DATATYPE/regularData1D.h>
#endif
#ifndef BALL_KERNEL_EXPRESSION_H
# include <BALL/KERNEL/expression.h>
#endif
#ifndef BALL_DATATYPE_STRINGHASHSET_H
# include <BALL/DATATYPE/stringHashSet.h>
#endif
#ifndef BALL_NMR_SHIFTMODULE_H
# include <BALL/NMR/shiftModule.h>
#endif
namespace BALL
{
class Atom;
/** Processor creates peaklist_.
Each atom's chemical shift will create a new peak.
This peak's <tt>atomlist_</tt> will contain the corresponding atom. \par
\ingroup Spectra
*/
class BALL_EXPORT CreateSpectrumProcessor
: public ShiftModule
{
public:
/** Constants
*/
//@{
/// Name of the section containing ignored atoms in the config file
static const String IGNORE_SECTION_NAME;
/// Name of the section containing averaged atoms in the config file
static const String AVERAGE_SECTION_NAME;
//@}
/** @name Constructors and Destructors
*/
//@{
/** Default Constructor.
Create a default instance of CreateSpectrumProcessor.
Calls \link init init \endlink to read default values from a configuration
file, see \link init init \endlink for details.
@exception FileNotFound if the INI file does not exist
@exception ParseError if the contents of the file could not be parsed
*/
CreateSpectrumProcessor()
throw(Exception::FileNotFound, Exception::ParseError);
/** Destructor
*/
virtual ~CreateSpectrumProcessor();
//@}
/** @name Processor related methods
*/
//@{
/** Init method.
Read the contents of a specified INI file containing
information on ignored and averaged atoms.
The default filename is <tt>NMR/StandardSpectrum.ini</tt>
in the BALL data path.
@exception FileNotFound if the INI file does not exist
@exception ParseError if the contents of the file could not be parsed
*/
virtual void init();
/** Init method.
Read the contents of a specified INI file containing
information on ignored and averaged atoms.
The default filename is <tt>NMR/StandardSpectrum.ini</tt>
in the BALL data path.
@exception FileNotFound if the INI file does not exist
@exception ParseError if the contents of the file could not be parsed
*/
virtual void init(const String& filename)
throw(Exception::ParseError, Exception::FileNotFound);
/** Start method.
*/
virtual bool start()
;
/** Application method.
*/
virtual Processor::Result operator () (Composite& atom)
;
/** Returns a reference to <tt>peaklist_</tt>.
*/
const PeakList1D& getPeakList() const;
//@}
/** @name Accessors
*/
//@{
///
void setWidth(float width)
;
///
float getWidth() const
;
///
void setAtomAveraging(bool flag = true)
;
///
bool getAtomAveraging() const
;
///
void setAtomIgnoring(bool flag = true)
;
///
bool getAtomIgnoring() const
;
///
void setExpression(const String& expression)
;
const String& getExpression() const
;
//@}
protected:
PeakList1D peaklist_;
StringHashSet ignore_atoms_;
vector<String> equivalency_residues_;
vector<vector<String> > equivalency_atoms_;
float width_;
bool use_averaging_;
bool use_ignore_table_;
Expression expression_;
};
/** Create a simulated spectrum from a peak list.
Using this operator, a peak list is converted to a gridded
representation of the spectrum. The spectrum synthesis is
based upon the assumption of a Lorentzian line shape. Peak width,
position, and height are taken from each individual peak of the
peak list. Each point in the \link TRegularData1D RegularData1D \endlink array is assigned
the sum of all Lorentzians centered at the peak positions:
\f[
S(\delta) = \sum_{i} \frac{h_i}{w_i (\delta_i-\delta)^2}
\f]
where \f$\delta\f$ is the shift coordinate and each peak is defined
by its position \f$\delta_i\f$, intensity \f$h_i\f$, and width \f$w_i\f$.
\ingroup Spectra
*/
BALL_EXPORT const RegularData1D& operator << (RegularData1D& data, const PeakList1D& peak_list) ;
} //namespace BALL
#endif // BALL_NMR_CREATESPECTRUMPROCESSOR_H
|