  We present a general framework for deriving effective spin Hamiltonians of
correlated magnetic systems based on a combination of relativistic ab initio
density functional theory calculations (DFT), exact diagonalization of a
generalized Hubbard Hamiltonian on finite clusters and spin projections onto
the low-energy subspace. A key motivation is to determine anisotropic bilinear
exchange couplings in materials of interest. As an example, we apply this
method to the pyrochlore Lu$_2$V$_2$O$_7$ where the vanadium ions form a
lattice of corner-sharing spin-1/2 tetrahedra. In this compound, anisotropic
Dzyaloshinskii-Moriya interactions (DMI) play an essential role in inducing a
magnon Hall effect. We obtain quantitative estimates of the nearest-neighbor
Heisenberg exchange, the DMI, and the symmetric part of the anisotropic
exchange tensor. Finally, we compare our results with experimental ones on the
Lu$_2$V$_2$O$_7$ compound.
