29 #ifndef CDPL_PHARM_PATTERNBASEDFEATUREGENERATOR_HPP
30 #define CDPL_PHARM_PATTERNBASEDFEATUREGENERATOR_HPP
74 FEATURE_ATOM_FLAG = 0x01,
76 POS_REF_ATOM_FLAG = 0x02,
78 GEOM_REF_ATOM1_FLAG = 0x04,
80 GEOM_REF_ATOM2_FLAG = 0x08
108 double tol,
unsigned int geom,
double length = 1.0);
161 struct IncludePattern
165 double tol,
unsigned int geom,
double length):
166 molGraph(molgraph), subSearch(new Chem::SubstructureSearch(*molgraph)), featureType(type),
167 featureTol(tol), featureGeom(geom), vectorLength(
length)
172 unsigned int featureType;
174 unsigned int featureGeom;
178 struct ExcludePattern
182 molGraph(molgraph), subSearch(new Chem::SubstructureSearch(*molgraph))
189 typedef std::vector<IncludePattern> IncludePatternList;
190 typedef std::vector<ExcludePattern> ExcludePatternList;
191 typedef Util::ObjectStack<Util::BitSet> BitSetCache;
192 typedef std::vector<Util::BitSet*> BitSetList;
194 void init(
const Chem::MolecularGraph& molgraph);
196 void getExcludeMatches();
198 void addFeature(
const Chem::AtomBondMapping&,
const IncludePattern&, Pharmacophore&);
200 bool createMatchedAtomMask(
const Chem::AtomMapping&,
Util::BitSet&,
bool,
bool =
true)
const;
201 bool isContainedInList(
const Util::BitSet&,
const BitSetList&)
const;
203 const Chem::MolecularGraph* molGraph;
204 IncludePatternList includePatterns;
205 ExcludePatternList excludePatterns;
206 BitSetList includeMatches;
207 BitSetList excludeMatches;
208 AtomList posRefAtomList;
209 AtomList geomRefAtom1List;
210 AtomList geomRefAtom2List;
211 Math::Matrix<double> svdU;
214 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:62
Pharm::FeatureGenerator implementation that perceives pharmacophore features by SMARTS-like substruct...
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:71
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:63
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:149
virtual void addNonPatternFeatures(const Chem::MolecularGraph &molgraph, Pharmacophore &pharm)
Definition: PatternBasedFeatureGenerator.hpp:155
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:979
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:2937
CMatrix< double, 3, 3 > Matrix3D
Bounded 3x3 matrix holding floating point values of type double.
Definition: Matrix.hpp:3180
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.