On a characterization of flat metrics on 2-torus