29 #ifndef CDPL_PHARM_PATTERNBASEDFEATUREGENERATOR_HPP
30 #define CDPL_PHARM_PATTERNBASEDFEATUREGENERATOR_HPP
78 FEATURE_ATOM_FLAG = 0x01,
83 POS_REF_ATOM_FLAG = 0x02,
88 GEOM_REF_ATOM1_FLAG = 0x04,
93 GEOM_REF_ATOM2_FLAG = 0x08
121 double tol,
unsigned int geom,
double length = 1.0);
174 struct IncludePattern
178 double tol,
unsigned int geom,
double length):
179 molGraph(molgraph), subSearch(new Chem::SubstructureSearch(*molgraph)), featureType(type),
180 featureTol(tol), featureGeom(geom), vectorLength(
length)
185 unsigned int featureType;
187 unsigned int featureGeom;
191 struct ExcludePattern
195 molGraph(molgraph), subSearch(new Chem::SubstructureSearch(*molgraph))
202 typedef std::vector<IncludePattern> IncludePatternList;
203 typedef std::vector<ExcludePattern> ExcludePatternList;
204 typedef Util::ObjectStack<Util::BitSet> BitSetCache;
205 typedef std::vector<Util::BitSet*> BitSetList;
207 void init(
const Chem::MolecularGraph& molgraph);
209 void getExcludeMatches();
211 void addFeature(
const Chem::AtomBondMapping&,
const IncludePattern&, Pharmacophore&);
213 bool createMatchedAtomMask(
const Chem::AtomMapping&,
Util::BitSet&,
bool,
bool =
true)
const;
214 bool isContainedInList(
const Util::BitSet&,
const BitSetList&)
const;
216 const Chem::MolecularGraph* molGraph;
217 IncludePatternList includePatterns;
218 ExcludePatternList excludePatterns;
219 BitSetList includeMatches;
220 BitSetList excludeMatches;
221 AtomList posRefAtomList;
222 AtomList geomRefAtom1List;
223 AtomList geomRefAtom2List;
224 Math::Matrix<double> svdU;
227 BitSetCache bitSetCache;
Definition of class CDPL::Chem::AtomBondMapping.
Declaration of type CDPL::Util::BitSet.
Definition of class CDPL::Pharm::FeatureGenerator.
Definition of matrix data types.
Definition of class CDPL::Chem::MolecularGraph.
Definition of 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 class CDPL::Chem::SubstructureSearch.
Definition of vector data types.
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
std::shared_ptr< MolecularGraph > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MolecularGraph instances.
Definition: MolecularGraph.hpp:63
std::shared_ptr< SubstructureSearch > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated SubstructureSearch instances.
Definition: SubstructureSearch.hpp:86
Abstract base class for generators that perceive one type of pharmacophore feature (e....
Definition: FeatureGenerator.hpp:58
std::shared_ptr< FeatureGenerator > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated FeatureGenerator instances.
Definition: FeatureGenerator.hpp:64
Pharm::FeatureGenerator implementation that perceives pharmacophore features by substructure pattern ...
Definition: PatternBasedFeatureGenerator.hpp:59
bool isContainedInIncMatchList(const Util::BitSet &) const
PatternAtomLabelFlag
Role-flags assigned (via the atom-mapping-ID property) to atoms of feature substructure patterns adde...
Definition: PatternBasedFeatureGenerator.hpp:73
void clearExcludePatterns()
Clears the current set of exclude patterns.
double calcVecFeatureOrientation(const AtomList &, const AtomList &, Math::Vector3D &) const
std::shared_ptr< PatternBasedFeatureGenerator > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated PatternBasedFeatureGenerator inst...
Definition: PatternBasedFeatureGenerator.hpp:65
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:162
virtual void addNonPatternFeatures(const Chem::MolecularGraph &molgraph, Pharmacophore &pharm)
Definition: PatternBasedFeatureGenerator.hpp:168
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
Creates a deep copy of the PatternBasedFeatureGenerator instance.
void clearIncludePatterns()
Clears the current set of include patterns.
Abstract base class for mutable containers of Pharm::Feature instances representing a pharmacophore m...
Definition: Pharmacophore.hpp:53
VectorNorm2< E >::ResultType length(const VectorExpression< E > &e)
Returns the length (L2 norm) of the vector expression e (alias of norm2()).
Definition: VectorExpression.hpp:1129
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating-point values of type double.
Definition: Vector.hpp:3218
CMatrix< double, 3, 3 > Matrix3D
Bounded 3×3 matrix holding floating-point values of type double.
Definition: Matrix.hpp:3504
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.