In this work, we utilize a method based on Wang-Landau Monte Carlo sampling for studying the temperature effects of astrophysically relavant molecules. Anharmonic effects, e.g., resonances, overtones, and combination bands, are fully incoportated in this method. The calculated infrared (IR) spectra are consistent with the experimental data measured by National Institute of Standards and Technology (NIST).