Author Topic: A warning about convergence when calculating transport properties  (Read 13308 times)

0 Members and 1 Guest are viewing this topic.

Offline yongjunwinwin

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: cn
  • Reputation: 1
    • View Profile
I calculate the transport properties of the bulk MoS2 with a N atom substitute S in the central region, there is no warning when the bias is 0 or 0.2 V, but when the electrode bias is 0.4V, I got the following warning(just part of the log)
Quote
|  83   S   [   5.000 ,   7.298 ,  21.330 ]    6.08322   0.08322               | +------------------------------------------------------------------------------+ |  99 E = -177.533 dE =  2.215149e-01 dH =  3.054094e-01                               | +------------------------------------------------------------------------------+ ######################################################## #                                                                                                            # # Warning: The calculation did not converge to the requested tolerance!             # #                                                                                                            # ########################################################
the script is also attached What is the problem and how to solve the problem of the convergence of my system? As there is comment saying the upload is full, I have to paste my script below
Code
# -------------------------------------------------------------
# TwoProbe configuration
# -------------------------------------------------------------

# -------------------------------------------------------------
# Left electrode
# -------------------------------------------------------------

# Set up lattice
vector_a = [13.172, 0.0, 0.0]*Angstrom
vector_b = [0.0, 10.94656, 0.0]*Angstrom
vector_c = [0.0, 0.0, 9.48]*Angstrom
left_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
left_electrode_elements = [Molybdenum, Sulfur, Sulfur, Sulfur, Sulfur, Molybdenum, Molybdenum,
                           Sulfur, Sulfur, Sulfur, Sulfur, Molybdenum, Sulfur, Molybdenum,
                           Sulfur, Sulfur, Molybdenum, Sulfur, Molybdenum, Molybdenum, Sulfur,
                           Sulfur, Sulfur, Sulfur, Sulfur, Molybdenum, Molybdenum, Sulfur,
                           Sulfur, Sulfur, Sulfur, Molybdenum, Sulfur, Sulfur, Sulfur,
                           Molybdenum]

# Define coordinates
left_electrode_coordinates = [[  6.586     ,   0.912215  ,   0.79      ],
                              [  8.172     ,   4.561065  ,   0.79      ],
                              [  8.172     ,  10.034345  ,   0.79      ],
                              [  5.        ,  10.034345  ,   0.79      ],
                              [  5.        ,   4.561065  ,   0.79      ],
                              [  6.586     ,   6.385495  ,   0.79      ],
                              [  6.586     ,   9.122135  ,   2.37      ],
                              [  8.172     ,   1.824425  ,   2.37      ],
                              [  8.172     ,   7.297705  ,   2.37      ],
                              [  5.        ,   7.297705  ,   2.37      ],
                              [  5.        ,   1.824425  ,   2.37      ],
                              [  6.586     ,   3.648855  ,   2.37      ],
                              [  8.172     ,   4.561065  ,   3.95      ],
                              [  6.586     ,   6.385495  ,   3.95      ],
                              [  5.        ,   4.561065  ,   3.95      ],
                              [  5.        ,  10.034345  ,   3.95      ],
                              [  6.586     ,   0.912215  ,   3.95      ],
                              [  8.172     ,  10.034345  ,   3.95      ],
                              [  6.586     ,   9.122135  ,   5.53      ],
                              [  6.586     ,   3.648855  ,   5.53      ],
                              [  5.        ,   7.297705  ,   5.53      ],
                              [  8.172     ,   1.824425  ,   5.53      ],
                              [  8.172     ,   7.297705  ,   5.53      ],
                              [  5.        ,   1.824425  ,   5.53      ],
                              [  8.17273822,   4.5597421 ,   7.10893146],
                              [  6.58779066,   6.38548616,   7.10976081],
                              [  6.586     ,   0.912215  ,   7.11      ],
                              [  5.        ,  10.034345  ,   7.11      ],
                              [  8.172     ,  10.034345  ,   7.11      ],
                              [  5.01682695,   4.55707024,   7.14298238],
                              [  8.1721717 ,   1.82501485,   8.68790182],
                              [  6.586     ,   9.122135  ,   8.69      ],
                              [  8.17229847,   7.29879878,   8.69131041],
                              [  5.01731892,   1.85637138,   8.70283463],
                              [  5.01756127,   7.27016182,   8.71088609],
                              [  6.62346376,   3.68354863,   8.74905406]]*Angstrom

