  We present a new method of conducting molecular dynamics simulation in
isothermal-isobaric ensemble based on Langevin equations of motion. The
stochastic coupling to all particle and cell degrees of freedoms is introduced
in a correct way, in the sense that the stationary configurational distribution
is proved to be in consistent with that of the isothermal-isobaric ensemble. In
order to apply the proposed method in computer simulations, a second order
symmetric numerical integration scheme is developed by Trotter's splitting of
the single-step propagator. Moreover, a practical guide of choosing working
parameters is suggested for user specified thermo- and baro-coupling
time-scales. The method and software implementation are carefully validated by
a numerical example.
