The class I proteins of the major histocompatibility complex (MHC-I) display epitopic peptides derived from endogenous proteins on the cell surface for immune surveillance. Accurate modeling of peptides bound to the human MHC, HLA, has been mired by conformational diversity of the central peptide residues, which are critical for recognition by T cell receptors. Here, analysis of X-ray crystal structures within our curated database (HLA3DB) shows that pHLA complexes encompassing multiple HLA allotypes present a discrete set of peptide backbone conformations. Leveraging these backbones, we employ a regression model trained on terms of a physically relevant energy function to develop a comparative modeling approach for nonamer pHLA structures named RepPred. Our method outperforms the top pHLA modeling approach by up to 19% in structural accuracy, and consistently predicts blind targets not included in our training set. Insights from our work may be applied towards predicting antigen immunogenicity, and receptor cross-reactivity.