# Set up configuration
left_electrode = BulkConfiguration(
    bravais_lattice=left_electrode_lattice,
    elements=left_electrode_elements,
    cartesian_coordinates=left_electrode_coordinates
    )

# -------------------------------------------------------------
# Right electrode
# -------------------------------------------------------------

# Set up lattice
vector_a = [13.172, 0.0, 0.0]*Angstrom
vector_b = [0.0, 10.94656, 0.0]*Angstrom
vector_c = [0.0, 0.0, 9.48]*Angstrom
right_electrode_lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
right_electrode_elements = [Sulfur, Sulfur, Molybdenum, Sulfur, Molybdenum, Sulfur, Molybdenum,
                            Sulfur, Sulfur, Molybdenum, Sulfur, Sulfur, Sulfur, Sulfur,
                            Sulfur, Sulfur, Molybdenum, Molybdenum, Molybdenum, Sulfur, Sulfur,
                            Molybdenum, Sulfur, Sulfur, Molybdenum, Molybdenum, Sulfur, Sulfur,
                            Sulfur, Sulfur, Sulfur, Sulfur, Sulfur, Molybdenum, Molybdenum,
                            Sulfur]

# Define coordinates
right_electrode_coordinates = [[  5.01688382,   4.5571484 ,   0.75677638],
                               [  5.        ,  10.034345  ,   0.79      ],
                               [  6.586     ,   0.912215  ,   0.79      ],
                               [  8.172     ,  10.034345  ,   0.79      ],
                               [  6.58766598,   6.38544301,   0.790323  ],
                               [  8.17260236,   4.55959415,   0.79112081],
                               [  6.586     ,   9.122135  ,   2.37      ],
                               [  5.        ,   1.824425  ,   2.37      ],
                               [  8.172     ,   7.297705  ,   2.37      ],
                               [  6.586     ,   3.648855  ,   2.37      ],
                               [  8.172     ,   1.824425  ,   2.37      ],
                               [  5.        ,   7.297705  ,   2.37      ],
                               [  8.172     ,   4.561065  ,   3.95      ],
                               [  8.172     ,  10.034345  ,   3.95      ],
                               [  5.        ,  10.034345  ,   3.95      ],
                               [  5.        ,   4.561065  ,   3.95      ],
                               [  6.586     ,   0.912215  ,   3.95      ],
                               [  6.586     ,   6.385495  ,   3.95      ],
                               [  6.586     ,   9.122135  ,   5.53      ],
                               [  8.172     ,   7.297705  ,   5.53      ],
                               [  5.        ,   1.824425  ,   5.53      ],
                               [  6.586     ,   3.648855  ,   5.53      ],
                               [  5.        ,   7.297705  ,   5.53      ],
                               [  8.172     ,   1.824425  ,   5.53      ],
                               [  6.586     ,   0.912215  ,   7.11      ],
                               [  6.586     ,   6.385495  ,   7.11      ],
                               [  5.        ,  10.034345  ,   7.11      ],
                               [  5.        ,   4.561065  ,   7.11      ],
                               [  8.172     ,  10.034345  ,   7.11      ],
                               [  8.172     ,   4.561065  ,   7.11      ],
                               [  8.172     ,   7.297705  ,   8.69      ],
                               [  8.172     ,   1.824425  ,   8.69      ],
                               [  5.        ,   1.824425  ,   8.69      ],
                               [  6.586     ,   9.122135  ,   8.69      ],
                               [  6.586     ,   3.648855  ,   8.69      ],
                               [  5.        ,   7.297705  ,   8.69      ]]*Angstrom

# Set up configuration
right_electrode = BulkConfiguration(
    bravais_lattice=right_electrode_lattice,
    elements=right_electrode_elements,
    cartesian_coordinates=right_electrode_coordinates
    )

# -------------------------------------------------------------
# Central region
# -------------------------------------------------------------

