How to obtain shear stress-shear strain data from the in.shear example

Dear Experts,

I have run the in.shear example of LAMMPS. If I want to obtain the shear stress-shear strain data for this example can you please let me know which commands I would be using?

The in.shear (example) is attached below for your ready reference.

Thanking you,
Yours sincerely,

The thermo_style command determines what is printed
to the screen and logfile every thermo output. You
can output pressure tensor components (shear stress).
You know the strain at every timestep b/c you are
applying it. Thus you can plot stress vs strain.


Dr. Steve Plimpton,

Thank you very much for your kind reply. I have a following question in this regard.
In the example there are three parts of the calculation domain, that is, upper, mobile and boundary. So, if I take output for the relevant pressure tensor component, that is pxy, would not it also take into account the upper and lower parts? However, the upper and lower parts are designed to give the shear strain only and they need not be considered while calculating the shear stress.

Thanking you,
Best regards,

Compute pressure is for the entire system. If you look
at the formula on the doc page, it has a kinetic and virial
part. Both are scaled by the volume. You can get output
for both terms. You can use a temp compute (input to compute
pressure) that is just for the mobile atoms. You can change
the volume (manually, LAMMPS won’t do this), to exclued
the upper/lower regions. You can also look at the compute stress/atom
compute which does the same thing on a per-atom basis
and only do it for the mobile atoms.