How to determine DM.MixingWeight?

Asked by edwin

The last time I asked, I found that if DM.MixingWeight was too large, it would result in SCF did not converge in maximum number of steps (required).

I have a question here ""How to detemine DM.MixingWeight number?

Based on the previous answer, I set DM.MixingWeight to 0.01.

Do I have to do some calculations to find the right DM.MixingWeight number?

Thank you

fdf file-------------------------------------------------------------------------------------------------------------

SystemLabel ingan

NumberOfSpecies 4
NumberOfAtoms 117

%block ChemicalSpeciesLabel
1 31 Ga
2 7 N
3 49 In
4 1 H

%endblock ChemicalSpeciesLabel

LatticeConstant 1 Ang

%block LatticeVectors
  9.55800000 0.00000000 0.00000000
 -4.77900000 8.27747082 0.00000000
  0.00000000 0.00000000 42.55800000
%endblock LatticeVectors

AtomicCoordinatesFormat Ang
%block AtomicCoordinatesAndAtomicSpecies
   0.00000000 1.83943796 15.00000000 4
                  1.59300000 0.91971898 16.59300000 1
                   0.00000000 1.83943796 15.94475000 2
                   1.59300000 0.91971898 18.53775000 2
                  3.18600000 1.83943796 15.00000000 4
                  6.37200000 1.83943796 15.00000000 4
                  4.77900000 0.91971898 16.59300000 1
                  7.96500000 0.91971898 16.59300000 1
                   3.18600000 1.83943796 15.94475000 2
                   6.37200000 1.83943796 15.94475000 2
                   4.77900000 0.91971898 18.53775000 2
                   7.96500000 0.91971898 18.53775000 2
                 -1.59300000 4.59859490 15.00000000 4
                 -3.18600000 7.35775184 15.00000000 4
                  0.00000000 3.67887592 16.59300000 1
                 -1.59300000 6.43803286 16.59300000 1
                  -1.59300000 4.59859490 15.94475000 2
                  -3.18600000 7.35775184 15.94475000 2
                   0.00000000 3.67887592 18.53775000 2
                  -1.59300000 6.43803286 18.53775000 2
                  1.59300000 4.59859490 15.00000000 4
                  0.00000000 7.35775184 15.00000000 4
                  4.77900000 4.59859490 15.00000000 4
                  3.18600000 7.35775184 15.00000000 4
                  3.18600000 3.67887592 16.59300000 1
                  1.59300000 6.43803286 16.59300000 1
                  6.37200000 3.67887592 16.59300000 1
                  4.77900000 6.43803286 16.59300000 1
                   1.59300000 4.59859490 15.94475000 2
                   0.00000000 7.35775184 15.94475000 2
                   4.77900000 4.59859490 15.94475000 2
                   3.18600000 7.35775184 15.94475000 2
                   3.18600000 3.67887592 18.53775000 2
                   1.59300000 6.43803286 18.53775000 2
                   6.37200000 3.67887592 18.53775000 2
                   4.77900000 6.43803286 18.53775000 2
                  0.00000000 1.83943796 19.18600000 1
                  0.00000000 1.83943796 24.37200000 1
                  1.59300000 0.91971898 21.77900000 1
                  1.59300000 0.91971898 26.96500000 1
                   0.00000000 1.83943796 21.13075000 2
                   0.00000000 1.83943796 26.31675000 2
                   1.59300000 0.91971898 23.72375000 2
                   1.59300000 0.91971898 28.90975000 2
                  3.18600000 1.83943796 19.18600000 1
                  3.18600000 1.83943796 24.37200000 1
                  6.37200000 1.83943796 19.18600000 1
                  6.37200000 1.83943796 24.37200000 1
                  4.77900000 0.91971898 21.77900000 3
                  4.77900000 0.91971898 26.96500000 1
                  7.96500000 0.91971898 21.77900000 3
                  7.96500000 0.91971898 26.96500000 1
                   3.18600000 1.83943796 21.13075000 2
                   3.18600000 1.83943796 26.31675000 2
                   6.37200000 1.83943796 21.13075000 2
                   6.37200000 1.83943796 26.31675000 2
                   4.77900000 0.91971898 23.72375000 2
                   4.77900000 0.91971898 28.90975000 2
                   7.96500000 0.91971898 23.72375000 2
                   7.96500000 0.91971898 28.90975000 2
                 -1.59300000 4.59859490 19.18600000 1
                 -1.59300000 4.59859490 24.37200000 1
                 -3.18600000 7.35775184 19.18600000 1
                 -3.18600000 7.35775184 24.37200000 1
                  0.00000000 3.67887592 21.77900000 3
                  0.00000000 3.67887592 26.96500000 1
                 -1.59300000 6.43803286 21.77900000 3
                 -1.59300000 6.43803286 26.96500000 1
                  -1.59300000 4.59859490 21.13075000 2
                  -1.59300000 4.59859490 26.31675000 2
                  -3.18600000 7.35775184 21.13075000 2
                  -3.18600000 7.35775184 26.31675000 2
                   0.00000000 3.67887592 23.72375000 2
                   0.00000000 3.67887592 28.90975000 2
                  -1.59300000 6.43803286 23.72375000 2
                  -1.59300000 6.43803286 28.90975000 2
                  1.59300000 4.59859490 19.18600000 1
                  1.59300000 4.59859490 24.37200000 1
                  0.00000000 7.35775184 19.18600000 1
                 0.00000000 7.35775184 24.37200000 1
                  4.77900000 4.59859490 19.18600000 1
                  4.77900000 4.59859490 24.37200000 1
                  3.18600000 7.35775184 19.18600000 1
                  3.18600000 7.35775184 24.37200000 1
                  3.18600000 3.67887592 21.77900000 3
                 3.18600000 3.67887592 26.96500000 1
                  1.59300000 6.43803286 21.77900000 3
                  1.59300000 6.43803286 26.96500000 1
                  6.37200000 3.67887592 21.77900000 3
                  6.37200000 3.67887592 26.96500000 1
                  4.77900000 6.43803286 21.77900000 3
                  4.77900000 6.43803286 26.96500000 1
                   1.59300000 4.59859490 21.13075000 2
                   1.59300000 4.59859490 26.31675000 2
                   0.00000000 7.35775184 21.13075000 2
                   0.00000000 7.35775184 26.31675000 2
                   4.77900000 4.59859490 21.13075000 2
                   4.77900000 4.59859490 26.31675000 2
                   3.18600000 7.35775184 21.13075000 2
                   3.18600000 7.35775184 26.31675000 2
                   3.18600000 3.67887592 23.72375000 2
                   3.18600000 3.67887592 28.90975000 2
                   1.59300000 6.43803286 23.72375000 2
                   1.59300000 6.43803286 28.90975000 2
                   6.37200000 3.67887592 23.72375000 2
                   6.37200000 3.67887592 28.90975000 2
                   4.77900000 6.43803286 23.72375000 2
                   4.77900000 6.43803286 28.90975000 2
                   4.77900000 0.91971898 30.00000000 4
                   7.96500000 0.91971898 30.00000000 4
                   0.00000000 3.67887592 30.00000000 4
                  -1.59300000 6.43803286 30.00000000 4
                   3.18600000 3.67887592 30.00000000 4
                   1.59300000 6.43803286 30.00000000 4
                   1.59300000 0.91971898 30.00000000 4
                   4.77900000 6.43803286 30.00000000 4
                   6.37200000 3.67887592 30.00000000 4

