  We study the temperature and pressure dependence of the structural and
electronic properties of the iron pnictide superconductor BaFe2As2. We use
density functional theory based Born-Oppenheimer molecular dynamics simulations
to investigate the system at temperatures from T=5 K to 150 K and pressures
from P=0 GPa to 30 GPa. When increasing the pressure at low temperature, we
find the two transitions from an orthorhombic to a tetragonal and to a
collapsed tetragonal structure that are also observed in zero temperature
structure relaxations and in experiment. However, these transitions are
considerably smeared out at finite temperature, whereas the critical pressure
for the first transition increases with temperature. We also analyze the
electronic structure of BaFe2As2 at finite temperature and work out differences
between the time averaged band structure and Fermi surface at finite
temperature compared to the known zero temperature results. Our results should
be helpful for resolving some open issues in experimental reports for BaFe2As2
under high pressure.
