Strain a system and caculate stress

Hi everyone,

I applied a strain to a system along a specific axis ,run molecular dynamics between each strain as Stephen,and I stretched one axis and compressed

the other two axis to maintain constant density,but I got stress which were negative along the stretched axis. I don't know why this happened? I

have changed the Stephen'perl script as below.Can you help me?Thanks.

无标题.png

Jian