Lattice deformation and phase transition of aluminum nitride studied by density functional theory calculations