Representation of mechanical loads in molecular dynamics simulations