Author Topic: ATKError: hard to convergence  (Read 10708 times)

0 Members and 1 Guest are viewing this topic.

Offline deepwave

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
ATKError: hard to convergence
« on: December 22, 2010, 16:51 »
these days, I face to a problem as the following:
I want to calculate the spin two-probe systerms(use the version atk 2008.10) when I calculate scf , it always display on ATK command :

#Pulay mixing inversion failed.Using only last step.
#Pulay mixing inversion failed.Using only last step.
#Pulay mixing inversion failed.Using only last step.
...       

And the output file .log as:
# ----------------------------------------------------------------
# TwoProbe Calculation
# ----------------------------------------------------------------
# sc  0 : q =  648.06000 e
# sc  1 : q =  681.84046 e  dRho = 4.8957E-001
# sc  2 : q =   -4.94032 e  dRho = 6.3687E+000
# sc  3 : q =   -4.94032 e  dRho = 0.0000E+000
# sc  4 : q =   -0.03471 e  Etot =   -1.#IND0 Ry  dRho = 6.6863E+000
# sc  5 : q =   -0.03471 e  Etot =   -1.#IND0 Ry  dRho = 0.0000E+000  dEtot = -1.#INDE+000 Ry
Traceback<most recent call last>:
File"PNi0.3-.py",line 351, in?
runtime_parameters=runtime_parameters
ATKError:inverse<DZMatrix const &>: Could not LU factorize!

or when i change paramters according to the "ATK_TutorialSession_Part1_SCF.pdf".but it still display on ATK command
 TwoProbe Calculation. i find the value of q sharp change

# ----------------------------------------------------------------
# sc  0 : q =  648.98428 e
# sc  1 : q =   34.29715 e  dRho = 7.2077E+000
# sc  2 : q =   -0.03585 e  dRho = 7.5408E+000
# sc  3 : q =   -0.03585 e  dRho = 0.0000E+000

#Pulay mixing inversion failed. Using only last step.
#Pulay mixing inversion failed. Using only last step.
Traceback<most recent call last>:
File "PNi0.3-2.py",line 351,in?
runtime_parameters=runtime_parameters
ATKError:inverse<DZMatrix const &>:Could not LU factorize!

my module is (ni(initial spin 0.3)-molecular(0)-ni(0.3))why? how to solve it? Thank you very much!!!

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: ATKError: hard to convergence
« Reply #1 on: December 23, 2010, 03:48 »
As shown in your log file, the total charge of system goes to nearly zero. This kind of problem has been met by others. To fix it, you may tune the parameters in "energyContourIntegralParameters()":
energy_contour_integral_parameters = energyContourIntegralParameters(
    circle_points = 50,
    integral_lower_bound = 7.0*Rydberg,
    fermi_line_points = 10,
    fermi_function_poles = 4,
    real_axis_infinitesimal = 0.01*electronVolt,
    real_axis_point_density = 0.05*electronVolt
)

Additional comments can be referred to the manual and other threads in this forum:
http://www.quantumwise.com/documents/manuals/ATK-2008.10/ref.energycontourintegralparameters.html
http://quantumwise.com/forum/index.php?topic=917.0

« Last Edit: December 23, 2010, 07:35 by zh »

Offline deepwave

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: ATKError: hard to convergence
« Reply #2 on: December 23, 2010, 10:32 »
dear zh  thank's for you
 i know the charge=q sharply change, it  may be cause by energyContourIntegralParameters. i have try my best to solve this problem and have change these parameters according to manual many times. but it still can't  convergence. maybe, i have to use the ATK version 2010.8.2, but i can only calculate in version 2008.10.
if you want my scipt, i can sent you by email. but i can't find your email.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: ATKError: hard to convergence
« Reply #3 on: December 23, 2010, 11:42 »
A possible cause of the zero charge situation is also that the electrode is not deep enough, which causes the Fermi level to be wrong, or (for the same reason) if the k-point sampling is insufficient.

Offline deepwave

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: ATKError: hard to convergence
« Reply #4 on: December 23, 2010, 13:23 »
dear: Anders Blom
i think the electrode is deep enough, because there are three layers in electrode and surface and the k-point sampling is 1*1*300 which i think is enough. so maybe there are exist other fault.  so i have to sent the script to your email(anders.blom@), i hope you can help me find the fault. thank you!

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: ATKError: hard to convergence
« Reply #5 on: December 23, 2010, 17:09 »
the k-point sampling is 1*1*300 which i think is enough.
Are you sure it? Did you do the convergence test for the k-point sampling?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: ATKError: hard to convergence
« Reply #6 on: December 23, 2010, 20:32 »
Ni is not a simple material. I don't think your k-points (in X/Y) are sufficient, and also you may need to increase the mesh cut-off a bit.

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: ATKError: hard to convergence
« Reply #7 on: December 28, 2010, 13:06 »
The geometry of your two-probe system may have some problems. Maybe you use the (001) (3x3) surface of fcc Ni as electrodes. In this case, the atomic layers are in the stacking of ABAB..., and thus  the primitive unit cell of electrode contains only two atomic layers. But in your script file, the unit cell of each electrode includes three atomic layers and each surface region also includes three atomic layers. In such configuration it leads to the atomic layers of Ni in the stacking of ABAABA.... This is unreasonable. Therefore, you should adjust your the configuration of atomic layers in your script file.
« Last Edit: January 1, 2011, 12:27 by zh »