# Set up lattice
vector_a = [13.172, 0.0, 0.0]*Angstrom
vector_b = [0.0, 10.94656, 0.0]*Angstrom
vector_c = [0.0, 0.0, 22.12]*Angstrom
central_region_lattice = UnitCell(vector_a, vector_b, vector_c)

# Define elements
central_region_elements = [Molybdenum, Sulfur, Sulfur, Sulfur, Sulfur, Molybdenum, Molybdenum,
                           Sulfur, Sulfur, Sulfur, Sulfur, Molybdenum, Sulfur, Molybdenum,
                           Sulfur, Sulfur, Molybdenum, Sulfur, Molybdenum, Molybdenum, Sulfur,
                           Sulfur, Sulfur, Sulfur, Sulfur, Molybdenum, Molybdenum, Sulfur,
                           Sulfur, Sulfur, Sulfur, Molybdenum, Sulfur, Sulfur, Sulfur,
                           Molybdenum, Molybdenum, Nitrogen, Sulfur, Sulfur, Sulfur,
                           Molybdenum, Molybdenum, Sulfur, Sulfur, Sulfur, Molybdenum, Sulfur,
                           Sulfur, Sulfur, Molybdenum, Sulfur, Molybdenum, Sulfur, Molybdenum,
                           Sulfur, Sulfur, Molybdenum, Sulfur, Sulfur, Sulfur, Sulfur,
                           Sulfur, Sulfur, Molybdenum, Molybdenum, Molybdenum, Sulfur, Sulfur,
                           Molybdenum, Sulfur, Sulfur, Molybdenum, Molybdenum, Sulfur, Sulfur,
                           Sulfur, Sulfur, Sulfur, Sulfur, Sulfur, Molybdenum, Molybdenum,
                           Sulfur]

