Electronic stopping cross sections for atoms and molecules in the gas phase have been evaluated within the independent-particle model for the range of velocities where the first Born approximation is valid for targets with It is shown that in this approximation, the electronic stopping power is expressed as a Bragg sum rule. In the case that the target electron is considered as harmonically bound, the stopping cross section is obtained in an analytical form depending solely on the frequency of the electron. Using the virial theorem, a relation is found between the harmonic oscillator frequency and the electronic properties of the target, such that the stopping power is described in a self-contained way. The results are compared with other theoretical treatments and with available experimental data. For the case of projectiles with structure, I use the results for the effective charge (screening effect) of Cabrera-Trujillo, Cruz, Oddershede, and Sabin [Phys. Rev. A 55, 2864 (1997)]. From the analytical expression for one obtains the shell contributions to the electronic stopping cross section, finding that in this model, shell corrections also come from considering the whole set of allowed excitations in the target with a dependence on the orbital mean excitation energy and the projectile mass.