Offline deepwave

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: ATKError: hard to convergence
« Reply #8 on: January 1, 2011, 04:20 »
thank you! happy new year to you
you said:"you should adjust your the configuration of atomic layers in your script file". i can't understand how to adjust configuration in my script file. increasing (decreasing) the surface layers or electrode layers? 

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: ATKError: hard to convergence
« Reply #9 on: January 1, 2011, 12:22 »
In your electrode region (either left or right), the atomic layers of Ni are stacked as ABA. For the left part of scattering region in your script file, the atomic layers of Ni are stacked as ABA. When the left electrode is connected with the left part of scattering region, the atomic layers of Ni will be stacked as ABAABA. Similar thing happens to the right electrode and the right part of scattering region. This stacking sequence ABAABA in a two-probe system is problematic.  You should make it be ABABAB or ABABA.  This means that the additional one atomic layer (A) can be removed from the electrode. For example, one possible adjustment is made as follows:
Quote
electrode_cell = [[ 2.4918443,  0.       ,  0.       ],
                  [ 0.       ,  2.4918443,  0.       ],
                  [ 0.       ,  0.       ,  5.286    ]]*Angstrom


electrode_elements = [Nickel, Nickel, Nickel]
electrode_coordinates = [[ 0.        ,  0.        ,  0.        ],
                         [ 1.24592215,  1.24592215,  1.762     ],
                         [ 0.        ,  0.        ,  3.524     ]]*Angstrom
------->
Quote
electrode_cell = [[ 2.4918443,  0.       ,  0.       ],
                  [ 0.       ,  2.4918443,  0.       ],
                  [ 0.       ,  0.       ,  3.524    ]]*Angstrom


electrode_elements = [Nickel, Nickel]
electrode_coordinates = [[ 0.        ,  0.        ,  0.        ],
                         [ 1.24592215,  1.24592215,  1.762     ]]*Angstrom
The atomic layers of Ni in the scattering region should be adjusted accordingly.
« Last Edit: January 1, 2011, 12:24 by zh »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: ATKError: hard to convergence
« Reply #10 on: January 4, 2011, 12:57 »
Without having access to your new script, I still think you need to consider the k-point sampling (and possibly the contour integral parameters). Also, are you running the calculation spin-polarized?

Offline deepwave

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: ATKError: hard to convergence
« Reply #11 on: January 5, 2011, 00:50 »
iyes, i calculation spin-polarized and i have set the k-point sampling (3*3*50 or 10*10*1000). but is still hard to convergence. i hope you can help me check my script ! thank you very much!

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: ATKError: hard to convergence
« Reply #12 on: January 5, 2011, 12:02 »
The electrode is too short, 2 layers is too few. You need 4 at least, maybe 6.

Offline deepwave

  • Heavy QuantumATK user
  • ***
  • Posts: 33
  • Reputation: 0
    • View Profile
Re: ATKError: hard to convergence
« Reply #13 on: January 5, 2011, 14:34 »
i have set the electrode layers and surface layers to 4 and i have sent the script (4Ni-4T.py) to you !but the result is the same. you can see it in the sript(4Ni-4T.log). i have to set set the electrode layers and surface layers to 6?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: ATKError: hard to convergence
« Reply #14 on: January 5, 2011, 15:17 »
Maybe 6, yes. For Ni it's also important to have a high enough mesh cut-off, at least above 200 Ry. But before getting into that, you have another big problem that must be solved first. The calculation is not running properly in parallel; all nodes think they are master nodes, as can be seen from the fact that you have multiple output in the log file (each node writes the same information to the log file). In addition to messing up the log file, which is a small problem, this also means that the calculation is not running as fast as it would with proper parallelization. Are you using OpenMPI? That doesn't work, you must use an MPICH2-compatible MPI-library. To check that the parallelization runs properly, you should run a small test script with the contents
Code: python
from ATK.MPI import processIsMaster
if processIsMaster():
    print 'Master node'
else:
    print 'Slave node'
If you run this on your current setup, you will see all nodes printing "Master node", whereas the proper output is "Master" once and only once, and several "Slave".
« Last Edit: January 5, 2011, 15:19 by Anders Blom »