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#include <iostream>
21
22namespace RDKit {
23class ROMol;
24
25namespace MolStandardize {
28 public:
30 d_typeStr = "Transform Catalog Parameters";
31 d_transformations.clear();
32 }
33
34 // if the string here is empty the default transforms will be used
35 TransformCatalogParams(const std::string &transformFile);
36 TransformCatalogParams(std::istream &transformStream);
38 const std::vector<std::pair<std::string, std::string>> &data);
39 // copy constructor
41
43
44 unsigned int getNumTransformations() const {
45 return static_cast<unsigned int>(d_transformations.size());
46 }
47
48 const std::vector<std::shared_ptr<ChemicalReaction>> &getTransformations()
49 const;
50
51 const ChemicalReaction *getTransformation(unsigned int fid) const;
52
53 void toStream(std::ostream &) const override;
54 std::string Serialize() const override;
55 void initFromStream(std::istream &ss) override;
56 void initFromString(const std::string &text) override;
57
58 // it's a bit dirty to make this "const", but it's weakly defensible
59 // since the set of transformations themselves will not be changed.
61
62 private:
63 std::vector<std::shared_ptr<ChemicalReaction>> d_transformations;
64
65}; // class TransformCatalogParams
66
67} // namespace MolStandardize
68} // namespace RDKit
69
70#endif
pulls in the core RDKit functionality
abstract base class for the container used to create a catalog
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:345
Std stuff.