||The molecular geometries and conformational energies of octahydro-1,3,5,7-tetranitro-1,3,5,7-tetrazocine (HMX) and 1,3-dimethyl-1,3-dinitro methyldiamine (DDMD) and have been determined from high-level quantum chemistry calculations and have been used in parametrizing a classical potential function for simulations of HMX. Geometry optimizations for HMX and DDMD and rotational energy barrier searches for DDMD were performed at the B3LYP/6-311G** level, with subsequent single-point energy calculations at the MP2/6-311G** level. Four unique low-energy conformers were found for HMX, two whose conformational geometries correspond closely to those found in HMX polymorphs from crystallographic studies and two additional, lower energy conformers that are not seen in the crystalline phases. For DDMD, three unique low-energy conformers, and the rotational energy barriers between them, were located. In parametrizing the classical potential function for HMX, nonbonded repulsion/dispersion parameters, valence parameters, and parameters describing nitro group rotation and out-of-plane distortion at the amine nitrogen were taken from our previous studies of dimethylnitramine. Polar effects in HMX and DDMD were represented by sets of partial atomic charges that reproduce the electrostatic potential and dipole moments for the low-energy conformers of these molecules as determined from the quantum chemistry wave functions. Parameters describing conformational energetics for the C?N?C?N dihedrals were determined by fitting the classical potential function to reproduce relative conformational energies in HMX as found from quantum chemistry. The resulting potential was found to give a good representation of the conformer geometries and relative conformer energies in HMX and a reasonable description of the low-energy conformers and rotational energy barriers in DDMD.