To assign Marsilli-Gasteiger partial charges to a molecule, OEChem
provides the OEGasteigerPartialCharges
function. This sets
the partial charge property of each atom, using the
OEAtomBase::SetPartialCharge
method. The algorithm itself
reproduces the partial charges as calculated by Tripos Inc's Sybyl
software, with default parameter settings, which is the de facto
reference implementation for Gasteiger charges.
The Gasteiger partial charge algorithm currently assumes that all
hydrogen atoms are represented explicitly, for example by calling
OEAddExplicitHydrogens
.
The current version of OEGasteigerPartialCharges
should return
the same results independent of the currently assigned aromaticity
models and the values of each atom's "integer atom type" property.
Early versions of OEChem allowed customization of the Gasteiger
charge calculation by explicitly assigning the Tripos atoms types
of each atom of the molecule. Unfortunately, this required assigning
Tripos' aromaticity and assigning Tripos atom types before each
call to OEGasteigerPartialCharges
. The more recent behavior
is less error-prone (as it's no longer possible to forget to prepare
a molecule) and greatly simplifies common usage.
The first stage of the Marsilli-Gasteiger ``Partial Equalization of
Orbital Electronegativities (PEOE)'' calculation is assignment of
seed charges to each atoms. Typically for neutral atoms the partial
charges is seeded zero, but for example, each oxygen in a carboxylate
is assigned -0.5, and the net formal charge on conjugated rings is
shared equally amongst the atoms of the ring system. These seed
charges may also be useful in some applications, and can be assigned
using the OEGasteigerInitialCharges
method.