RDKit
Open-source cheminformatics and machine learning.
TransformCatalogParams.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_TRANSFORM_CATALOG_PARAMS_H__
12 #define __RD_TRANSFORM_CATALOG_PARAMS_H__
13 
14 #include <Catalogs/CatalogParams.h>
15 #include "TransformCatalogUtils.h"
16 #include <GraphMol/RDKitBase.h>
18 #include <string>
19 #include <vector>
20 #include <iostream>
21 
22 namespace RDKit {
23 class ROMol;
24 
25 namespace MolStandardize {
27  : public RDCatalog::CatalogParams {
28  public:
30  d_typeStr = "Transform Catalog Parameters";
31  d_transformations.clear();
32  }
33 
34  TransformCatalogParams(const std::string &transformFile);
35  // copy constructor
37 
38  ~TransformCatalogParams() override;
39 
40  unsigned int getNumTransformations() const {
41  return static_cast<unsigned int>(d_transformations.size());
42  }
43 
44  const std::vector<std::shared_ptr<ChemicalReaction>> &getTransformations()
45  const;
46 
47  const ChemicalReaction *getTransformation(unsigned int fid) const;
48 
49  void toStream(std::ostream &) const override;
50  std::string Serialize() const override;
51  void initFromStream(std::istream &ss) override;
52  void initFromString(const std::string &text) override;
53 
54  private:
55  std::vector<std::shared_ptr<ChemicalReaction>> d_transformations;
56 
57 }; // class TransformCatalogParams
58 
59 } // namespace MolStandardize
60 } // namespace RDKit
61 
62 #endif
This is a class for storing and applying general chemical reactions.
Definition: Reaction.h:118
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