RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
MolChemicalFeatureFactory.h
Go to the documentation of this file.
1//
2// Copyright (C) 2004-2006 Rational Discovery LLC
3//
4// @@ All Rights Reserved @@
5// This file is part of the RDKit.
6// The contents are covered by the terms of the BSD license
7// which is included in the file license.txt, found at the root
8// of the RDKit source tree.
9//
10#include <RDGeneral/export.h>
11#ifndef __CHEMICALFEATUREFACTORY_H_02122004_1545__
12#define __CHEMICALFEATUREFACTORY_H_02122004_1545__
13
15#include <boost/shared_ptr.hpp>
16
17namespace RDKit {
19typedef boost::shared_ptr<MolChemicalFeature> FeatSPtr;
20typedef std::list<FeatSPtr> FeatSPtrList;
21typedef FeatSPtrList::iterator FeatSPtrList_I;
22
23//! The class for finding chemical features in molecules
25 public:
26 //! returns the number of feature definitions
27 int getNumFeatureDefs() const { return d_featDefs.size(); }
28
29 //! returns an iterator referring to the first feature definition
30 MolChemicalFeatureDef::CollectionType::iterator beginFeatureDefs() {
31 return d_featDefs.begin();
32 }
33 //! returns an iterator referring to the end of the feature definitions
34 MolChemicalFeatureDef::CollectionType::iterator endFeatureDefs() {
35 return d_featDefs.end();
36 }
37
38 //! returns a const_iterator referring to the first feature definition
39 MolChemicalFeatureDef::CollectionType::const_iterator beginFeatureDefs()
40 const {
41 return d_featDefs.begin();
42 }
43 //! returns a const_iterator referring to the end of the feature definitions
44 MolChemicalFeatureDef::CollectionType::const_iterator endFeatureDefs() const {
45 return d_featDefs.end();
46 }
47
48 //! appends a feature definition to the collection of features defs.
50 MolChemicalFeatureDef::CollectionType::value_type featDef) {
51 d_featDefs.push_back(featDef);
52 }
53
54 //! returns a list of features on the molecule
55 /*!
56 \param mol The molecule of interest
57 \param includeOnly (optional) if this is non-null, only features in this
58 family will be returned
59 \param confId (optional) the conformer id to use
60 */
61 FeatSPtrList getFeaturesForMol(const ROMol &mol, const char *includeOnly = "",
62 int confId = -1) const;
63
64 private:
66};
67
68//! constructs a MolChemicalFeatureFactory from the data in a stream
70 std::istream &inStream);
71//! constructs a MolChemicalFeatureFactory from the data in a string
73 const std::string &featureData);
74
75} // end of namespace RDKit
76
77#endif
std::list< boost::shared_ptr< MolChemicalFeatureDef > > CollectionType
The class for finding chemical features in molecules.
void addFeatureDef(MolChemicalFeatureDef::CollectionType::value_type featDef)
appends a feature definition to the collection of features defs.
MolChemicalFeatureDef::CollectionType::iterator endFeatureDefs()
returns an iterator referring to the end of the feature definitions
int getNumFeatureDefs() const
returns the number of feature definitions
MolChemicalFeatureDef::CollectionType::const_iterator endFeatureDefs() const
returns a const_iterator referring to the end of the feature definitions
FeatSPtrList getFeaturesForMol(const ROMol &mol, const char *includeOnly="", int confId=-1) const
returns a list of features on the molecule
MolChemicalFeatureDef::CollectionType::iterator beginFeatureDefs()
returns an iterator referring to the first feature definition
MolChemicalFeatureDef::CollectionType::const_iterator beginFeatureDefs() const
returns a const_iterator referring to the first feature definition
#define RDKIT_MOLCHEMICALFEATURES_EXPORT
Definition export.h:305
Std stuff.
RDKIT_MOLCHEMICALFEATURES_EXPORT MolChemicalFeatureFactory * buildFeatureFactory(std::istream &inStream)
constructs a MolChemicalFeatureFactory from the data in a stream
std::list< FeatSPtr > FeatSPtrList
boost::shared_ptr< MolChemicalFeature > FeatSPtr
FeatSPtrList::iterator FeatSPtrList_I