Author Topic: SCF Loop restarting again  (Read 5719 times)

0 Members and 1 Guest are viewing this topic.

Offline hsuya

  • Heavy QuantumATK user
  • ***
  • Posts: 78
  • Country: in
  • Reputation: 0
    • View Profile
SCF Loop restarting again
« on: October 30, 2019, 10:04 »
I used plane wave basis set for geometrical optimization of MoS2 4x4x1 supercell however the SCF loop is starting again even though it converged a while back.

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: SCF Loop restarting again
« Reply #1 on: October 30, 2019, 10:41 »
A single SCF loop has converged, but not the geometry optimization that requires many SCF loops to get to the equilibrium structure of your system.

I have also noticed that the convergence is not great in your PW calculations, as there were several SCF loops where the convergence was not reached in the given number of steps. I would suggest to try using Preconditioner in the Iteration Control in the Scripter. 

Offline hsuya

  • Heavy QuantumATK user
  • ***
  • Posts: 78
  • Country: in
  • Reputation: 0
    • View Profile
Re: SCF Loop restarting again
« Reply #2 on: October 30, 2019, 11:01 »
Is there any tutorial on how to set preconditioner or can you suggest what to insert there?

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: SCF Loop restarting again
« Reply #3 on: October 30, 2019, 11:09 »
First, just enable it. Second, there is a manual page about it, see https://docs.quantumatk.com/manual/includes/Preconditioners.html.

Offline hsuya

  • Heavy QuantumATK user
  • ***
  • Posts: 78
  • Country: in
  • Reputation: 0
    • View Profile
Re: SCF Loop restarting again
« Reply #4 on: October 31, 2019, 06:08 »
I enabled preconditioner as you asked and now it is converging. However it has been running for a long time, is it usual for this loop to run over and over again while optimizing geometry.

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: SCF Loop restarting again
« Reply #5 on: October 31, 2019, 10:13 »
It should go through multiple SCF loops, because any time the LBFGS optimizer changes the structure, driving it to an equilibrium structure for which all the forces are "zero" within the tolerance you set in the Scripter/script
   
max_forces=0.03*eV/Ang

+------------------------------------------------------------------------------+
| Geometry optimization using the LBFGS optimizer                              |
+------------------------------------------------------------------------------+
|        Step     Step Length      Max. Force             Energy               |
|                       (Ang)        (eV/Ang)               (eV)               |
+------------------------------------------------------------------------------+
|           0      0.0000e+00      4.0041e+00      -40135.478899               |
|           1      2.0000e-01      1.1423e+00      -40137.323261               |
|           2      4.6760e-02      7.4695e-01      -40137.538522               |
|           3      7.9148e-02      1.2193e+00      -40137.853745               |
|           4      2.6706e-02      1.4235e+00      -40138.020047               |
|           5      2.8210e-02      1.6806e+00      -40138.166096               |
|           6      1.1690e-01      2.3567e+00      -40138.820735               |
|           7      2.0000e-01      9.7661e-01      -40139.703397               |
|           8      9.9314e-02      1.1438e+00      -40139.863246               |
|           9      5.4046e-02      9.4682e-01      -40140.002456               |
|          10      1.2756e-01      4.7018e-01      -40140.122697               |
|          11      6.1008e-02      4.6303e-01      -40140.195363               |
|          12      4.1183e-02      3.2358e-01      -40140.243877               |
|          13      5.8123e-02      2.1091e-01      -40140.277489               |
|          14      4.2971e-02      3.1392e-01      -40140.303071               |
|          15      5.7956e-02      3.0720e-01      -40140.334225               |
|          16      1.5064e-01      3.6335e-01      -40140.387451               |
|          17      2.2279e-02      6.3920e-01      -40140.412303               |
| OPT      18      1.2906e-02      3.5978e-01      -40140.432661               |
+------------------------------------------------------------------------------+

The optimizer report suggests that after 19 steps (=SCF loops), the maximum force has decreased from 4 to 0.35978 eV/Ang. So, it needs more steps to get to the 0.03 eV/Ang set in the script. You should always look at the optimization report to see the optimization progress. It is always a good idea to save optimization trajectory to be able to restart the optimization in case something goes wrong with the job, see trajectory_filename in https://docs.quantumatk.com/manual/Types/OptimizeGeometry/OptimizeGeometry.html. In the current version, you should use hdf5 file, not nc.

 

Offline hsuya

  • Heavy QuantumATK user
  • ***
  • Posts: 78
  • Country: in
  • Reputation: 0
    • View Profile
Re: SCF Loop restarting again
« Reply #6 on: October 31, 2019, 10:35 »
Thanks I will keep this in mind.
So when the  "Max. Force (eV/Ang)" will be equal or less than 0.03 eV/Ang  geometry optimization will be complete??

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: SCF Loop restarting again
« Reply #7 on: October 31, 2019, 10:57 »
Yes, unless it does not converge to 0.03, then the optimization will stop after 200 optimization steps as set by another parameter in your script (or the Scripter in the GUI).

Offline hsuya

  • Heavy QuantumATK user
  • ***
  • Posts: 78
  • Country: in
  • Reputation: 0
    • View Profile
Re: SCF Loop restarting again
« Reply #8 on: October 31, 2019, 11:53 »
Okay so the 200 optimization steps means 200 SCF loops.