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#include <iostream>
20
21namespace RDKit {
22class ROMol;
23
24namespace MolStandardize {
27 public:
29 d_typeStr = "Fragment Catalog Parameters";
30 d_funcGroups.clear();
31 }
32
33 FragmentCatalogParams(const std::string &fgroupFile);
34 FragmentCatalogParams(std::istream &fgroupStream);
36 const std::vector<std::pair<std::string, std::string>> &data);
37 // copy constructor
39
41
42 unsigned int getNumFuncGroups() const {
43 return static_cast<unsigned int>(d_funcGroups.size());
44 }
45
46 const std::vector<std::shared_ptr<ROMol>> &getFuncGroups() const;
47
48 const ROMol *getFuncGroup(unsigned int fid) const;
49
50 void toStream(std::ostream &) const override;
51 std::string Serialize() const override;
52 void initFromStream(std::istream &ss) override;
53 void initFromString(const std::string &text) override;
54
55 private:
56 std::vector<std::shared_ptr<ROMol>> d_funcGroups;
57
58}; // class FragmentCatalogParams
59
60} // namespace MolStandardize
61} // namespace RDKit
62
63#endif
pulls in the core RDKit functionality
abstract base class for the container used to create a catalog
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:337
Std stuff.