Nuclear quadrupole coupling in ionic molecules