Author Topic: atomic relaxation problem  (Read 3538 times)

0 Members and 1 Guest are viewing this topic.

Offline Cyrille

  • Heavy QuantumATK user
  • ***
  • Posts: 62
  • Country: fr
  • Reputation: 0
    • View Profile
atomic relaxation problem
« on: October 3, 2016, 16:04 »
Dear all

I am trying to relax a molecular network but the optimization process is extremely long and the forces keep oscillating. Even though the total energy is slightly going down it takes ages to reach a local minimum.

I have attached the python script to my email. The system is indeed rather complex but I am quite sure there are ways to tweak the parameters to accelerate the convergence.

thanks in advance

Cyrille

Offline Petr Khomyakov

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 1290
  • Country: dk
  • Reputation: 25
    • View Profile
Re: atomic relaxation problem
« Reply #1 on: October 6, 2016, 18:36 »
You may first try relaxing the structure without spin-polarization included, i.e., using GGA instead of SGGA, and then do geometry optimization with SGGA to refine the structure.

Offline Cyrille

  • Heavy QuantumATK user
  • ***
  • Posts: 62
  • Country: fr
  • Reputation: 0
    • View Profile
Re: atomic relaxation problem
« Reply #2 on: October 7, 2016, 10:38 »
Thanks Petr

Unfortunately the spin polarization is crucial in these molecules where atomic structure is intimately related to the magnetism. So I cannot do what you propose. I admit that this is a rather delicate system.

I was more thinking of using another relaxation scheme or tuning the parameters of the algorithm. Or maybe using a finer mesh..

Cyrille

Offline Ulrik G. Vej-Hansen

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 425
  • Country: dk
  • Reputation: 8
    • View Profile
Re: atomic relaxation problem
« Reply #3 on: October 7, 2016, 10:46 »
Based on what you describe, my first advice is to increase memory_size to 30 or 40. This will save more information in the Hessian, but can of course also lead to memory problems. See also the RefMan entry for LBFGS:
docs.quantumwise.com/manuals/Types/LBFGS/LBFGS.html

My second advice would be to try increasing the mesh cutoff, as you propose yourself. It should give you slightly more accurate forces, which might make the difference in this case.

Other things you could try, but which will probably not help, are line_search=False and using FIRE instead of LBFGS. FIRE might not show these oscillations, but it is usually slower than LBFGS.


Offline Daniele Stradi

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 286
  • Country: dk
  • Reputation: 3
    • View Profile
Re: atomic relaxation problem
« Reply #4 on: October 7, 2016, 11:28 »
Hi Cyrille,

I addition to the comments by Ulrik and Petr:

1) Where are the maximum forces located? Are they on the core of the molecular network, or on the hydrogen atoms? Hydrogen atoms can be quite painful to relax, because their movement leads only to tiny changes on the potential energy surface, but you have a lot of H atoms in your structure.

2) You are using the PBE functional, which - by personal experience - gives rather flat minima for H-bonded potential energy surfaces, or more in general surfaces involving H atoms.

3) you are using a SZP basis set for all atoms, which might also results in a poor description of the potential energy surface, if the minimum in the potential energy surface turns out to be rather flat.

My suggestion is that in the spirit of quantum-chemistry calculations, you perform the optimization stepwise: first a rough (0.05 eV - 0.025 eV/Ang) optimization with SZP basis set, then a more accurate (0.01 eV/Ang) optimization using a SZP or better an SG15 basis set (Medium or High). Notice that SG15 basis sets are more long ranged than FHI basis sets, so they might work better for system with rather flat potential energy surfaces.

Cheers,
Daniele.

Offline Cyrille

  • Heavy QuantumATK user
  • ***
  • Posts: 62
  • Country: fr
  • Reputation: 0
    • View Profile
Re: atomic relaxation problem
« Reply #5 on: October 7, 2016, 13:57 »
Thanks a lot for these advices.

I have started with a SZP basis set since it is cheaper for a first run but I realized it was almost impossible to get below 0.05eV/A. I do not see that particular atoms are more difficult than other but I admit that these are complex systems (so called spin-crossover)
Then I was planning to improve the calculation with a better basis set: DZP or SG15.
Maybe SG15 are harder and I need finer meshes?

Cyrille

Offline Daniele Stradi

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 286
  • Country: dk
  • Reputation: 3
    • View Profile
Re: atomic relaxation problem
« Reply #6 on: October 7, 2016, 15:13 »
I would say that for a system such as this one getting to 0.05 eV/Ang with SZP is quite good :)

SG15 basis set should be converged with 100 Ha cutoff, so your 150 cutoff should be sufficient. In few days we will have on docs.quantumwise.com the tables with the delta tests (https://molmod.ugent.be/deltacodesdft) for all the ATK basis sets online to help you choose basis set and potentials.

Daniele

Offline Cyrille

  • Heavy QuantumATK user
  • ***
  • Posts: 62
  • Country: fr
  • Reputation: 0
    • View Profile
Re: atomic relaxation problem
« Reply #7 on: October 7, 2016, 15:34 »
Yes I was quite happy to manage getting 0.05eV/A after several restarts because the relaxation took longer than expected..
I am even more happy since I got the result I was looking for since several months!
Maybe I should not try to change the basis set: I could deteriorate the agreement with experimental results:-)

Cyrille

Offline Daniele Stradi

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 286
  • Country: dk
  • Reputation: 3
    • View Profile
Re: atomic relaxation problem
« Reply #8 on: October 7, 2016, 15:38 »
Convergence with local basis set is not systematic, so it does not necessarily means that you will get a better result by making the basis larger and larger.

Daniele
« Last Edit: October 8, 2016, 09:54 by Daniele Stradi »

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5418
  • Country: dk
  • Reputation: 89
    • View Profile
    • QuantumATK at Synopsys
Re: atomic relaxation problem
« Reply #9 on: October 7, 2016, 20:13 »
Sorry for sidelining a bit here, but I think a valuable lesson (sometimes) is that you don't necessarily get results faster by first using a quick-and-dirty method and then refining, esp. if the faster method is not giving you the correct physics it might not even converge (a good example is that you can converge faster with more k-points, just because you use fewer SCF steps, even if each step is slower) and second if the more accurate has to move far from the minimum of the first solution, it can spend about the same time as if you just started with the slower method from the beginning. But, each problem is unique and we need to have a lot tricks up our sleeves :)

Offline Daniele Stradi

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 286
  • Country: dk
  • Reputation: 3
    • View Profile
Re: atomic relaxation problem
« Reply #10 on: October 8, 2016, 09:55 »
I agree with Anders, sometimes it is worth thinking in terms of "time to solution"  :)
« Last Edit: October 8, 2016, 10:02 by Daniele Stradi »