# Define coordinates
central_region_coordinates = [[  6.586     ,   0.912215  ,   0.79      ],
                              [  8.172     ,   4.561065  ,   0.79      ],
                              [  8.172     ,  10.034345  ,   0.79      ],
                              [  5.        ,  10.034345  ,   0.79      ],
                              [  5.        ,   4.561065  ,   0.79      ],
                              [  6.586     ,   6.385495  ,   0.79      ],
                              [  6.586     ,   9.122135  ,   2.37      ],
                              [  8.172     ,   1.824425  ,   2.37      ],
                              [  8.172     ,   7.297705  ,   2.37      ],
                              [  5.        ,   7.297705  ,   2.37      ],
                              [  5.        ,   1.824425  ,   2.37      ],
                              [  6.586     ,   3.648855  ,   2.37      ],
                              [  8.172     ,   4.561065  ,   3.95      ],
                              [  6.586     ,   6.385495  ,   3.95      ],
                              [  5.        ,   4.561065  ,   3.95      ],
                              [  5.        ,  10.034345  ,   3.95      ],
                              [  6.586     ,   0.912215  ,   3.95      ],
                              [  8.172     ,  10.034345  ,   3.95      ],
                              [  6.586     ,   9.122135  ,   5.53      ],
                              [  6.586     ,   3.648855  ,   5.53      ],
                              [  5.        ,   7.297705  ,   5.53      ],
                              [  8.172     ,   1.824425  ,   5.53      ],
                              [  8.172     ,   7.297705  ,   5.53      ],
                              [  5.        ,   1.824425  ,   5.53      ],
                              [  8.17273822,   4.5597421 ,   7.10893146],
                              [  6.58779066,   6.38548616,   7.10976081],
                              [  6.586     ,   0.912215  ,   7.11      ],
                              [  5.        ,  10.034345  ,   7.11      ],
                              [  8.172     ,  10.034345  ,   7.11      ],
                              [  5.01682695,   4.55707024,   7.14298238],
                              [  8.1721717 ,   1.82501485,   8.68790182],
                              [  6.586     ,   9.122135  ,   8.69      ],
                              [  8.17229847,   7.29879878,   8.69131041],
                              [  5.01731892,   1.85637138,   8.70283463],
                              [  5.01756127,   7.27016182,   8.71088609],
                              [  6.62346376,   3.68354863,   8.74905406],
                              [  6.5876179 ,   0.91130968,  10.26983443],
                              [  5.59827839,   4.56059523,  10.26994231],
                              [  8.172     ,  10.034345  ,  10.27      ],
                              [  5.        ,  10.034345  ,  10.27      ],
                              [  8.33498485,   4.56088264,  10.27000223],
                              [  6.62327856,   6.31588444,  10.27037848],
                              [  6.62338152,   3.68355084,  11.79065483],
                              [  5.0172326 ,   7.27047134,  11.82955335],
                              [  5.01735904,   1.85679472,  11.83687065],
                              [  8.17237071,   7.29879284,  11.84963777],
                              [  6.586     ,   9.122135  ,  11.85      ],
                              [  8.17218961,   1.82494187,  11.85192361],
                              [  5.01688382,   4.5571484 ,  13.39677638],
                              [  5.        ,  10.034345  ,  13.43      ],
                              [  6.586     ,   0.912215  ,  13.43      ],
                              [  8.172     ,  10.034345  ,  13.43      ],
                              [  6.58766598,   6.38544301,  13.430323  ],
                              [  8.17260236,   4.55959415,  13.43112081],
                              [  6.586     ,   9.122135  ,  15.01      ],
                              [  5.        ,   1.824425  ,  15.01      ],
                              [  8.172     ,   7.297705  ,  15.01      ],
                              [  6.586     ,   3.648855  ,  15.01      ],
                              [  8.172     ,   1.824425  ,  15.01      ],
                              [  5.        ,   7.297705  ,  15.01      ],
                              [  8.172     ,   4.561065  ,  16.59      ],
                              [  8.172     ,  10.034345  ,  16.59      ],
                              [  5.        ,  10.034345  ,  16.59      ],
                              [  5.        ,   4.561065  ,  16.59      ],
                              [  6.586     ,   0.912215  ,  16.59      ],
                              [  6.586     ,   6.385495  ,  16.59      ],
                              [  6.586     ,   9.122135  ,  18.17      ],
                              [  8.172     ,   7.297705  ,  18.17      ],
                              [  5.        ,   1.824425  ,  18.17      ],
                              [  6.586     ,   3.648855  ,  18.17      ],
                              [  5.        ,   7.297705  ,  18.17      ],
                              [  8.172     ,   1.824425  ,  18.17      ],
                              [  6.586     ,   0.912215  ,  19.75      ],
                              [  6.586     ,   6.385495  ,  19.75      ],
                              [  5.        ,  10.034345  ,  19.75      ],
                              [  5.        ,   4.561065  ,  19.75      ],
                              [  8.172     ,  10.034345  ,  19.75      ],
                              [  8.172     ,   4.561065  ,  19.75      ],
                              [  8.172     ,   7.297705  ,  21.33      ],
                              [  8.172     ,   1.824425  ,  21.33      ],
                              [  5.        ,   1.824425  ,  21.33      ],
                              [  6.586     ,   9.122135  ,  21.33      ],
                              [  6.586     ,   3.648855  ,  21.33      ],
                              [  5.        ,   7.297705  ,  21.33      ]]*Angstrom

# Set up configuration
central_region = BulkConfiguration(
    bravais_lattice=central_region_lattice,
    elements=central_region_elements,
    cartesian_coordinates=central_region_coordinates
    )

device_configuration = DeviceConfiguration(
    central_region,
    [left_electrode, right_electrode]
    )
In the setting,the k-point sampling is kA=1,KB=3,Kc=100,and the nA, nB in transmission spectrum calculation is 1 and 100 respectively.

Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
That warning just tells you that the self-consistent calculation is not converged. You can increase the maximum iteration step and then restart the job.

Offline yongjunwinwin

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: cn
  • Reputation: 1
    • View Profile
Can I set the electron temperature to 1000K as suggested in the tutorial to improve the convergence? Will it affect the accuracy of the result?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
One can try that, but otherwise it's a bit hard to advise without a bit more info. Is it about to converge, or is dH and dE still fluctuating wildly after 100 iterations? Which basis set is used?

Offline mldavidhuang

  • Heavy QuantumATK user
  • ***
  • Posts: 42
  • Country: cn
  • Reputation: 0
    • View Profile
