A study of the ground states and ionization energies of H2, C2, N2, F2, and CO molecules by the variational cellular method