def tstress(calc, val):
    """https://www.quantum-espresso.org/Doc/INPUT_PW.html#tstress
    """
    assert isinstance(val, bool)
    if not calc.get_param('tprnfor'):
        calc.parameters['tprnfor'] = True
