RDKit
Open-source cheminformatics and machine learning.
TautomerCatalogUtils.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_TAUTOMER_CATALOG_UTILS_H__
12 #define __RD_TAUTOMER_CATALOG_UTILS_H__
13 
14 #include <GraphMol/RDKitBase.h>
15 #include "TautomerCatalogParams.h"
18 #include <GraphMol/Bond.h>
19 #include <iostream>
20 
21 namespace RDKit {
22 class ROMol;
23 
24 namespace MolStandardize {
25 class TautomerCatalogParams;
26 
27 // typedef enum {
28 // SINGLE,
29 // DOUBLE,
30 // TRIPLE,
31 // AROMATIC,
32 //} BondType;
33 
34 // typedef std::vector<ROMol*, std::string, std::string> tautomerTransform;
36  public:
38  std::vector<Bond::BondType> BondTypes;
39  std::vector<int> Charges;
40 
41  TautomerTransform(ROMol* mol, const std::vector<Bond::BondType>& bondtypes,
42  const std::vector<int>& charges)
43  : Mol(mol), BondTypes(bondtypes), Charges(charges) {}
44 
46  : BondTypes(other.BondTypes), Charges(other.Charges) {
47  Mol = new ROMol(*other.Mol);
48  }
49 
51  if (this != &other) {
52  Mol = new ROMol(*other.Mol);
53  BondTypes = other.BondTypes;
54  Charges = other.Charges;
55  }
56  return *this;
57  };
58 
59  ~TautomerTransform() { delete Mol; }
60 };
61 
62 RDKIT_MOLSTANDARDIZE_EXPORT std::vector<Bond::BondType> stringToBondType(
63  std::string bond_str);
65  std::string charge_str);
66 
67 RDKIT_MOLSTANDARDIZE_EXPORT std::vector<TautomerTransform> readTautomers(
68  std::string fileName);
69 RDKIT_MOLSTANDARDIZE_EXPORT std::vector<TautomerTransform> readTautomers(
70  std::istream& inStream, int nToRead = -1);
71 
72 } // namespace MolStandardize
73 } // namespace RDKit
74 
75 #endif
RDKit::MolStandardize::TautomerTransform::~TautomerTransform
~TautomerTransform()
Definition: TautomerCatalogUtils.h:59
RDKit::MolStandardize::TautomerTransform::TautomerTransform
TautomerTransform(const TautomerTransform &other)
Definition: TautomerCatalogUtils.h:45
RDKit::MolStandardize::stringToCharge
RDKIT_MOLSTANDARDIZE_EXPORT std::vector< int > stringToCharge(std::string charge_str)
RDKit::MolStandardize::readTautomers
RDKIT_MOLSTANDARDIZE_EXPORT std::vector< TautomerTransform > readTautomers(std::string fileName)
Bond.h
RDKit::MolStandardize::TautomerTransform::Mol
ROMol * Mol
Definition: TautomerCatalogUtils.h:37
RDKit::MolStandardize::stringToBondType
RDKIT_MOLSTANDARDIZE_EXPORT std::vector< Bond::BondType > stringToBondType(std::string bond_str)
RDKit::MolStandardize::TautomerTransform
Definition: TautomerCatalogUtils.h:35
TautomerCatalogParams.h
RDKit::ROMol
Definition: ROMol.h:171
RDKitBase.h
pulls in the core RDKit functionality
Reaction.h
RDKit
Std stuff.
Definition: Atom.h:30
RDKit::MolStandardize::TautomerTransform::operator=
TautomerTransform & operator=(const TautomerTransform &other)
Definition: TautomerCatalogUtils.h:50
RDKit::MolStandardize::TautomerTransform::Charges
std::vector< int > Charges
Definition: TautomerCatalogUtils.h:39
RDKit::MolStandardize::TautomerTransform::TautomerTransform
TautomerTransform(ROMol *mol, const std::vector< Bond::BondType > &bondtypes, const std::vector< int > &charges)
Definition: TautomerCatalogUtils.h:41
RDKIT_MOLSTANDARDIZE_EXPORT
#define RDKIT_MOLSTANDARDIZE_EXPORT
Definition: export.h:437
RDKit::MolStandardize::TautomerTransform::BondTypes
std::vector< Bond::BondType > BondTypes
Definition: TautomerCatalogUtils.h:38
SubstructMatch.h
export.h