Loading...
Searching...
No Matches
spectrophore.h
Go to the documentation of this file.
/**********************************************************************
Spectrophore.h - Spectrophore(TM) calculator.
Declarations of OBSpectrophore
Copyright (C) 2005-2010 by Silicos NV
This file is part of the Open Babel project.
For more information, see <http://openbabel.org/>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 2 of the License.
The algorithm in this software has been covered by patent WO2009146735.
However, Silicos NV and the inventors of the above mentioned patent assure
that no patent infringment claims will be issued against individuals or
institutions that use this software under the GNU General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
***********************************************************************/
#ifndef OB_SPECTROPHORE_H
#define OB_SPECTROPHORE_H
#include <openbabel/babelconfig.h>
#include <vector>
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#define N_PROPERTIES 4
namespace OpenBabel
{
class OBMol;
class OBAPI OBSpectrophore
{
public:
enum AccuracyOption {AngStepSize1,
AngStepSize2,
AngStepSize5,
AngStepSize10,
AngStepSize15,
AngStepSize20,
AngStepSize30,
AngStepSize36,
AngStepSize45,
AngStepSize60};
enum NormalizationOption {NoNormalization,
NormalizationTowardsZeroMean,
NormalizationTowardsUnitStd,
NormalizationTowardsZeroMeanAndUnitStd};
enum StereoOption {NoStereoSpecificProbes,
UniqueStereoSpecificProbes,
MirrorStereoSpecificProbes,
AllStereoSpecificProbes};
OBSpectrophore(void);
OBSpectrophore(const OBSpectrophore& sphore);
virtual ~OBSpectrophore(void);
OBSpectrophore& operator=(const OBSpectrophore& sphore);
void SetResolution(const double r = 3.0);
void SetAccuracy(const AccuracyOption a = AngStepSize20);
void SetStereo(const StereoOption s = NoStereoSpecificProbes);
void SetNormalization(const NormalizationOption n = NoNormalization);
AccuracyOption GetAccuracy(void) const;
double GetResolution(void) const;
StereoOption GetStereo(void) const;
NormalizationOption GetNormalization(void) const;
std::vector<double> GetSpectrophore(OpenBabel::OBMol* mol);
protected:
double _resolution;
AccuracyOption _accuracy;
StereoOption _stereoFlag;
NormalizationOption _normalization;
std::vector<int> _rotationStepList;
unsigned int _nAtoms;
double** _property;
double* _radii;
double** _oricoor;
double** _coor;
unsigned int _beginProbe;
unsigned int _endProbe;
unsigned int _numberOfProbes;
std::vector<double> _spectro;
struct
{
int value[12];
} _probe[48];
struct
{
double x;
double y;
double z;
double v[N_PROPERTIES];
} _boxPoint[12];
void _getMoleculeData(OpenBabel::OBMol*);
void _orient(void);
void _getBox(double**);
void _setBox(void);
void _getEnergies(double**, double*);
void _initiateSpectrophore(double*, double*);
void _rotateX(double**, double**, const double, const double);
void _rotateY(double**, double**, const double, const double);
void _rotateZ(double**, double**, const double, const double);
void _updateSpectrophore(double*, double*);
void _calculateProperties(OpenBabel::OBMol*);
void _solveMatrix(double**, double*, unsigned int);
void _luDecompose(double**, std::vector<int>&, unsigned int);
void _luSolve(double**, std::vector<int>&, double*, unsigned int);
void _swapRows(double*, unsigned int, unsigned int);
void _swapRows(double**, unsigned int, unsigned int, unsigned int);
};
} // end namespace OpenBabel
#endif //OB_SPECTROPHORE_H
OpenBabel::OBMol
Molecule Class.
Definition mol.h:121
OpenBabel::OBSpectrophore
Class to compute Spectrophores™.
Definition spectrophore.h:303
OpenBabel::OBSpectrophore::StereoOption
StereoOption
Definition spectrophore.h:328
OpenBabel::OBSpectrophore::AllStereoSpecificProbes
@ AllStereoSpecificProbes
Definition spectrophore.h:331
OpenBabel::OBSpectrophore::MirrorStereoSpecificProbes
@ MirrorStereoSpecificProbes
Definition spectrophore.h:330
OpenBabel::OBSpectrophore::UniqueStereoSpecificProbes
@ UniqueStereoSpecificProbes
Definition spectrophore.h:329
OpenBabel::OBSpectrophore::NoStereoSpecificProbes
@ NoStereoSpecificProbes
Definition spectrophore.h:328
OpenBabel::OBSpectrophore::_resolution
double _resolution
Definition spectrophore.h:554
OpenBabel::OBSpectrophore::_endProbe
unsigned int _endProbe
Definition spectrophore.h:565
OpenBabel::OBSpectrophore::_accuracy
AccuracyOption _accuracy
Definition spectrophore.h:555
OpenBabel::OBSpectrophore::v
double v[N_PROPERTIES]
Definition spectrophore.h:577
OpenBabel::OBSpectrophore::_rotationStepList
std::vector< int > _rotationStepList
Definition spectrophore.h:558
OpenBabel::OBSpectrophore::_numberOfProbes
unsigned int _numberOfProbes
Definition spectrophore.h:566
OpenBabel::OBSpectrophore::value
int value[12]
Definition spectrophore.h:570
OpenBabel::OBSpectrophore::AccuracyOption
AccuracyOption
Definition spectrophore.h:308
OpenBabel::OBSpectrophore::AngStepSize36
@ AngStepSize36
Definition spectrophore.h:315
OpenBabel::OBSpectrophore::AngStepSize5
@ AngStepSize5
Definition spectrophore.h:310
OpenBabel::OBSpectrophore::AngStepSize15
@ AngStepSize15
Definition spectrophore.h:312
OpenBabel::OBSpectrophore::AngStepSize1
@ AngStepSize1
Definition spectrophore.h:308
OpenBabel::OBSpectrophore::AngStepSize30
@ AngStepSize30
Definition spectrophore.h:314
OpenBabel::OBSpectrophore::AngStepSize45
@ AngStepSize45
Definition spectrophore.h:316
OpenBabel::OBSpectrophore::AngStepSize10
@ AngStepSize10
Definition spectrophore.h:311
OpenBabel::OBSpectrophore::AngStepSize20
@ AngStepSize20
Definition spectrophore.h:313
OpenBabel::OBSpectrophore::AngStepSize2
@ AngStepSize2
Definition spectrophore.h:309
OpenBabel::OBSpectrophore::AngStepSize60
@ AngStepSize60
Definition spectrophore.h:317
OpenBabel::OBSpectrophore::_oricoor
double ** _oricoor
Definition spectrophore.h:562
OpenBabel::OBSpectrophore::_radii
double * _radii
Definition spectrophore.h:561
OpenBabel::OBSpectrophore::_coor
double ** _coor
Definition spectrophore.h:563
OpenBabel::OBSpectrophore::_nAtoms
unsigned int _nAtoms
Definition spectrophore.h:559
OpenBabel::OBSpectrophore::_beginProbe
unsigned int _beginProbe
Definition spectrophore.h:564
OpenBabel::OBSpectrophore::_spectro
std::vector< double > _spectro
Definition spectrophore.h:567
OpenBabel::OBSpectrophore::z
double z
Definition spectrophore.h:576
OpenBabel::OBSpectrophore::y
double y
Definition spectrophore.h:575
OpenBabel::OBSpectrophore::_normalization
NormalizationOption _normalization
Definition spectrophore.h:557
OpenBabel::OBSpectrophore::OBSpectrophore
OBSpectrophore(void)
Definition spectrophore.cpp:34
OpenBabel::OBSpectrophore::_property
double ** _property
Definition spectrophore.h:560
OpenBabel::OBSpectrophore::NormalizationOption
NormalizationOption
Definition spectrophore.h:321
OpenBabel::OBSpectrophore::NormalizationTowardsUnitStd
@ NormalizationTowardsUnitStd
Definition spectrophore.h:323
OpenBabel::OBSpectrophore::NormalizationTowardsZeroMeanAndUnitStd
@ NormalizationTowardsZeroMeanAndUnitStd
Definition spectrophore.h:324
OpenBabel::OBSpectrophore::NormalizationTowardsZeroMean
@ NormalizationTowardsZeroMean
Definition spectrophore.h:322
OpenBabel::OBSpectrophore::NoNormalization
@ NoNormalization
Definition spectrophore.h:321
OpenBabel::OBSpectrophore::_stereoFlag
StereoOption _stereoFlag
Definition spectrophore.h:556
OpenBabel::OBSpectrophore::x
double x
Definition spectrophore.h:574
OpenBabel
Global namespace for all Open Babel code.
Definition alias.h:23
N_PROPERTIES
#define N_PROPERTIES
Definition spectrophore.h:45