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  TransformCatalogParams(std::istream &transformStream);
36  // copy constructor
38 
39  ~TransformCatalogParams() override;
40 
41  unsigned int getNumTransformations() const {
42  return static_cast<unsigned int>(d_transformations.size());
43  }
44 
45  const std::vector<std::shared_ptr<ChemicalReaction>> &getTransformations()
46  const;
47 
48  const ChemicalReaction *getTransformation(unsigned int fid) const;
49 
50  void toStream(std::ostream &) const override;
51  std::string Serialize() const override;
52  void initFromStream(std::istream &ss) override;
53  void initFromString(const std::string &text) override;
54 
55  private:
56  std::vector<std::shared_ptr<ChemicalReaction>> d_transformations;
57 
58 }; // class TransformCatalogParams
59 
60 } // namespace MolStandardize
61 } // namespace RDKit
62 
63 #endif
RDKitBase.h
pulls in the core RDKit functionality
CatalogParams.h
Reaction.h
RDCatalog::CatalogParams
abstract base class for the container used to create a catalog
Definition: CatalogParams.h:18
RDKit::ChemicalReaction
This is a class for storing and applying general chemical reactions.
Definition: Reaction.h:119
RDKit::MolStandardize::TransformCatalogParams
Definition: TransformCatalogParams.h:26
RDKit
Std stuff.
Definition: Atom.h:30
RDKit::MolStandardize::TransformCatalogParams::TransformCatalogParams
TransformCatalogParams()
Definition: TransformCatalogParams.h:29
RDLog::toStream
RDKIT_RDGENERAL_EXPORT std::ostream & toStream(std::ostream &)
RDKit::MolStandardize::TransformCatalogParams::getNumTransformations
unsigned int getNumTransformations() const
Definition: TransformCatalogParams.h:41
RDKIT_MOLSTANDARDIZE_EXPORT
#define RDKIT_MOLSTANDARDIZE_EXPORT
Definition: export.h:437
TransformCatalogUtils.h
export.h