  We investigate the microscopic mechanism of the thermally induced ambient
pressure ordered-disordered phase transitions of two zeolitic imidazolate
frameworks of formula Zn(C$_3$H$_3$N$_2$)$_2$: a porous (ZIF-4) and a dense,
non-porous (ZIF-zni) polymorph via a combination of data science and computer
simulation approaches. Molecular dynamics simulations are carried out at the
atomistic level through the nb-ZIF-FF force field that incorporates
ligand-metal reactivity and relies on dummy atoms to reproduce the correct
tetrahedral topology around Zn$^{2+}$ centres. The force field is capable of
reproducing the structure of ZIF-4, ZIF-zni and the amorphous (ZIF$\_$a) and
liquid (ZIF$\_$liq) phases that respectively result when these crystalline
materials are heated. Symmetry functions computed over a database of structures
of the four phases, are used as inputs to train a neural network that predicts
the probabilities of belonging to each of the four phases at the local
Zn$^{2+}$ level with 90$\%$ accuracy. We apply this methodology to follow the
time-evolution of the amorphization of ZIF-4 and the melting of ZIF-zni along a
series of molecular dynamics trajectories. We first computed the transition
temperature and determined associated thermodynamic state functions.
Subsequently, we studied the mechanisms. Both processes consist of two steps:
(i) for ZIF-4, a low-density amorphous phase is first formed, followed by the
final ZIF$\_$a phase while (ii) for ZIF-zni, a ZIF$\_$a-like phase precedes the
formation of the liquid phase. These processes involve connectivity changes in
the first neighbour ligands around the central Zn$^{2+}$ cations. We find that
the amorphization of ZIF-4 is a non-isotropic processes and we trace back the
origins of this anisotropic behaviour to density and lability of coordination
bonds.
