In this review we focus on the determination of phase diagrams by computer simulation with particular attention to the fluid-solid and solid-solid equilibria. The calculation of the free energy of solid phases using the Einstein crystal and Einstein molecule methods are described in detail. It is shown that for the hard spheres solid both methods yield the same results and that free energies of solid phases present noticeable finite size effects. Finite size corrections can be introduced, although in an approximate way, to correct for the dependence of the free energy on the size of the system. The computation of free energies of solid phases can be extended to molecular fluids. The procedure to compute free energies of solid phases of water (ices Ih, II, III, IV, V, VI, VII, VIII, IX, XI and XII) using the SPC/E and TIP4P models will be described.Other methods to estimate the melting point of a solid, as the direct fluid-solid coexistence or simulations of the free surface of the solid will be discussed. It will be shown that the melting points of ice Ih for several water models, obtained from these two methods and from free energy calculations agree within statistical uncertainty. Phase diagram calculations can help to improve potential models of molecular fluids; for water, the TIP4P/2005 model can be regarded as an improved version of TIP4P. We will also review some recent work on the phase diagram of the simplest ionic model, the restricted primitive model. Although originally devised to describe ionic liquids, the model is becoming quite popular to describe charged colloids. Besides the possibility of obtaining fluid-solid equilibria for simple protein models will be discussed. In these primitive models, the protein is described by a spherical potential with certain anisotropic bonding sites. |