Anisotropic magnetic couplings and structure-driven canted to collinear transitions in<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML"><mml:mrow><mml:msub><mml:mi>Sr</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:msub><mml:mi>IrO</mml:mi><mml:mn>4</mml:mn></mml:msub></mml:mrow></mml:math>by magnetically constrained noncollinear DFT