RDKit
Open-source cheminformatics and machine learning.
Toggle main menu visibility
Loading...
Searching...
No Matches
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
23
class
RDKIT_STRUCTCHECKER_EXPORT
ChargeFix
{
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
:
32
ChargeFix
(
const
StructCheckerOptions
&op,
RWMol
&mol)
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
Pattern.h
StructChecker.h
Contains the public API of the StructChecker.
Utilites.h
RDKit::ROMol
Definition
ROMol.h:344
RDKit::RWMol
RWMol is a molecule class that is intended to be edited.
Definition
RWMol.h:32
RDKit::StructureCheck::ChargeFix::rechargeMolecule
bool rechargeMolecule(unsigned &ndeprot, unsigned &nrefine)
RDKit::StructureCheck::ChargeFix::ChargeFix
ChargeFix(const StructCheckerOptions &op, RWMol &mol)
Definition
ReCharge.h:32
export.h
RDKIT_STRUCTCHECKER_EXPORT
#define RDKIT_STRUCTCHECKER_EXPORT
Definition
export.h:691
RDKit::StructureCheck
Definition
Pattern.h:16
RDKit::StructureCheck::TotalCharge
int TotalCharge(const ROMol &mol)
RDKit
Std stuff.
Definition
Abbreviations.h:19
RDKit::StructureCheck::StructCheckerOptions
Definition
StructChecker.h:121
GraphMol
StructChecker
ReCharge.h
Generated on
for RDKit by
1.17.0