In this section, we introduce the atomic structure of (BA) 2 (MA)Pb 2 I 7 , quantify the temperature induced structural transformation and compare our results to experimental data. The supercell used in our MD simulations is shown in Fig. . The regions associated with organic and inorganic layers are highlighted in Fig. , where the thickness of the organic layer is determined by the time-averaged difference in the Z positions of iodides in the upper and lower inorganic layers, specifically those iodides separated by BA cations. The equilibrated structures are obtained at various temperatures through the annealing procedure detailed in Supplementary Material (Fig. ). It is noted that the simulated annealing employed here proceeds in a stepwise fashion, with temperature intervals of 50 K from 400 K down to 200 K and 25 K intervals from 200 K down to 50 K. At each temperature level, the structure is equilibrated for 30 ns at higher temperatures and 100 ns at lower temperatures. This extended sampling period is used to mitigate the effects of supercooling in MD simulations due to the limited MD timescale, aiming to capture the transition mechanism more accurately.