29 #ifndef CDPL_PHARM_PATTERNBASEDFEATUREGENERATOR_HPP
30 #define CDPL_PHARM_PATTERNBASEDFEATUREGENERATOR_HPP
66 FEATURE_ATOM_FLAG = 0x01,
67 POS_REF_ATOM_FLAG = 0x02,
68 GEOM_REF_ATOM1_FLAG = 0x04,
69 GEOM_REF_ATOM2_FLAG = 0x08
97 double tol,
unsigned int geom,
double length = 1.0);
146 struct IncludePattern
150 double tol,
unsigned int geom,
double length):
151 molGraph(molgraph), subSearch(new Chem::SubstructureSearch(*molgraph)), featureType(type),
152 featureTol(tol), featureGeom(geom), vectorLength(
length)
157 unsigned int featureType;
159 unsigned int featureGeom;
163 struct ExcludePattern
167 molGraph(molgraph), subSearch(new Chem::SubstructureSearch(*molgraph))
174 typedef std::vector<IncludePattern> IncludePatternList;
175 typedef std::vector<ExcludePattern> ExcludePatternList;
176 typedef Util::ObjectStack<Util::BitSet> BitSetCache;
177 typedef std::vector<Util::BitSet*> BitSetList;
179 void init(
const Chem::MolecularGraph& molgraph);
181 void getExcludeMatches();
183 void addFeature(
const Chem::AtomBondMapping&,
const IncludePattern&, Pharmacophore&);
185 bool createMatchedAtomMask(
const Chem::AtomMapping&,
Util::BitSet&,
bool,
bool =
true)
const;
186 bool isContainedInList(
const Util::BitSet&,
const BitSetList&)
const;
188 const Chem::MolecularGraph* molGraph;
189 IncludePatternList includePatterns;
190 ExcludePatternList excludePatterns;
191 BitSetList includeMatches;
192 BitSetList excludeMatches;
193 AtomList posRefAtomList;
194 AtomList geomRefAtom1List;
195 AtomList geomRefAtom2List;
196 Math::Matrix<double> svdU;
199 BitSetCache bitSetCache;
Definition of the class CDPL::Chem::AtomBondMapping.
Definition of the type CDPL::Util::BitSet.
Definition of the class CDPL::Pharm::FeatureGenerator.
Definition of matrix data types.
Definition of the class CDPL::Chem::MolecularGraph.
Definition of the class CDPL::Util::ObjectStack.
Definition of the preprocessor macro CDPL_PHARM_API.
#define CDPL_PHARM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of the class CDPL::Chem::SubstructureSearch.
Definition of vector data types.
MolecularGraph.
Definition: MolecularGraph.hpp:52
std::shared_ptr< MolecularGraph > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MolecularGraph instances.
Definition: MolecularGraph.hpp:58
std::shared_ptr< SubstructureSearch > SharedPointer
Definition: SubstructureSearch.hpp:73
FeatureGenerator.
Definition: FeatureGenerator.hpp:57
std::shared_ptr< FeatureGenerator > SharedPointer
Definition: FeatureGenerator.hpp:60
PatternBasedFeatureGenerator.
Definition: PatternBasedFeatureGenerator.hpp:58
bool isContainedInIncMatchList(const Util::BitSet &) const
PatternAtomLabelFlag
Definition: PatternBasedFeatureGenerator.hpp:64
void clearExcludePatterns()
Clears the current set of exclude patterns.
double calcVecFeatureOrientation(const AtomList &, const AtomList &, Math::Vector3D &) const
std::shared_ptr< PatternBasedFeatureGenerator > SharedPointer
Definition: PatternBasedFeatureGenerator.hpp:61
bool isContainedInExMatchList(const Util::BitSet &) const
PatternBasedFeatureGenerator()
Constructs the PatternBasedFeatureGenerator instance.
bool calcPlaneFeatureOrientation(const AtomList &, Math::Vector3D &, Math::Vector3D &)
std::vector< const Chem::Atom * > AtomList
Definition: PatternBasedFeatureGenerator.hpp:134
virtual void addNonPatternFeatures(const Chem::MolecularGraph &molgraph, Pharmacophore &pharm)
Definition: PatternBasedFeatureGenerator.hpp:140
void addExcludePattern(const Chem::MolecularGraph::SharedPointer &molgraph)
Appends a new feature substructure exclude pattern to the current set of patterns.
PatternBasedFeatureGenerator & operator=(const PatternBasedFeatureGenerator &gen)
Replaces the current set include/exclude patterns by the patterns in the PatternBasedFeatureGenerator...
bool calcCentroid(const AtomList &, Math::Vector3D &) const
void generate(const Chem::MolecularGraph &molgraph, Pharmacophore &pharm)
Perceives pharmacophore features according to the specified include/exclude patterns and adds them to...
PatternBasedFeatureGenerator(const PatternBasedFeatureGenerator &gen)
Constructs a copy of the PatternBasedFeatureGenerator instance gen.
void addIncludePattern(const Chem::MolecularGraph::SharedPointer &molgraph, unsigned int type, double tol, unsigned int geom, double length=1.0)
Appends a new feature substructure include pattern to the current set of patterns.
virtual ~PatternBasedFeatureGenerator()
Virtual destructor.
FeatureGenerator::SharedPointer clone() const
void clearIncludePatterns()
Clears the current set of include patterns.
Pharmacophore.
Definition: Pharmacophore.hpp:48
VectorNorm2< E >::ResultType length(const VectorExpression< E > &e)
Definition: VectorExpression.hpp:553
CVector< double, 3 > Vector3D
A bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:1637
CMatrix< double, 3, 3 > Matrix3D
A bounded 3x3 matrix holding floating point values of type double.
Definition: Matrix.hpp:1849
boost::dynamic_bitset BitSet
A dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.