A new permutation-symmetry-adapted machine learning diabatization procedure and its application in MgH2 system.