RDKit
Open-source cheminformatics and machine learning.
TautomerCatalogParams.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_TAUTOMER_CATALOG_PARAMS_H__
12 #define __RD_TAUTOMER_CATALOG_PARAMS_H__
13 
14 #include <Catalogs/CatalogParams.h>
15 #include "TautomerCatalogUtils.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 {
25 class TautomerTransform;
26 
28  : public RDCatalog::CatalogParams {
29  public:
31  d_typeStr = "Tautomer Catalog Parameters";
32  d_transforms.clear();
33  }
34 
35  TautomerCatalogParams(const std::string &tautomerFile);
36  // copy constructor
38 
40 
41  // DEPRECATED: remove in release 2021.01
42  // the function name is misleading and getTransforms().size()
43  // yields the same information
44  unsigned int getNumTautomers() const {
45  return static_cast<unsigned int>(d_transforms.size());
46  }
47 
48  const std::vector<TautomerTransform> &getTransforms() const;
49 
50  const TautomerTransform getTransform(unsigned int fid) const;
51 
52  void toStream(std::ostream &) const override;
53  std::string Serialize() const override;
54  void initFromStream(std::istream &ss) override;
55  void initFromString(const std::string &text) override;
56 
57  private:
58  // std::vector<std::pair<ROMol*, ROMol*>> d_pairs;
59  std::vector<TautomerTransform> d_transforms;
60 
61 }; // class TautomerCatalogParams
62 
63 } // namespace MolStandardize
64 } // namespace RDKit
65 
66 #endif
pulls in the core RDKit functionality
abstract base class for the container used to create a catalog
Definition: CatalogParams.h:18
std::string Serialize() const override
returns a string with a serialized (pickled) representation
const TautomerTransform getTransform(unsigned int fid) const
void initFromStream(std::istream &ss) override
initializes from a stream pickle
TautomerCatalogParams(const std::string &tautomerFile)
void initFromString(const std::string &text) override
initializes from a string pickle
void toStream(std::ostream &) const override
serializes (pickles) to a stream
TautomerCatalogParams(const TautomerCatalogParams &other)
const std::vector< TautomerTransform > & getTransforms() const
#define RDKIT_MOLSTANDARDIZE_EXPORT
Definition: export.h:489
Std stuff.
Definition: Abbreviations.h:17