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
16#include <GraphMol/RDKitBase.h>
17#include <string>
18#include <vector>
19
20namespace RDKit {
21class ROMol;
22
23namespace MolStandardize {
26 public:
28 d_typeStr = "Fragment Catalog Parameters";
29 d_funcGroups.clear();
30 }
31
32 FragmentCatalogParams(const std::string &fgroupFile);
33 FragmentCatalogParams(std::istream &fgroupStream);
35 const std::vector<std::pair<std::string, std::string>> &data);
36 // copy constructor
38
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
pulls in the core RDKit functionality
abstract base class for the container used to create a catalog
std::string d_typeStr
our type string
std::string Serialize() const override
returns a string with a serialized (pickled) representation
FragmentCatalogParams(const std::vector< std::pair< std::string, std::string > > &data)
void initFromString(const std::string &text) override
initializes from a string pickle
FragmentCatalogParams(const std::string &fgroupFile)
const ROMol * getFuncGroup(unsigned int fid) const
void toStream(std::ostream &) const override
serializes (pickles) to a stream
const std::vector< std::shared_ptr< ROMol > > & getFuncGroups() const
FragmentCatalogParams(std::istream &fgroupStream)
void initFromStream(std::istream &ss) override
initializes from a stream pickle
FragmentCatalogParams(const FragmentCatalogParams &other)
#define RDKIT_MOLSTANDARDIZE_EXPORT
Definition export.h:369
Std stuff.