RDKit: AcidBaseCatalogParams.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
AcidBaseCatalogParams.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_ACIDBASE_CATALOG_PARAMS_H
12#define RD_ACIDBASE_CATALOG_PARAMS_H
13
14#include <Catalogs/CatalogParams.h>
15#include "AcidBaseCatalogUtils.h"
16#include <GraphMol/RDKitBase.h>
17#include <string>
18#include <vector>
19
20namespace RDKit {
21class ROMol;
22
23namespace MolStandardize {
24 class RDKIT_MOLSTANDARDIZE_EXPORT AcidBaseCatalogParams
25 : public RDCatalog::CatalogParams {
26 public:
27 AcidBaseCatalogParams() {
28 d_typeStr = "AcidBase Catalog Parameters";
29 d_pairs.clear();
30 }
31
32 AcidBaseCatalogParams(const std::string &acidBaseFile);
33 AcidBaseCatalogParams(std::istream &acidBaseFile);
34 AcidBaseCatalogParams(
35 const std::vector<std::tuple<std::string, std::string, std::string>>
36 &data);
37
38 // copy constructor
39 AcidBaseCatalogParams(const AcidBaseCatalogParams &other);
40
41 ~AcidBaseCatalogParams() override;
42
43 unsigned int getNumPairs() const {
44 return static_cast<unsigned int>(d_pairs.size());
45 }
46
47 const std::vector<std::pair<ROMOL_SPTR, ROMOL_SPTR>> &getPairs() const;
48
49 const std::pair<ROMOL_SPTR, ROMOL_SPTR> getPair(unsigned int fid) const;
50
51 void toStream(std::ostream &) const override;
52 std::string Serialize() const override;
53 void initFromStream(std::istream &ss) override;
54 void initFromString(const std::string &text) override;
55
56 private:
57 std::vector<std::pair<ROMOL_SPTR, ROMOL_SPTR>> d_pairs;
58
59}; // class AcidBaseCatalogParams
60
61} // namespace MolStandardize
62} // namespace RDKit
63
64#endif
AcidBaseCatalogUtils.h
CatalogParams.h
RDKitBase.h
pulls in the core RDKit functionality
RDCatalog::CatalogParams
abstract base class for the container used to create a catalog
Definition CatalogParams.h:18
RDCatalog::CatalogParams::d_typeStr
std::string d_typeStr
our type string
Definition CatalogParams.h:38
RDKit::MolStandardize::AcidBaseCatalogParams::getPairs
const std::vector< std::pair< ROMOL_SPTR, ROMOL_SPTR > > & getPairs() const
RDKit::MolStandardize::AcidBaseCatalogParams::AcidBaseCatalogParams
AcidBaseCatalogParams(std::istream &acidBaseFile)
RDKit::MolStandardize::AcidBaseCatalogParams::Serialize
std::string Serialize() const override
returns a string with a serialized (pickled) representation
RDKit::MolStandardize::AcidBaseCatalogParams::AcidBaseCatalogParams
AcidBaseCatalogParams(const std::string &acidBaseFile)
RDKit::MolStandardize::AcidBaseCatalogParams::AcidBaseCatalogParams
AcidBaseCatalogParams(const std::vector< std::tuple< std::string, std::string, std::string > > &data)
RDKit::MolStandardize::AcidBaseCatalogParams::AcidBaseCatalogParams
AcidBaseCatalogParams()
Definition AcidBaseCatalogParams.h:27
RDKit::MolStandardize::AcidBaseCatalogParams::getPair
const std::pair< ROMOL_SPTR, ROMOL_SPTR > getPair(unsigned int fid) const
RDKit::MolStandardize::AcidBaseCatalogParams::AcidBaseCatalogParams
AcidBaseCatalogParams(const AcidBaseCatalogParams &other)
RDKit::MolStandardize::AcidBaseCatalogParams::initFromStream
void initFromStream(std::istream &ss) override
initializes from a stream pickle
RDKit::MolStandardize::AcidBaseCatalogParams::getNumPairs
unsigned int getNumPairs() const
Definition AcidBaseCatalogParams.h:43
RDKit::MolStandardize::AcidBaseCatalogParams::toStream
void toStream(std::ostream &) const override
serializes (pickles) to a stream
RDKit::MolStandardize::AcidBaseCatalogParams::initFromString
void initFromString(const std::string &text) override
initializes from a string pickle
RDKit::MolStandardize::AcidBaseCatalogParams::~AcidBaseCatalogParams
~AcidBaseCatalogParams() override
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