Increasing the accuracy of quantum-mechanical simulations for strongly correlated functional materials by designing effective Hamiltonians