Magnetic anisotropy, exchange coupling and Dzyaloshinskii–Moriya interaction of two-dimensional magnets