Identifying ions in a solution