Firstly, one can do the non-spin-polarized calculations for the nonmagnetic state of graphene nanoribbon. Secondly, do the atom-projected DOS calculations and analyze the states near the Fermi level. Usually, if there are large and sharp states near the Fermi level, the system would be spin-polarized, indicating that the ground state is magnetic. From the atom-projected DOS, one can find out the localization of the states near Fermi level, i.e., which atom(s) will have large contribution to these states. According to this hint, the atoms with large contribution to the states near the Fermi level should be specified with a non-zero initial spin in the spin-polarized calculation. In the spin-polarized calculations, two cases for the initial spins of atoms should be considered, i.e., the ferromagnetic configuration and the antiferrormagnetic one.
It is meaningless to do the random spin initialization of atoms, especially when the unit cell is small.