Ab initio lattice dynamics of complex structures: Computational design of novel materials for hydrogen storage