It seems there is no trend to converge even after 100 iterations, part of dH and dE after 100 is attached, and the basis set is double-zeta polarized.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
It's not terrible, but not really good either :) You could try a bit more k-points and perhaps also higher temperature.

Have you tried basic band structure calculations of the MoS2 sheet to see how it reacts to k-points?

Offline mldavidhuang

  • Heavy QuantumATK user
  • ***
  • Posts: 42
  • Country: cn
  • Reputation: 0
    • View Profile
I have not tried the basis band structure calculation of MoS2 sheet, do you mean the sheet with the same dimension of the electrode? how to find the the appropriate k-points?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
I'd start with just the basic unit cell of MoS2, of course in the sheet configuration. It's generally a good idea to understand the fundamental properties of the material you are investigating, before going to a more complex structure of it.

Offline mldavidhuang

  • Heavy QuantumATK user
  • ***
  • Posts: 42
  • Country: cn
  • Reputation: 0
    • View Profile
I have calculated the band structure of MoS2 with the unit cell(hexagonal), but the dimension of the unit cell is different from the electrodes in the device model, Can the K-sampling testing from the unit cell apply to the electrodes in the device model?

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
If your unit cell is a repeated copy of the basic unit cell, one can reduce the k-points a bit. For instance, if you normally use 9x9 k-points for gold, but you make a 3x3 repeated cell, then you can use 3x3 k-points and it will be the exact same.

For MoS2, since it doesn't really appear to have any weird points in the Brillouin zone, judging from the band structure, you should be able to use the same rule.

Offline yongjunwinwin

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: cn
  • Reputation: 1
    • View Profile
Re: A warning about convergence when calculating transport properties
« Reply #10 on: September 4, 2011, 14:44 »
Actually I find it hard to test k-point for device calculation. As the unit cell(the second attachment) used in the device construction(the first attachment) is different from the unit cell of bulk (the third attachment). It is not possible to calculate the band structure using the unit cell shown in the first attachment.
So how can I find the suitable k-point for device calculation?


Offline zh

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1141
  • Reputation: 24
    • View Profile
Re: A warning about convergence when calculating transport properties
« Reply #11 on: September 5, 2011, 09:29 »
The periodicities along the A and B directions in the device configurations are the same as those in the bulk configuration. So you can first do the test calculations of k-point (for the A and B directions of unit cell) for the bulk configuration, and then do the test calculations of k-point (for the C direction of unit cell) for the device configuration. In the second step, the numbers of k-points along the A and B directions of device configuration are kept same as those in the bulk configuration.

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5576
  • Country: dk
  • Reputation: 96
    • View Profile
    • QuantumATK at Synopsys
Re: A warning about convergence when calculating transport properties
« Reply #12 on: September 5, 2011, 20:49 »
I think I understand what you mean, yongjunwinwin. If you try to compute the band structure of a supercell using the VNL Scripter, you only get symmetry points G and Z. However, X and Y are actually also available, so you can change the route to "G, X, Y, G". This will not give a band structure which makes sense in the traditional sense, i.e. it cannot be compared to the bands of the basic unit cell. But that's not the purpose here anyway, we just want to see how the bands change when we increase the k-point sampling.

It can be a bit hard to judge by eye precisely how much the band structure changes, of course, so a more numerical approach would be to just study the total energy as function of k-points. The slight problem with this is that convergence is slow and usually jumps a bit, so you may find that ideally you need unrealistically many k-points if you demand 1e-5 eV accuracy or something like that. But at least you can make an active choice with this data available.

For some details on this, I strongly recommend the excellent review article "Designing meaningful density functional theory calculations in materials science - a primer" by A. E. Mattsson et al. (Modelling Simul. Mater. Sci. Eng. 13, R1–R31 (2005)).

Finally, it may be interesting to apply the rules listed at https://wiki.fysik.dtu.dk/gpaw/exercises/surface/surface.html (the "Hint" at the bottom half of the back), at least for an idea of the number of k-points to try.

Offline yongjunwinwin

  • Heavy QuantumATK user
  • ***
  • Posts: 36
  • Country: cn
  • Reputation: 1
    • View Profile
Re: A warning about convergence when calculating transport properties
« Reply #13 on: September 6, 2011, 09:24 »
Thanks! That's quite instructive!