On the consistent calculation of lattice dynamics using semiempirical potential functions