def remove_cations(SMILES):
    """
    Removes periodic table group 1 and 7 counterions from the SMILES
        strings.

    Args:
    -----
        SMILES (str) -- the SMILES string representation of the
            molecule.

    Returns:
    --------
        SMILES (str) -- the string representation of the molecule with
            the counterions omitted.
    """
    # Assertions
    assert isinstance(SMILES, str), 'the SMILES must be a string'
    # Functionality
    split_SMILES = SMILES.split(".")
    ion_list = ['[Li+]', '[Na+]', '[K+]', '[Rb+]', '[Cs+]', '[Fr+]', '[F-]',
                '[Cl-]', '[Br-]', '[I-]', '[At-]']
    SMILES = [i for i in split_SMILES if i not in ion_list]
    SMILES = '.'.join(SMILES)

    return SMILES