Strong Mn-Mn distance dependence of the Mn interlayer coupling in SmMn2Ge2-related compounds and its role in magnetic phase transitions.