Assign aromatic ring
    sp2 atom:
    pi=1 -> +1
    N, O, S, C- -> +2
    >C=O, B, C+ -> 0
    sp3 atom -> not aromatic
    sum of the score satisfies 4n+2 -> aromatic

def assign_aromatic(mol):
    """Assign aromatic ring
    sp2 atom:
    pi=1 -> +1
    N, O, S, C- -> +2
    >C=O, B, C+ -> 0
    sp3 atom -> not aromatic
    sum of the score satisfies 4n+2 -> aromatic
    """
    mol.require("Valence")
    mol.require("MinifiedRing")
    for ring in mol.rings:
        pi_cnt = 0
        for r in ring:
            if mol.atom(r).pi == 0:
                if mol.atom(r).symbol == "C":
                    if mol.atom(r).charge == 1:
                        pass
                    elif mol.atom(r).charge == -1:
                        pi_cnt += 2
                    else:
                        break
                elif mol.atom(r).charge == 0:
                    if mol.atom(r).symbol in ("N", "O", "S"):
                        pi_cnt += 2
                    elif mol.atom(r).symbol == "B":
                        pass
                    else:
                        break
                else:
                    break
            elif mol.atom(r).pi == 1:
                if mol.atom(r).carbonyl_C:
                    pass
                else:
                    pi_cnt += 1
            else:
                break
        else:
            if pi_cnt % 4 == 2:
                for u, v in iterator.consecutive(ring + [ring[0]], 2):
                    mol.atom(u).aromatic = True
                    mol.bond(u, v).aromatic = True
    mol.descriptors.add("Aromatic")