Comparison between the lattice dynamics and molecular dynamics methods: Calculation results for MgSiO3 perovskite