def atom_equal(a1, a2):
    """Check if two atoms are equal in terms of symbol and formal charge.

    Parameters
    ----------
    a1 : rdkit.Chem.rdchem.Atom
        An RDKit atom object.
    a2 : rdkit.Chem.rdchem.Atom
        An RDKit atom object.

    Returns
    -------
    bool
        Whether the two atom objects are equivalent.
    """
    return a1.GetSymbol() == a2.GetSymbol() and a1.GetFormalCharge() == a2.GetFormalCharge()