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):
152 subSearch(new Chem::SubstructureSearch(*substruct)), featureType(type),
153 featureTol(tol), featureGeom(geom), vectorLength(
length)
156 subSearch->uniqueMappingsOnly(
false);
161 unsigned int featureType;
163 unsigned int featureGeom;
167 struct ExcludePattern
171 subQuery(substruct), subSearch(new Chem::SubstructureSearch(*substruct))
174 subSearch->uniqueMappingsOnly(
true);
181 typedef std::vector<IncludePattern> IncludePatternList;
182 typedef std::vector<ExcludePattern> ExcludePatternList;
183 typedef Util::ObjectStack<Util::BitSet> BitSetCache;
184 typedef std::vector<Util::BitSet*> BitSetList;
186 void init(
const Chem::MolecularGraph& molgraph);
188 void getExcludeMatches();
190 void addFeature(
const Chem::AtomBondMapping&,
const IncludePattern&, Pharmacophore&);
192 void createMatchedAtomMask(
const Chem::AtomMapping&,
Util::BitSet&,
bool)
const;
193 bool isContainedInList(
const Util::BitSet&,
const BitSetList&)
const;
195 const Chem::MolecularGraph* molGraph;
196 IncludePatternList includePatterns;
197 ExcludePatternList excludePatterns;
198 BitSetList includeMatches;
199 BitSetList excludeMatches;
200 AtomList posRefAtomList;
201 AtomList geomRefAtom1List;
202 AtomList geomRefAtom2List;
203 Math::Matrix<double> svdU;
206 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 addIncludePattern(const Chem::MolecularGraph::SharedPointer &pattern, unsigned int type, double tol, unsigned int geom, double length=1.0)
Appends a new feature include pattern to the current set of patterns.
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 &pattern)
Appends a new feature include 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.
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.