On Jan 16, 2007, at 10:37 , W. YU wrote: > In function sumkg(et,nbnd,nks,wk,degauss,ngauss,e,is,isk), > the parameter 'isk' could be 1 or 2 to determine the spin > components: 1 for up and 2 for down. Then the function > calculate the number of states at a given energy e. > > If I am right, 'is' could also be 1 or 2 to choose > spin component for calculating states. This way, the > total number of states seems for one spin only (i.e. > roughly half of nelec). But in function efermig, the > so calculated number of states is compared with nelec.
these routines are used in two different cases: - in an ordinary calculation of the Fermi energy, sumkg is called by efermig with nelec = number of electrons, is=0 - in a calculation of constrained occupancies with a given magnetization, sumkg is called by efermig with 1) nelec = number of electrons up, is=1 and 2) nelec = number of electrons down, is=2 . The two results are stored into two Fermi energies, one for spin up, one for spin down. You have to go up in the calling tree to understand how this is done. Admittedly it could be done in a less obscure way Paolo --- Paolo Giannozzi, Democritos and University of Udine, Italy
