We have theoretically investigated, by ab initio techniques, the phonon properties of several semiconductors with chalcopyrite structure. Comparison with experiments has led us to distinguish between materials with d electrons in the valence band (e.g., CuGaS 2 , AgGaS 2 ) and those without d electrons (e.g., ZnSnAs 2 ). The former exhibit a rather peculiar nonmonotonic temperature dependence of the energy gap which, so far, has resisted cogent theoretical description. We analyze this nonmonotonic temperature dependence by fitting two Bose-Einstein oscillators with weights of opposite sign leading to an increase at low temperatures and a decrease at higher temperatures and find that the energy of the former correlates well with characteristic peaks in the phonon density of states associated with low-energy vibrations of the d-electron elements. We hope that this work will encourage theoretical investigations of the electron-phonon interaction in this direction, especially of the current ab initio type.