RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
TransformCatalogParams.h
Go to the documentation of this file.
1//
2// Copyright (C) 2018-2021 Susan H. Leung and other RDKit contributors
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
16#include <GraphMol/RDKitBase.h>
18#include <string>
19#include <vector>
20
21namespace RDKit {
22class ROMol;
23
24namespace MolStandardize {
27 public:
29 d_typeStr = "Transform Catalog Parameters";
30 d_transformations.clear();
31 }
32
33 // if the string here is empty the default transforms will be used
34 TransformCatalogParams(const std::string &transformFile);
35 TransformCatalogParams(std::istream &transformStream);
37 const std::vector<std::pair<std::string, std::string>> &data);
38 // copy constructor
40
42
43 unsigned int getNumTransformations() const {
44 return static_cast<unsigned int>(d_transformations.size());
45 }
46
47 const std::vector<std::shared_ptr<ChemicalReaction>> &getTransformations()
48 const;
49
50 const ChemicalReaction *getTransformation(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 // it's a bit dirty to make this "const", but it's weakly defensible
58 // since the set of transformations themselves will not be changed.
60
61 private:
62 std::vector<std::shared_ptr<ChemicalReaction>> d_transformations;
63
64}; // class TransformCatalogParams
65
66} // namespace MolStandardize
67} // namespace RDKit
68
69#endif
pulls in the core RDKit functionality
abstract base class for the container used to create a catalog
std::string d_typeStr
our type string
This is a class for storing and applying general chemical reactions.
Definition Reaction.h:121
void initFromString(const std::string &text) override
initializes from a string pickle
TransformCatalogParams(const std::vector< std::pair< std::string, std::string > > &data)
void initFromStream(std::istream &ss) override
initializes from a stream pickle
const ChemicalReaction * getTransformation(unsigned int fid) const
TransformCatalogParams(const TransformCatalogParams &other)
const std::vector< std::shared_ptr< ChemicalReaction > > & getTransformations() const
std::string Serialize() const override
returns a string with a serialized (pickled) representation
void toStream(std::ostream &) const override
serializes (pickles) to a stream
TransformCatalogParams(std::istream &transformStream)
TransformCatalogParams(const std::string &transformFile)
#define RDKIT_MOLSTANDARDIZE_EXPORT
Definition export.h:369
Std stuff.