This thread is locked.Only browsing is available.
Top Page > Browsing
Error when single atom system, scf.EigenvalueSolver is Band
Date: 2012/01/21 03:04
Name: A. M. Ito   <>

Dear Prof. Ozaki

Thank you very much for your OpenMX.

Could you check the following point when you have time.
I encounter error, in which the total energy become "nan" or so high value in the case that input parameters is as follows:
- System has only single atom
- scf.EigenvalueSolver = Band
- Atoms.UnitVectors is larger than cutoff length of PAO file.
for example:
Species.Number 1
Si Si7.0-s2p2d1 Si_PBE11

Atoms.Number 1
Atoms.SpeciesAndCoordinates.Unit Ang # Ang|AU
<Atoms.SpeciesAndCoordinates # Unit=Ang.
1 Si 0.0000 0.0000 0.0000 2.0 2.0
Atoms.UnitVectors.Unit Ang # Ang|AU
<Atoms.UnitVectors # unit=Ang.
20.000000 0.000000000 0.0000000000
0.00000000000 20.00000 0.0000000000
0.00000000000 0.000000000 20.0000000

scf.SpinPolarization off # On|Off
scf.ElectronicTemperature 300.0 # default=300 (K)
scf.energycutoff 160.0 # default=150 (Ry)
scf.maxIter 100 # default=40
scf.EigenvalueSolver band # Recursion|Cluster|Band
scf.lapack.dste dstevx # dstegr|dstedc|dstevx, default=dstegr
scf.Kgrid 3 3 3 # means 4x4x4

result in log output shows:

Utot = nan


<Band_DFT> DM, time=0.000934
1 Si MulP nan nan sum nan
Sum of MulP: up = nan down = nan
total= nan ideal(neutral)= 4.00000

I confirm this error in OpenMX 3.5 and 3.6.
Here, I report my research for reason of this error in the next comment.

Atsushi M. Ito.
Page: [1]

continue: Error when single atom system, scf.EigenvalueSolver is Band ( No.1 )
Date: 2012/01/21 04:15
Name: A. M. Ito  <>

I think the course of this error is function "Eigen_HH" in the file In this function, the some variables become infinity value or gnanh, for example gp[i1].rh. Because, when gs2 == 0.0h, then gu1.r == 0.0h. Here, from the code for line 124 to 155, if (i == n -1) then gs2 == 0.0h because the loop for lines 142 to 145 is skipped. Therefore, in this case, p[i1].r and so on become infinity every time.

Here, see another function "Eigen_HH" in the file In this function, the gifh sentence in line 458 is as follows:
if (ABSTOL<fabs(s2)){
By this sentence, if gs2 == 0.0h then calculation of gp[i1].rh is skipped. That is, this infinity problem does not happen when scf.EigenvalueSolver is Cluster. On the other hand, "Eigen_HH" in the file The corresponding gifh sentence is written in line 156 as follows:
if ( ABSTOL<fabs(s2) || i==(n-1) ){
From this line, only when (i==n-1), the problem by gs2==0.0h is not skipped.
This gifh sencense is correct?

As a test, when the gifh sentence of line 156 in file is changed to
if ( ABSTOL<fabs(s2) ){
then total energy does not become infinity, and become correct value, even if Atoms.UnitVectors are larger than cutoff length of PAO file and scf.EigenvalueSolver is Band.

Sticky point is, if some variavles in the function "Eigen_HH" becomes so large value (infinity), but if it is not gnanh, convergent total energy is returned. But, the calculation under the input parameter of gSi Si7.0-s2p2d1 Si_PBE11h returns gnanh as total energy.

Please check this point. I hope the problem is solved. Thank you very much for reading.
Best regards,

Atsushi M. Ito (NIFS)

Page: [1]