A query on density functional theory (DFT)? I know this is not the best forum to ask this question (but I think it is a pretty good one). 
I have a fundamental confusion regarding DFT. In DFT all the calculations are performed using crystal structures at 0 kelvin, aren't they? 
If yes, then consider the situation when we have a material which undergoes a phase transition at a certain temperature $T_{c}$ > 0 K. So above $T_{c}$ the material has different crystal structure than at 0 K. Now suppose we want to find out a particular property of the material at a temperature $T$ > $T_{c}$. To study the property using DFT we use a DFT code like Quantum Espresso and the crystal structure of the material at 0 K. So my question is :
Why/How is it okay to use the crystal structure at 0 K which is different from the structure of the material at the temperature we are concerned with? (Sorry for the confusing language)
 A: One has to be careful when talking about DFT, in the context of packages like Quantum Espresso or VASP. When people say DFT, what they (typically) refer to is ground-state 'Kohn-Sham DFT'. These calculations are done at 0 K, as you indicated in your question. The bulk of DFT calculations are KS-DFT calculations.
KS-DFT is very popular because these calculations are sufficient to accurately predict ground-state behaviour/electronic properties of many materials, especially in solid-state systems characterized by periodic boundary conditions. Many of the properties predicted can turn out to be robust for the material. However, KS-DFT is in no way shape or form able to predict complex properties like for example, optical behaviour - these typically involve excited states. In that case, you would have to employ methods such as TD-DFT (time-dependent DFT), GW-BSE (Involves many body perturbation theory) etc.
A: When thinking about the ground state of a material you can consider many different degrees of freedom. Of course, the positions of the atomic nuclei belong to these parameters when you are talking about the ground-state crystal structure. But for density functional theory the positions of the nuclei actually are an external parameter. They are treated separately from the electrons and are considered to be fixed: Before deriving density functional theory you perform the Born-Oppenheimer approximation to separate the motion of the nuclei from your considerations. The Hohenberg-Kohn theorem then states that the external potential (which contains the positions of the nuclei) is a functional of the ground-state charge density of the electrons.
This implies that for every possible configuration of atom positions density functional theory has predictive power. For example, this allows you to calculate total energies and forces on the atoms to actually determine the ground-state crystal structure. One can also use experimentally determined crystal structures to calculate with DFT quantities that are not accessible by experiments.
Of course, quantities that show a strong dependence on the temperature of the electronic system can be a problem: On the one hand it is possible to predict the magnetic structure for a given atom configuration, on the other hand the implied temperature of the electronic system for that atom configuration may already lead to a nonmagnetic state because it is higher than the Curie temperature or Néel temperature. For such a situation one can use the results from the DFT calculations as an input to Monte-Carlo simulations to determine the critical temperature based on model assumptions.
So in the end one should always be skeptical about the results of simulations or other calculations. Every calculation implies certain model assumptions and limitations. One should be aware of these. The success of density functional theory is because experience shows that one can obtain good predictions from it for a wide range of materials and many quantities. But that does not mean that it can predict every quantity of every material. And often DFT calculations are only the first step in a calculation because the results have to be refined.
