Reconstructing tight-binding hamiltonian