3.1.9 GetFormalCharge

virtual int GetFormalCharge() const

Return the formal charge on an atom. The default value is zero. The ``formal charge'' property may be set using the OEAtomBase::SetFormalCharge method. Formal charges may also be set on a molecule using the OEAssignFormalCharges function that infers reasonable formal charges using the atomic number, and implicit hydrogen count for each atom.