biotite.structure.partial_charges(atom_array, iteration_step_num=6, charges=None)[source]

Compute the partial charge of the individual atoms comprised in a given AtomArray depending on their electronegativity.

This function implements the partial equalization of orbital electronegativity (PEOE) algorithm 1.

atom_array: AtomArray, shape=(n,)

The AtomArray to get the partial charge values for. Must have an associated BondList.

iteration_step_num: int, optional

The number of iteration steps is an optional argument and can be chosen by the user depending on the desired precision of the result. If no value is entered by the user, the default value 6 will be used. Gasteiger and Marsili described this number as sufficient.

charges: ndarray, dtype=int, optional

The array comprising the formal charges of the atoms in the input atom_array. If none is given, the charge annotation category of the input atom_array is used. If neither of them is given, the formal charges of all atoms will be arbitrarily set to zero.

charges: ndarray, dtype=float32

The partial charge values of the individual atoms in the input atom_array.


A BondList must be associated to the input AtomArray. Otherwise, an error will be raised. Example:

atom_array.bonds = struc.connect_via_residue_names(atom_array)

For the electronegativity of positively charged hydrogen, the value of 20.02 eV is used.

Also note that the algorithm used in this function does not deliver proper results for expanded pi-electron systems like aromatic rings.



J. Gasteiger, M. Marsili, “Iterative partial equalization of orbital electronegativity—a rapid access to atomic charges,” Tetrahedron, vol. 36, pp. 3219–3228, January 1980. doi: 10.1016/0040-4020(80)80168-2


>>> fluoromethane = residue("CF0")
>>> print(fluoromethane.atom_name)
['C1' 'F1' 'H1' 'H2' 'H3']
>>> print(partial_charges(fluoromethane, iteration_step_num=1))
[ 0.115 -0.175  0.020  0.020  0.020]
>>> print(partial_charges(fluoromethane, iteration_step_num=6))
[ 0.079 -0.253  0.058  0.058  0.058]