RDKit: FragmentCatalogParams.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
FragmentCatalogParams.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_FRAGMENT_CATALOG_PARAMS_H
12#define RD_FRAGMENT_CATALOG_PARAMS_H
13
14#include <Catalogs/CatalogParams.h>
15#include "FragmentCatalogUtils.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 FragmentCatalogParams
25 : public RDCatalog::CatalogParams {
26 public:
27 FragmentCatalogParams() {
28 d_typeStr = "Fragment Catalog Parameters";
29 d_funcGroups.clear();
30 }
31
32 FragmentCatalogParams(const std::string &fgroupFile);
33 FragmentCatalogParams(std::istream &fgroupStream);
34 FragmentCatalogParams(
35 const std::vector<std::pair<std::string, std::string>> &data);
36 // copy constructor
37 FragmentCatalogParams(const FragmentCatalogParams &other);
38
39 ~FragmentCatalogParams() override;
40
41 unsigned int getNumFuncGroups() const {
42 return static_cast<unsigned int>(d_funcGroups.size());
43 }
44
45 const std::vector<std::shared_ptr<ROMol>> &getFuncGroups() const;
46
47 const ROMol *getFuncGroup(unsigned int fid) const;
48
49 void toStream(std::ostream &) const override;
50 std::string Serialize() const override;
51 void initFromStream(std::istream &ss) override;
52 void initFromString(const std::string &text) override;
53
54 private:
55 std::vector<std::shared_ptr<ROMol>> d_funcGroups;
56
57}; // class FragmentCatalogParams
58
59} // namespace MolStandardize
60} // namespace RDKit
61
62#endif
CatalogParams.h
FragmentCatalogUtils.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::FragmentCatalogParams::Serialize
std::string Serialize() const override
returns a string with a serialized (pickled) representation
RDKit::MolStandardize::FragmentCatalogParams::FragmentCatalogParams
FragmentCatalogParams(const std::vector< std::pair< std::string, std::string > > &data)
RDKit::MolStandardize::FragmentCatalogParams::initFromString
void initFromString(const std::string &text) override
initializes from a string pickle
RDKit::MolStandardize::FragmentCatalogParams::FragmentCatalogParams
FragmentCatalogParams(const std::string &fgroupFile)
RDKit::MolStandardize::FragmentCatalogParams::getFuncGroup
const ROMol * getFuncGroup(unsigned int fid) const
RDKit::MolStandardize::FragmentCatalogParams::toStream
void toStream(std::ostream &) const override
serializes (pickles) to a stream
RDKit::MolStandardize::FragmentCatalogParams::getFuncGroups
const std::vector< std::shared_ptr< ROMol > > & getFuncGroups() const
RDKit::MolStandardize::FragmentCatalogParams::getNumFuncGroups
unsigned int getNumFuncGroups() const
Definition FragmentCatalogParams.h:41
RDKit::MolStandardize::FragmentCatalogParams::FragmentCatalogParams
FragmentCatalogParams()
Definition FragmentCatalogParams.h:27
RDKit::MolStandardize::FragmentCatalogParams::FragmentCatalogParams
FragmentCatalogParams(std::istream &fgroupStream)
RDKit::MolStandardize::FragmentCatalogParams::~FragmentCatalogParams
~FragmentCatalogParams() override
RDKit::MolStandardize::FragmentCatalogParams::initFromStream
void initFromStream(std::istream &ss) override
initializes from a stream pickle
RDKit::MolStandardize::FragmentCatalogParams::FragmentCatalogParams
FragmentCatalogParams(const FragmentCatalogParams &other)
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