  A methodology to sample the isothermal-isobaric ensemble using Langevin
dynamics is proposed, which combines novel features of geometric integrators
for the equations of motion. By employing the Trotter expansion, the
methodology generates a robust, symmetric and accurate numerical algorithm. In
order to show that the proposed method correctly samples the phase-space,
simulations in the isotropic NPT ensemble were carried out for two analytical
examples. Also this method permits to study a solid-solid phase transition, by
conducting a fully flexible-cell molecular dynamics simulation. Additionally,
we present an efficient method to determine the Gibbs free energy in a wide
interval of pressure along an isothermal path, which allows us to determine the
transition pressure in a driven by pressure solid-solid phase transition. Our
calculations show that the methodology is highly suitable for the study of
phase diagram of crystalline solids.
