About calculating stress

I am trying various calculations using OCPcalculator.

OCPcalculator does not implement stress calculation. Therefore, I added a function to the OCPcalculator to calculate the stress from the obtained forces and cell information, and tried to calculate the stress.

However, when NPT was executed, the stress changed monotonously and the simulation could not be performed well.

Is it difficult to deal with stress with such an approach?