Complementary molecular-dynamics and Metropolis Monte Carlo algorithms
for the atomistic simulation of crystals with imposed laboratory cond
itions of temperature and tensorial pressure are presented. Inclusion
of the nonlinear expression for the elastic energy of a crystal yields
simulations that conserve the Gibbs potential of the crystal despite
finite deformations. The molecular-dynamics equations of motion contai
n an explicit expression of the virial theorem for nonlinear elastic m
edia; the dynamical balance of the ''internal'' and ''external'' press
ures includes the elastic response of the system to the applied stress
. Thus the ''internal'' and ''external'' pressures remain in dynamical
equilibrium even when the microscopic dynamics generate a phase trans
formation and the initial isotropy of the macroscopic stress field is
broken. Deterministic molecular-dynamics trajectories for a simple pai
r-potential model of a pressure-induced martensitic transformation are
presented; manifestly nonlinear behavior is observed while satisfying
the tensorial virial theorem for nonlinear elastic media. Stochastic
Monte Carlo trajectories yield comparable results, and independently v
erify the nonlinear extension of the virial theorem. This is despite t
he fact that the Monte Carlo algorithm contains no explicit driving te
rms that insure the theorem be satisfied.