The following script in the Graphene-bloch state tutorial calculates avg spin pol density by calculating electron densities of both up and down-spin electrons:
http://quantumwise.com/documents/tutorials/latest/GrapheneBloch/index.html/examples/density_average.pyI was able to get colorful graphs for zigzag and armchair ribbons with an indication that spin pol density for zigzag ribbons is much higher at the edges in comparison to armchair.
(see dig at the bottom of the page :
http://quantumwise.com/documents/tutorials/latest/GrapheneBloch/index.html/electrondensity.spin.html)
The 'y' and 'z' axis display the size of ribbon in angstrom.There is a vertical colored scale (from -8 to +8) at the right side of graph
I am wondering what is the unit of this scale.Is it dipole moment per unit vol?? or is it just a number showing relative ratio?What i should write down in my manuscript if i use such graph?
Also spin polarization is calculated by using up and down spin electron densities through formula:
r = (n_u - n_d)/(n_u + n_d)
but in avg spin pol density calculation a factor + 1e-19 has been added in denominator why?
# Calculate the polarization density from the up/down densities
(n_u, n_d) = nlread('density.nc', ElectronDensity)
n_up = n_u[:,:,:].inUnitsOf(n_u.unit())
n_dn = n_d[:,:,:].inUnitsOf(n_d.unit())
n = (n_up - n_dn)/(n_up + n_dn + 1e-19)
av = numpy.array(n[:,:,:].sum(axis=0))