MolChemicalFeatureDef.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (C) 2004-2006 Rational Discovery LLC
00003 //
00004 //   @@ All Rights Reserved  @@
00005 //
00006 #ifndef __CHEMICALFEATUREDEF_H_02122004_1750__
00007 #define __CHEMICALFEATUREDEF_H_02122004_1750__
00008 
00009 #include <string>
00010 #include <vector>
00011 #include <list>
00012 
00013 #include <boost/shared_ptr.hpp>
00014 namespace RDKit {
00015   class ROMol;
00016   class MolChemicalFeatureDef;
00017 
00018   class MolChemicalFeatureDef {
00019   public:
00020     typedef std::list< boost::shared_ptr<MolChemicalFeatureDef> > CollectionType;
00021     
00022     MolChemicalFeatureDef() : d_family(""),d_type(""),d_smarts("") {};
00023     MolChemicalFeatureDef(const std::string &smarts,const std::string &family,
00024                        const std::string &type);
00025     
00026     unsigned int getNumWeights() const { return d_weights.size(); };
00027     std::vector<double>::iterator beginWeights() { return d_weights.begin();};
00028     std::vector<double>::iterator endWeights() { return d_weights.end();};
00029 
00030     std::vector<double>::const_iterator beginWeights() const { return d_weights.begin();};
00031     std::vector<double>::const_iterator endWeights() const { return d_weights.end();};
00032 
00033     void setWeights(const std::vector<double> &weights){
00034       d_weights.insert(d_weights.begin(),weights.begin(),weights.end());
00035     }
00036 
00037     const std::string &getFamily() const {return d_family;};
00038     const std::string &getType() const {return d_type;};
00039     const std::string &getSmarts() const {return d_smarts;};
00040 
00041     void normalizeWeights();
00042 
00043     const ROMol *getPattern() const { return dp_pattern.get(); };
00044   private:
00045     std::string d_family;
00046     std::string d_type;
00047     std::string d_smarts;
00048     boost::shared_ptr<ROMol> dp_pattern;
00049     std::vector<double> d_weights;
00050   };
00051 
00052 }
00053 #endif

Generated on Tue Oct 7 06:10:11 2008 for RDCode by  doxygen 1.5.5