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  FragmentCatalogParams(std::istream &fgroupStream);
35  // copy constructor
37 
38  ~FragmentCatalogParams() override;
39 
40  unsigned int getNumFuncGroups() const {
41  return static_cast<unsigned int>(d_funcGroups.size());
42  }
43 
44  const std::vector<std::shared_ptr<ROMol>> &getFuncGroups() const;
45 
46  const ROMol *getFuncGroup(unsigned int fid) const;
47 
48  void toStream(std::ostream &) const override;
49  std::string Serialize() const override;
50  void initFromStream(std::istream &ss) override;
51  void initFromString(const std::string &text) override;
52 
53  private:
54  std::vector<std::shared_ptr<ROMol>> d_funcGroups;
55 
56 }; // class FragmentCatalogParams
57 
58 } // namespace MolStandardize
59 } // namespace RDKit
60 
61 #endif
FragmentCatalogUtils.h
RDKit::ROMol
Definition: ROMol.h:171
RDKitBase.h
pulls in the core RDKit functionality
CatalogParams.h
RDCatalog::CatalogParams
abstract base class for the container used to create a catalog
Definition: CatalogParams.h:18
RDKit::MolStandardize::FragmentCatalogParams::getNumFuncGroups
unsigned int getNumFuncGroups() const
Definition: FragmentCatalogParams.h:40
RDKit::MolStandardize::FragmentCatalogParams
Definition: FragmentCatalogParams.h:25
RDKit
Std stuff.
Definition: Atom.h:30
RDKit::MolStandardize::FragmentCatalogParams::FragmentCatalogParams
FragmentCatalogParams()
Definition: FragmentCatalogParams.h:28
RDLog::toStream
RDKIT_RDGENERAL_EXPORT std::ostream & toStream(std::ostream &)
RDKIT_MOLSTANDARDIZE_EXPORT
#define RDKIT_MOLSTANDARDIZE_EXPORT
Definition: export.h:437
export.h