Statistical Mechanics of Linear Molecules. I. Potential Energy Functions