CNT mechanical under tension_Stress Strain calculation

Dear all

I have found a code for mechanical tension of CNT
I doubt that the stress-strain calculation in this code is true?
does the “compute stress/atom” calculate the “mechanical engineering stress”?
is it necessary to divide “compute reduce sum stress/atom” by the volume of CNT?
here is a part of the code:

compute mystress middle_atoms stress/atom
compute reducedstress middle_atoms reduce sum c_mystress[3]
variable sigmavolume equal 23.14{R}*({L}-2*${dx})3.4
variable sigma equal (c_reducedstress)/(10^4

how can I calculate the engineering stress-strain in LAMMPS

Here is the entire code

CNT_Mechanical.rar (6.31 KB)

Reading the doc page for the compute stress/atom command
will answer your Qs.