Calculate phonon density of states

I need to calculate phonon density of states for a cuprate superconductor. I know there is a general formula for the calculation of phonon density of states by Einstein models like this

$$D(\omega)=(\frac L2\pi)^2\int d^2k.$$

I have also found another formula that calculates phonon density of states:

$$D(\omega)=\frac 1N \int\delta(\omega-\omega_j)d\omega.$$

Is there any formula or any method that can calculate phonon density of states for cuprate superconductors directly from the Hamiltonian like with the electronic density of states, which calculates it directly from the Green's functions?