28.2.1 The OpenEye Charge Model

The OpenEye formal charge model assigns formal charges to elements based upon their total valence. In OEChem, this functionality is invoked by the OEAssignFormalCharges function. If the formal charge on an atom is non-zero, it is left unchanged.

Hydrogen
If the valence isn't one, the formal charge is +1.

Boron
If the valence is four, the formal charge is +1.

Carbon
If the valence is three, the formal charge is +1 if the atom has a polar neighbor, i.e. N, O or S, and formal charge -1 otherwise.

Nitrogen
If the valence is two, the formal charge is -1, and if the valence is four the formal charge is +1.

Oxygen
If the valence is one, the formal charge is -1, and if the valence is three the formal charge is +1.

Phosphorous
If the valence is four, the formal charge is +1.

Sulfur
If the valence is 1, the formal charge is -1, if the valence is three the formal charge is +1, if the valence is 5, the formal charge is -1, if the valence is four and the degree is four the charge is +2.

Chlorine
If the valence is 0 the formal charge is -1, if the valence is four the formal charge is +3.

Fluorine, Bromine, Iodine
If the valence is zero, the formal charge is -1.

Magnesium, Calcium, Zinc
If the valence is zero, the formal charge is +2.

Lithium, Sodium, Potassium
If the valence is zero, the formal charge is +1.

Iron
If the valence is zero, the formal charge is +3 if the partial charge is 3.0, and +2 otherwise.

Copper
If the valence is zero, the formal charge is +2 if the partial charge is 2.0, and +1 otherwise.

For the remaining elements, if the valence of an atom is zero, its formal charge is set from its partial charge.