Physics-Guided Curve Fitting for Potential-Energy Functions of Diatomic Molecules