RDKit: TransformCatalogEntry.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
TransformCatalogEntry.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_ENTRY_H__
12#define __RD_TRANSFORM_CATALOG_ENTRY_H__
13
14#include <Catalogs/CatalogEntry.h>
15#include <GraphMol/Subgraphs/Subgraphs.h>
16#include <GraphMol/Substruct/SubstructMatch.h>
17#include <GraphMol/ChemReactions/Reaction.h>
18#include "TransformCatalogParams.h"
19#include <GraphMol/RDKitBase.h>
20
21namespace RDKit {
22namespace MolStandardize {
23
24 class RDKIT_MOLSTANDARDIZE_EXPORT TransformCatalogEntry
25 : public RDCatalog::CatalogEntry {
26 public:
27 TransformCatalogEntry() : d_descrip("") {
28 dp_props = new Dict();
29 setBitId(-1);
30 }
31
32 ~TransformCatalogEntry() override {
33 delete dp_transform;
34 dp_transform = nullptr;
35 delete dp_props;
36 dp_props = nullptr;
37 }
38
39 // TODO Catalog.h requires a getOrder function
40 unsigned int getOrder() const { return 0; } // dp_mol->getNumBonds(); }
41
42 void toStream(std::ostream &ss) const override;
43 std::string Serialize() const override;
44 void initFromStream(std::istream &ss) override;
45 void initFromString(const std::string &text) override;
46
47 private:
48 ChemicalReaction *dp_transform{nullptr};
49 Dict *dp_props;
50 std::string d_descrip;
51
52}; // class TransformCatalogEntry
53
54} // namespace MolStandardize
55} // namespace RDKit
56
57#endif
CatalogEntry.h
RDKitBase.h
pulls in the core RDKit functionality
Reaction.h
Subgraphs.h
functionality for finding subgraphs and paths in molecules
SubstructMatch.h
TransformCatalogParams.h
RDCatalog::CatalogEntry
Abstract base class to be used to represent an entry in a Catalog.
Definition CatalogEntry.h:19
RDCatalog::CatalogEntry::setBitId
void setBitId(int bid)
sets our bit Id
Definition CatalogEntry.h:24
RDKit::ChemicalReaction
This is a class for storing and applying general chemical reactions.
Definition Reaction.h:121
RDKit::Dict
The Dict class can be used to store objects of arbitrary type keyed by strings.
Definition Dict.h:36
RDKit::MolStandardize::TransformCatalogEntry::~TransformCatalogEntry
~TransformCatalogEntry() override
Definition TransformCatalogEntry.h:32
RDKit::MolStandardize::TransformCatalogEntry::TransformCatalogEntry
TransformCatalogEntry()
Definition TransformCatalogEntry.h:27
RDKit::MolStandardize::TransformCatalogEntry::initFromStream
void initFromStream(std::istream &ss) override
initializes from a stream pickle
RDKit::MolStandardize::TransformCatalogEntry::getOrder
unsigned int getOrder() const
Definition TransformCatalogEntry.h:40
RDKit::MolStandardize::TransformCatalogEntry::Serialize
std::string Serialize() const override
returns a string with a serialized (pickled) representation
RDKit::MolStandardize::TransformCatalogEntry::initFromString
void initFromString(const std::string &text) override
initializes from a string pickle
RDKit::MolStandardize::TransformCatalogEntry::toStream
void toStream(std::ostream &ss) const override
serializes (pickles) to a stream
export.h
RDKIT_MOLSTANDARDIZE_EXPORT
#define RDKIT_MOLSTANDARDIZE_EXPORT
Definition export.h:369
RDKit::MolStandardize
Definition AcidBaseCatalogEntry.h:22
RDKit
Std stuff.
Definition Abbreviations.h:19