tensile test

Dear all,

I am running simulation of tensile test of Mg. I divided the whole region into three regions: top, middle , bottom. S S S boundary condition is used.
Fix move command is used to stretch top region and bottom region at a constant velocity in x direction, the critical command is below:

fix 4 top move linear {fvelocity} 0 0 units box fix 5 bottom move linear {fvelocity2} 0 0 units box
fix 6 top setforce 0 0 0
fix 7 bottom setforce 0 0 0
fix 8 middle nve
fix 9 middle langevin 300 300 0.1 12345

Well, there is nothing stopping you from first turning on fix npt under PSS boundary conditions, running MD, unfix npt, change the boundary condition to SSS, turn on fix move etc.

However, you are making this problem harder than it really is. Just do some quick simulations to measure the stress/strain response. Then for each desired initial stress,
equilibrate the system under NVT at the desired initial strain.

Never use a barostat unless you really need it.

Aidan