The molecular-statics method and the Gourary-Adrian approach are used to calculate the displacements of the lattice ions nearest to the F center in alkali halide crystals with NaCl and CsCl structures (altogether, twenty crystals). The calculations are performed for the 1s and 2p states of the F-center electron with allowance for the angular dependence of the Coulomb potential created by the electron in the 2p state. The absorption and emission energies of the F center are calculated. The calculated energies agree qualitatively with experiment and reproduce the experimentally found tendencies of changes in these energies when going from one crystal to another.