RDKit: FragmentCatalogEntry.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
FragmentCatalogEntry.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_FRAGMENT_CATALOG_ENTRY_H__
12#define __RD_FRAGMENT_CATALOG_ENTRY_H__
13
14#include <Catalogs/CatalogEntry.h>
15#include <GraphMol/Subgraphs/Subgraphs.h>
16#include <GraphMol/Substruct/SubstructMatch.h>
17#include "FragmentCatalogParams.h"
18#include <GraphMol/RDKitBase.h>
19
20namespace RDKit {
21namespace MolStandardize {
22
23 class RDKIT_MOLSTANDARDIZE_EXPORT FragmentCatalogEntry
24 : public RDCatalog::CatalogEntry {
25 public:
26 FragmentCatalogEntry() : d_descrip("") {
27 dp_props = new Dict();
28 setBitId(-1);
29 }
30
31 // FragmentCatalogEntry(const ROMol *omol, const PATH_TYPE &path);
32 // FragmentCatalogEntry(const std::string &pickle);
33
34 ~FragmentCatalogEntry() override {
35 delete dp_mol;
36 dp_mol = nullptr;
37 delete dp_props;
38 dp_props = nullptr;
39 }
40
41 // std::string getDescription() const override { return d_descrip; }
42
43 unsigned int getOrder() const { return dp_mol->getNumBonds(); }
44
45 void toStream(std::ostream &ss) const override;
46 std::string Serialize() const override;
47 void initFromStream(std::istream &ss) override;
48 void initFromString(const std::string &text) override;
49
50 private:
51 ROMol *dp_mol{nullptr};
52 Dict *dp_props;
53 std::string d_descrip;
54
55}; // class FragmentCatalogEntry
56
57} // namespace MolStandardize
58} // namespace RDKit
59
60#endif
CatalogEntry.h
FragmentCatalogParams.h
RDKitBase.h
pulls in the core RDKit functionality
Subgraphs.h
functionality for finding subgraphs and paths in molecules
SubstructMatch.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::Dict
The Dict class can be used to store objects of arbitrary type keyed by strings.
Definition Dict.h:36
RDKit::MolStandardize::FragmentCatalogEntry::Serialize
std::string Serialize() const override
returns a string with a serialized (pickled) representation
RDKit::MolStandardize::FragmentCatalogEntry::initFromString
void initFromString(const std::string &text) override
initializes from a string pickle
RDKit::MolStandardize::FragmentCatalogEntry::getOrder
unsigned int getOrder() const
Definition FragmentCatalogEntry.h:43
RDKit::MolStandardize::FragmentCatalogEntry::FragmentCatalogEntry
FragmentCatalogEntry()
Definition FragmentCatalogEntry.h:26
RDKit::MolStandardize::FragmentCatalogEntry::initFromStream
void initFromStream(std::istream &ss) override
initializes from a stream pickle
RDKit::MolStandardize::FragmentCatalogEntry::toStream
void toStream(std::ostream &ss) const override
serializes (pickles) to a stream
RDKit::MolStandardize::FragmentCatalogEntry::~FragmentCatalogEntry
~FragmentCatalogEntry() override
Definition FragmentCatalogEntry.h:34
RDKit::ROMol
Definition ROMol.h:199
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