OBGastChrg Class Reference

Assigns Gasteiger partial charges. More...

#include <openbabel/molchrg.h>

List of all members.

Public Member Functions

 OBGastChrg ()
 ~OBGastChrg ()
bool AssignPartialCharges (OBMol &)
void GSVResize (int)

Detailed Description

Assigns Gasteiger partial charges.

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;

    FOR_ATOMS_IN_MOL(atom, mol)
       cout << "atom number = " << atom->GetIdx();
       cout << " charge = " << atom->GetPartialCharge() << endl;
Formal charges are used as seed values of the initial charge of atoms, and the partial charge is propagated to neighboring atoms. For example, quaternary amines would have a +1 charge, and the effect of the positive charge would be felt by neighboring atoms according to the Gasteiger model (sigma).

For more information, see: J. Gasteiger & M. Marsili, "A New Model for Calculating Atomic Charges in Molecules" Tetrahedron Lett., (1978) 3181-3184.

Constructor & Destructor Documentation

OBGastChrg (  )  [inline]

~OBGastChrg (  ) 

Member Function Documentation

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().

The documentation for this class was generated from the following files: