RDKit
Open-source cheminformatics and machine learning.
ReCharge.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2016 Novartis Institutes for BioMedical Research
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 #pragma once
12 #include "StructChecker.h"
13 #include "Pattern.h"
14 #include "Utilites.h"
15 
16 namespace RDKit {
17 namespace StructureCheck {
18 /*
19  * Returns the total charge of all atoms in molecule.
20  */
21 int TotalCharge(const ROMol &mol);
22 
24  const StructCheckerOptions &Options;
25  RWMol &Mol;
26  std::vector<unsigned> BondColor;
27  std::vector<unsigned> AtomColor;
28  std::vector<double> AtompKaValue;
29  std::vector<double> AtomOldpKaValue;
30 
31  public:
33  : Options(op), Mol(mol) {
34  resetColors();
35  resetValues();
36  }
37  /*
38  * Removes hydrogens from *mp until desired_charge is reached. The
39  * positions for hydrogen removal are selected by "acidity" combined
40  * with a refinement algorithm. It returns TRUE if molecule could be
41  * neutralized and FALSE if any problem were encountered.
42  * *ndeprot and *nrefine are set to the number of deprotonations
43  * and refinement cycles performed.
44  */
45  bool rechargeMolecule(unsigned &ndeprot, unsigned &nrefine);
46 
47  private: // internal helpers:
48  bool setpKaValues();
49  void decrementMarkedCharges();
50  int markMostAcidicAtoms(double &pKa_value, double &gap);
51  int refineAcidicAtoms(std::vector<unsigned> &numbering);
52  void resetColors();
53  void resetValues();
54 };
55 } // namespace StructureCheck
56 } // namespace RDKit
Utilites.h
RDKit::StructureCheck::StructCheckerOptions
Structure Check Options.
Definition: StructChecker.h:121
RDKit::RWMol
RWMol is a molecule class that is intended to be edited.
Definition: RWMol.h:31
StructChecker.h
Contains the public API of the StructChecker.
Pattern.h
RDKit
Std stuff.
Definition: Atom.h:30
RDKit::StructureCheck::ChargeFix::ChargeFix
ChargeFix(const StructCheckerOptions &op, RWMol &mol)
Definition: ReCharge.h:32
RDKit::StructureCheck::TotalCharge
int TotalCharge(const ROMol &mol)
RDKIT_STRUCTCHECKER_EXPORT
#define RDKIT_STRUCTCHECKER_EXPORT
Definition: export.h:645
RDKit::StructureCheck::ChargeFix
Definition: ReCharge.h:23
export.h