%endblock AtomicCoordinatesAndAtomicSpecies

WriteMDXmol true

MeshCutoff 375.0 Ry # Energy cut-off for 3D mesh
kgrid_cutoff 10. Ang

#%block kgrid_Monkhorst_Pack
#1 0 0 0.
#0 1 0 0.
#0 0 1 0.
#%endblock kgrid_Monkhorst_Pack

xc.functional LDA
xc.authors CA
PAO.BasisSize DZP

%block PAO.Basis
Ga 3
   n=3 2 2
       0.00 0.00
   n=4 0 2
        0.00 0.00
   n=4 1 1 P 1
        0.00
In 3
 n=4 2 1
     5.50
     1.00
 n=5 0 2
     0.00 0.00
     1.00 1.00
 n=5 1 2 P
     0.00 0.00
     1.00 1.00

N 2
n=2 0 2
  0.000 0.000
  1.000 1.000
n=2 1 2 P 1
  0.000 0.000
  1.000 1.000
%endblock PAO.Basis

PAO.EnergyShift 0.038 Ry

MD.TypeOfRun CG
MD.NumCGsteps 200
MD.MaxCGDispl 0.1 Ang # Maximum atomic displacement
MD.MaxForceTol 0.03 eV/Ang # Tolerance in the maximum
MD.UseSaveXV T
MD.VariableCell .false.
MD.MaxStressTol 0.5 GPa
MD.UseSaveCG T

MaxSCFIterations 500 # Max. number of iterations in SCF.
DM.MixingWeight 0.01 # weight of mixing in the DM for convergence
DM.NumberPulay 3 # Number of previous steps of DM for mixing
DM.Tolerance 1.d-4 # Tolerance in differences of DM
DM.UseSaveDM true
SolutionMethod diagon # diagonalizacion, order-N, TD-DFT
WriteMDXmol true

SpinPolarized .false. # spin polarization

WriteEigenvalues .true.
#WriteKbands .true.
WriteBands .true.
SaveElectrostaticPotential .true.
SaveTotalPotential .true.
WriteWaveFunctions .true.
WriteMullikenPop 1
COOP.Write .true.
WriteDenchar .true.

#BandLinesScale ReciprocalLatticeVectors
%block BandLines
1 0.5 0.0 0.5 L
20 0.5 0.0 0.0 M
20 0.0 0.0 0.0 \Gamma
45 0.0 0.0 0.5 A
%endblock BandLines

Question information

Language:
English Edit question
Status:
Solved
For:
Siesta Edit question
Assignee:
No assignee Edit question
Solved by:
edwin
Solved:
Last query:
Last reply:
Revision history for this message
Nick Papior (nickpapior) said :
#1

You simply have to do trial and error runs for determining the best mixing weight for your system.

Generally, the larger the system, the smaller the mixing weight, say down to 1e-4 or so. Very few systems allows going above 0.2, in my experience.

Revision history for this message
edwin (yusu) said :
#2

Thank you

Does the calculation time change if MixingWeight is too small?

Revision history for this message
Nick Papior (nickpapior) said :
#3

That is the tricky part, a too small value will make the convergence slower and thus more SCF iteratiorns are needed. A too high value will make the SCF go into a non-convergent state and will probably never converge. Hitting the value that is a good balance between convergence and minimal SCF iterations is extremely difficult to find.

So yes, a too small value will mean more SCF cycles thus more calculation time. You have to play with this parameter to get a feel for it for the systems of your interest.

Revision history for this message
edwin (yusu) said :
#4

Thank you very much!!