Density-functional theory calculations were performed using CASTEP academic release v. 24.1, 34 using the PBE functional with TS semi-empirical dispersion correction. This software uses the plane-wave pseudopotential method: ultrasoft pseudopotentials were generated on the fly using default settings, while the plane-wave basis set cutoff was set to 751 eV; the fine grid used to represent the core and augmentation charge density was set to three times the diameter of the cutoff sphere. Each energy calculation was converged to within 10 -8 eV/atom, and the geometry optimisations were converged to a maximum energy change of 2 × 10 -5 eV/atom, a maximum force of 0.05 eV/Å, and a maximum shift of 0.001 Å. A single unit cell was modelled using periodic boundary conditions, with cell parameters fixed at their experimental geometry. First, all atomic positions allowed to refine within the experimental P63 symmetry. Next, a geometry in which one N1 ammonium ion was flipped was generated, and again all atomic positions were allowed to refine within the resulting P3 symmetry. Finally, a nudged elastic band calculation between these local minima was performed in P1 symmetry. The H atoms were identified between the two end states to minimise the distance travelled; in particular, this means that the flip takes the apical site to an equatorial site and vice versa (Video S1). Nine intermediate states were refined, with the central one constrained to move uphill to the transition state.