kSpin gives incorrect eigenvalues |
- Date: 2022/02/18 17:13
- Name: Shunsuke Yoshizawa
- Dear developers,
My report and question are about kSpin code.
I am trying to calculate the spin texture of energy bands for a slab model with 63 atoms of 3 species, which is a kind of topological insulator with three-fold symmetry. SCF and band dispersion calculation by OpenMX gives smooth energy bands and surface states around the Fermi energy, as expected. The input file is
scf.XcType GGA-PBE # LDA|LSDA-CA|LSDA-PW|GGA-PBE scf.SpinPolarization NC # On|Off|NC scf.SpinOrbit.Coupling On # On|Off, default=off scf.ElectronicTemperature 300.0 # default=300 (K) scf.energycutoff 300.0 # default=150 (Ry) scf.maxIter 400 # default=40 scf.EigenvalueSolver Band # DC|GDC|Cluster|Band scf.Kgrid 9 9 1 # means n1 x n2 x n3 scf.Mixing.Type rmm-diisk # Simple|Rmm-Diis|Gr-Pulay|Kerker|Rmm-Diisk scf.Init.Mixing.Weight 0.300 # default=0.30 scf.Min.Mixing.Weight 0.001 # default=0.001 scf.Max.Mixing.Weight 0.700 # default=0.40 scf.Mixing.History 40 # default=5 scf.Mixing.StartPulay 20 # default=6 scf.Mixing.EveryPulay 1 # default=6 scf.criterion 1.0e-8 # default=1.0e-6 (Hartree) scf.lapack.dste dstevx # dstevx|dstedc|dstegr,default=dstevx scf.restart off
Band.dispersion on Band.Nkpath 3 <Band.kpath 121 0.333333 0.333333 0.000000 0.000000 0.000000 0.000000 K G 105 0.000000 0.000000 0.000000 0.500000 0.000000 0.000000 G M 61 0.500000 0.000000 0.000000 0.333333 0.333333 0.000000 M K Band.kpath>
However, the band dispersion produced by kSpin are incorrect. The input file for kSpin is
Filename.scfout Hogehoge.scfout Filename.outdata Hogehoge_BD Calc.Type BandDispersion # FermiLoop, GridCalc, # BandDispersion, or MulPOnly # default: MulPOnly Energy.Range -2.0 2.0 # eV; default: -0.5 0.5 Band.Nkpath 3 <Band.kpath 121 0.333333 0.333333 0.000000 0.000000 0.000000 0.000000 K G 105 0.000000 0.000000 0.000000 0.500000 0.000000 0.000000 G M 61 0.500000 0.000000 0.000000 0.333333 0.333333 0.000000 M K Band.kpath>
The calculation selects strange band indices (for example, the output file reads l_min:1777 l_max:3545 l_cal:1769 for Total Band (2*n):3546 ), or sometimes results in "No Bands are found".
If I reduce the number of basis functions (the Quick sets in the manual), the band indices fall within the expected range. However, the eigenvalues recorded in the *.MulPop file produced by MulPCalc exhibit a highly scattered dispersion and many NaN's. It seems that eigenvalues are not calculated correctly. When I performed the similar spin texture calculation for a different crystal structure, the results were OK.
Then, I found that the eigenvalues are computed by a function named Eigen_HH(), but the function is defined both in Eigen_HH.c (used by kSpin) and in EigenBand_lapack.c (used by OpenMX). The two definitions are slightly different, so I modified the Eigen_HH() in Eigen_HH.c according to that in EigenBand_lapack.c, as follows.
void Eigen_HH(dcomplex **ac, double *ko, int n, int EVmax, int ev_flag) --> #pragma optimization_level 1 void Eigen_HH(dcomplex **ac, double *ko, int n, int EVmax, int ev_flag)
double ABSTOL=1.0e-14; --> double ABSTOL=6.0e-15;
if ( ABSTOL<fabs(s2) || i==(n-1) ){ --> if ( ABSTOL<fabs(s2) || 1.0e-10<fabs(u[i+1].i) || i==(n-1) ){
After that, kSpin calculations have began to provide correct eigenvalues. I have not checked which of the three modifications is crucial. I am using OpenMX 3.9.9, but the situation is the same in 3.9.2. The codes have been compiled by Intel Compiler + Intel MKL + SGI MPT, and run as a MPI job using 96-192 cores.
I hope someone could comment on whether the above modifications are appropriate or not, and the possible reason why the previous errors in the kSpin calculation occurred.
Thank you very much.
| |