Using the deMon density functional program, we calculated 150 points on the potential-energy surface for the ground electronic state (X1SIGMA+) of the HCP molecule. An analytical function was fitted through these points and used in two different computer programs (called TRIATOM and DVR) to calculate the vibration-rotational energies of the HCP and DCP molecules. The computed vibrational fundamentals of nu1, nu2, and nu3 for HCP (DCP) are 3134 (2365), 654 (509), and 1269 (1227) cm-1, respectively, in good agreement with the observed values of 3217 (2419), 675 (525), and 1278 (1231) cm-1. The calculated vibrational energies of HCP show a pronounced regularity, in accordance with the observed harmonic-vibrational characteristic of the molecule concerned. The average energy deviation of the computed vibration-rotational energies of HCP up to 8200 cm-1 from the 58 corresponding observations is 90 +/- 32 cm-1, thus demonstrating the deMon potential-energy function to be of good quality.