RDKit
Open-source cheminformatics and machine learning.
FragmentCatalogParams.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2018 Susan H. Leung
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 __RD_FRAGMENT_CATALOG_PARAMS_H__
12 #define __RD_FRAGMENT_CATALOG_PARAMS_H__
13 
14 #include <Catalogs/CatalogParams.h>
15 #include "FragmentCatalogUtils.h"
16 #include <GraphMol/RDKitBase.h>
17 #include <string>
18 #include <vector>
19 #include <iostream>
20 
21 namespace RDKit {
22 class ROMol;
23 
24 namespace MolStandardize {
26  : public RDCatalog::CatalogParams {
27  public:
29  d_typeStr = "Fragment Catalog Parameters";
30  d_funcGroups.clear();
31  }
32 
33  FragmentCatalogParams(const std::string &fgroupFile);
34  // copy constructor
36 
37  ~FragmentCatalogParams() override;
38 
39  unsigned int getNumFuncGroups() const {
40  return static_cast<unsigned int>(d_funcGroups.size());
41  }
42 
43  const std::vector<std::shared_ptr<ROMol>> &getFuncGroups() const;
44 
45  const ROMol *getFuncGroup(unsigned int fid) const;
46 
47  void toStream(std::ostream &) const override;
48  std::string Serialize() const override;
49  void initFromStream(std::istream &ss) override;
50  void initFromString(const std::string &text) override;
51 
52  private:
53  std::vector<std::shared_ptr<ROMol>> d_funcGroups;
54 
55 }; // class FragmentCatalogParams
56 
57 } // namespace MolStandardize
58 } // namespace RDKit
59 
60 #endif
pulls in the core RDKit functionality
Std stuff.
Definition: Atom.h:30
RDKIT_RDGENERAL_EXPORT std::ostream & toStream(std::ostream &)
#define RDKIT_MOLSTANDARDIZE_EXPORT
Definition: export.h:424
abstract base class for the container used to create a catalog
Definition: CatalogParams.h:18