Anisotropic exchange in Nd–Fe–B permanent magnets