  In this paper, we attempt to understand the cause of magnetostructural
transformation in Mn-based antiperovskites by calculating EXAFS at the K edges
of constituent metal atoms in three antiperovskite compounds, Mn$_3$GaC,
Mn$_3$SnC and Mn$_3$InC. These three compounds have very different magnetic
ground states despite the similar cubic structure. Our calculations show that
the distortions of Mn$_6$C octahedra, which are responsible for the first-order
magnetic transition to antiferromagnetic state, depends on the packing fraction
of the lattice.
