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 
60  ~TautomerTransform() { delete Mol; }
61 };
62 
63 RDKIT_MOLSTANDARDIZE_EXPORT std::vector<Bond::BondType> stringToBondType(
64  std::string bond_str);
66  std::string charge_str);
67 
68 RDKIT_MOLSTANDARDIZE_EXPORT std::vector<TautomerTransform> readTautomers(
69  std::string fileName);
70 RDKIT_MOLSTANDARDIZE_EXPORT std::vector<TautomerTransform> readTautomers(
71  std::istream& inStream, int nToRead = -1);
72 
73 } // namespace MolStandardize
74 } // namespace RDKit
75 
76 #endif
std::vector< Bond::BondType > BondTypes
RDKIT_MOLSTANDARDIZE_EXPORT std::vector< TautomerTransform > readTautomers(std::string fileName)
RDKIT_MOLSTANDARDIZE_EXPORT std::vector< Bond::BondType > stringToBondType(std::string bond_str)
TautomerTransform(ROMol *mol, const std::vector< Bond::BondType > &bondtypes, const std::vector< int > &charges)
pulls in the core RDKit functionality
Std stuff.
Definition: Atom.h:30
TautomerTransform & operator=(const TautomerTransform &other)
TautomerTransform(const TautomerTransform &other)
#define RDKIT_MOLSTANDARDIZE_EXPORT
Definition: export.h:437
RDKIT_MOLSTANDARDIZE_EXPORT std::vector< int > stringToCharge(std::string charge_str)