On construction of diatomic potential energy functions