A simple method for constructing effective Hamiltonians for the 4fN and
4fN-15d energy levels of lanthanide ions in crystals from quantum-chemical
calculations is presented. The method is demonstrated by deriving crystal-field
and spin-orbit parameters for Ce3+ ions doped in LiYF4, Cs2NaYCl6, CaF2, KY3F10
and YAG host crystals from quantum chemical calculations based on the
DV-X{\alpha} method. Good agreement between calculated and fitted values of the
crystal-field parameters is obtained. The method can be used to calculate
parameters even for low-symmetry sites where there are more parameters than
energy levels