Modeling the phase diagram of carbon.