OEAssignFormalCharges
OEAssignFormalCharges(atm: OEAtomBase) -> None
Sets the formal charge property of an atom, based upon a OpenEye valence model. This function assumes that the bond orders and implicit hydrogen counts have been set on a molecule. For example, this function will place a single positive charge on a neutral four-valent nitrogen. Note that this function only modifies neutral atoms, with zero formal charge. This preserves any formal charges previously assigned, but requires the charge to be reset to zero in order to force a reassignment.
The assigned formal charge can be accessed by the
OEAtomBase.GetFormalCharge method
OEAssignFormalCharges(mol: Union[OEGraphMol,OEMol,OEQMol]) -> None
Sets the formal charge property of each atom in the molecule by
by calling OEAssignFormalCharges(OEAtomBase *)
function.
The assigned formal charge can be accessed by the
OEAtomBase.GetFormalCharge method.
See also
OpenEye Valence Model section
OEAssignImplicitHydrogensfunction