#include <openbabel/molchrg.h>
Public Member Functions | |
OBGastChrg () | |
~OBGastChrg () | |
bool | AssignPartialCharges (OBMol &) |
void | GSVResize (int) |
The OBGastChrg class is responsible for the assignment of partial charges to a molecule according to the Gasteiger charge model (sigma). When the partial charge of an atom is requested and partial charges do not yet exist for the molecule the OBGastChrg class will automatically be called to assign charges for the molecule. If charges have been read in for a molecule the following code shows how to force the recalculation of partial charges:
OBMol mol; mol.UnsetPartialChargesPerceived(); FOR_ATOMS_IN_MOL(atom, mol) { cout << "atom number = " << atom->GetIdx(); cout << " charge = " << atom->GetPartialCharge() << endl; }
For more information, see: J. Gasteiger & M. Marsili, "A New Model for Calculating Atomic Charges in Molecules" Tetrahedron Lett., (1978) 3181-3184.
OBGastChrg | ( | ) | [inline] |
~OBGastChrg | ( | ) |
bool AssignPartialCharges | ( | OBMol & | mol | ) |
Assign partial charges to this OBMol, setting each OBAtom partial charge.
Referenced by OBAtom::GetPartialCharge().
void GSVResize | ( | int | size | ) |
Resize the internal GasteigerState vector to match the size of the molecule.
Referenced by OBGastChrg::AssignPartialCharges().