Calculating the torque in moving grain

Is it possible to calculate the total or average torque on a grain that is shrinking or growing?

This is too vague a question.
Do you mean to ask whether this is possible at all to do?
Or rather based on a LAMMPS simulation?
If the latter, do you need to get the property after the fact or during the simulation?
And if during the simulation, what do you need it for?
Can you provide a simple example input deck demonstrating your issue?

Hi Dr. Kohlmeyer, thank you for your reply. I have a LAMMPS simulation with an isolated grain that shrinks spontaneously. In this process, the isolated grain experiences shear-coupling and rotates while it shrinks. There are no external forces applied, and I am hoping to measure the torque on the isolated grain when it’s moving. If not, I hope to apply a torque on just the isolated grain to counter the shrinking. Thank you!

You could use compute torque/chunk command — LAMMPS documentation
or some variable expression variable command — LAMMPS documentation