Stress & strain value

Hi my friends!
I applied shear strain to my sample, but I don’t know how can I obtain stress & stain!
May you guide me,please?

With this code I can’t have stress & strain value!

variable srate equal 1.0e10
variable srate1 equal “v_srate / 1.0e12”
fix 2 all deform 1 xy erate ${srate1} units box remap x

variable strain equal “(lx - v_L0)/v_L0”
variable steress equal “-pxy/10000”

In ‘real’ units you can use the following piece of code for a uniaxial strain:

timestep 0.25

variable tmp equal “lx”
variable L0 equal ${tmp}
variable strain equal “(lx-v_L0)/v_L0”
variable p1 equal “v_strain”
variable p2 equal “-pxx0.0001" #atmosphere to GPa
variable p3 equal "-pyy
variable p4 equal “-pzz*0.0001”
variable p5 equal “lx”
variable p6 equal “ly”
variable p7 equal “lz”

fix 1 all nvt temp 300.0 300.0 1.0
fix 2a all deform 1 x erate 4e-6 units box remap x #0.001/ps or 1e-6/fs
fix def1 all print 1000 "{p1} {p2} {p3} {p4} {p5} {p6} {p7}" file ss-{name}.dat screen no
run 200000