Author Topic: Optimising the geometry of very large nanoparticles  (Read 729 times)

martijn

  • Full Member
  • ***
  • Posts: 43
  • Karma: +0/-0
Optimising the geometry of very large nanoparticles
« on: November 07, 2020, 02:38:39 AM »
Hi,

I have this weird problem. I'm using Turbomole 7.5 to optimise the geometry of rocksalt nanoparticles using B3LYP+D3/TZVPP and for particles with roughly 100 atoms that works absolutely fine. Jobex + STATPT converges without too much problems to a minimum.

For larger particles, containing ~200 atoms, however, things become problematic. Convergence becomes tediously slow, the trust radius shrinks to the minimum and after hundreds of steps the gradient is typically only slightly smaller and the energy slightly more negative. All this while the structure of these nanoparticles is very similar to the smaller ones where the convergence is fine.

The other issues is that a number of issues we optimised similar size nanoparticles with a similar set-up, other than that we didn't use the D3 dispersion correction at the time and used a 6.x version of Turbomole, and if memory serves me well we never encountered these sorts of problems.

Having tried seemingly anything, smaller basis-sets, no dispersion correction, using relax rather than statpt, I'm stuck. Am I just unlucky or is there some trick to optimising these very large structures?

Thanks,

Martijn

antti_karttunen

  • Sr. Member
  • ****
  • Posts: 213
  • Karma: +1/-0
Re: Optimising the geometry of very large nanoparticles
« Reply #1 on: November 07, 2020, 12:25:03 PM »
Hi Martijn,

sounds like a tricky problem indeed. I don't have any solid advice, but at least some thoughts:

1) You mention that the trust radius shrinks to the minimum value. What if you increase the minimum trust radius (statpt option "radmin") to force the optimization algorithm to take larger steps? Note that this might also be a bad idea that removes even the slow convergence behavior that you see at the moment :D.

2) Have you tried optimization in cartesian coordinates? For "normal" molecules, redundant internals practically always yield better performance, but maybe this kind of rocksalt nanostructure is not that great for redundant internals, especially if you have a very ionic scenario. Similar to my comment (1), switching to cartesian coordinates may eventually lead to even worse behavior, but could be worth checking out.

Best,
Antti

Marek Sierka

  • Developers
  • Jr. Member
  • *
  • Posts: 21
  • Karma: +0/-0
    • Sierkalab
Re: Optimising the geometry of very large nanoparticles
« Reply #2 on: November 08, 2020, 06:51:35 PM »
Hi Martijn,

the trust radius shrinking to the minimum usually indicates that the PES is not smooth enough. In large systems, the reason for this may be too small DFT grid or SCF thresholds that are too loose.

Best, Marek

martijn

  • Full Member
  • ***
  • Posts: 43
  • Karma: +0/-0
Re: Optimising the geometry of very large nanoparticles
« Reply #3 on: November 23, 2020, 09:51:36 PM »
Thanks Antti & Marek, I did some testing using smaller basis-sets to speed up calculations:

First:

B3LYP+D3(BJ)/def-SV(P)/scfconv=7/m5 -> geometry optimisation converges without problems.
B3LYP+D3(BJ)/def2-SVP/scfconv=7/m5 -> geometry optimisation does not converge. Gradient get stuck. Trust radius shrinks to zero.


This made me wonder if there was an issue with the integral screening tolerance, also because that changes with the basis-set size, so I manual set $scftol to 1E-16:

B3LYP+D3(BJ)/def2-SVP/scfconv=7/m5/scftol=1E-16 -> geometry optimisation does not converge. Gradient get stuck. Trust radius shrinks to zero.

In a last ditch attempt, I increased the SCF tolerance from 7 to 8:

B3LYP+D3(BJ)/def2-SVP/scfconv=8/m5/scftol=1E-16 -> geometry optimisation converges without problems.

For smaller particles scfconv 7 or even 6 works fine in terms of geometry optimisation. The effect of changing the scf tolerance on SCF energies of the large particles is negligible:

B3LYP+D3(BJ)/def2-SVP/scfconv=7/m5/scftol=1E-16 -> SCF energy =   -29733.7250655300   |dE/dxyz| =  0.119037
B3LYP+D3(BJ)/def2-SVP/scfconv=8/m5/scftol=1E-16 -> SCF energy =   -29733.7250703000   |dE/dxyz| =  0.036580


but the gradient for this large particles is clearly very sensitive to the scf tolerance value. Much more sensitive than i expected.

I'll now try to repeat the def2-TZVPP calculation using scfconv=8.

Best,

Martijn

antti_karttunen

  • Sr. Member
  • ****
  • Posts: 213
  • Karma: +1/-0
Re: Optimising the geometry of very large nanoparticles
« Reply #4 on: November 24, 2020, 05:44:17 PM »
Thanks a lot for the update Martijn, this was interesting information. Are you using ridft+rdgrad for your calculations?

Best,
Antti

martijn

  • Full Member
  • ***
  • Posts: 43
  • Karma: +0/-0
Re: Optimising the geometry of very large nanoparticles
« Reply #5 on: November 24, 2020, 11:31:28 PM »
Thanks Antti. No this straight, unadulterated DFT using dscf/grad. Might have to switch to ridft+rdgrad though if I would want to look at even larger particles.

Best,

Martijn

uwe

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 483
  • Karma: +0/-0
Re: Optimising the geometry of very large nanoparticles
« Reply #6 on: November 26, 2020, 12:30:16 PM »
Hello,

thanks a lot for those really useful tests and findings!

The SCF integral thresholds which are derived from $scfconv settings do take care of the number of basis sets already, and they are also adapted depending on the property which is being calculated. Also the 'diffuseness' can be important and is partly checked.

But it is really unusual to have those problems with the gradients already. 2nd derivatives, NMR, etc. is not unexpected, but gradients...

Is it a very delocalized system? But rocksalts are semiconductors.

The interesting question is: Where do the numerical problems come from? From which part - DFT functional, Exchange, Coulomb, ...?
But to answer that and to potentially find out where to change the defaults, it is necessary to get those contributions separately.

I therefore would like to ask you to send the input files to the support team!

Best Regards,
Uwe

martijn

  • Full Member
  • ***
  • Posts: 43
  • Karma: +0/-0
Re: Optimising the geometry of very large nanoparticles
« Reply #7 on: December 01, 2020, 11:51:12 AM »
Hi Uwe,

Sure, which email address do you want me to use? biovia.turbomole.support@3ds.com, which I used to use, bounces the email back, as the email address is not known on the server.

The MgO rocksalt particles are insulators, with a B3LYP HOMO-LUMO gap of 3.8 eV for the $scfconv 8 optimized structure (and the last geometry in the non-converging $scfconv 7 calculation has a similar gap). Visualizing the frontier orbitals suggest that they are as expected well localized. The SCF calculations themselves converge well.

The reason I started playing with $scfconv and $scftol, after first spending a couple of months of hitting my head against a concrete wall, was based on a hunch based on probably a poor analogy with calculations on periodic crystals, where SCF tolerances are crucial.

In other news, the def2-TZVPP calculations on the same cluster are progressing slowly but seem to require $scfconv 9 to not run into the same problems.

Best,

Martijn

uwe

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 483
  • Karma: +0/-0
Re: Optimising the geometry of very large nanoparticles
« Reply #8 on: December 01, 2020, 06:41:36 PM »
Hi Martijn,

you are right, this email is not working any more, it was obviously deactivated recently. Sorry for the inconvenience! Please contact the support the 'usual' way. Or send it directly to me.

The $scftol keyword is mentioned as a way to solve SCF convergence problems in the FAQ, but this should be extended to general convergence problems - SCF, geometry optimizations (new to me but seems to be the case here), but also for e.g. vibrational frequencies, TDDFT or whenever one has to solve coupled perturbed HF/KS equations. It should be of importance only for cases with a very large amount of small contributions which sum up to something that contributes significantly.

If you have
- diffuse basis set
- complicated electronic structure
- higher derivatives of DFT functionals or a generally numerically challenging functional like SCAN
- a small lowest eigenvalue of the overlap matrix (too many basis functions at one place, e.g. using diffuse basis set for a fullerene which leads to a large number of basis sets inside)
- a lot of other things that do not come to my mind right now

convergence of whatever kind can be difficult. The most common ways to get around:

- tighter SCF and density convergence criteria,
- starting from a smaller basis set and then extending it to a large one while using the converged orbitals from the first job
- checking the input structure and running a pre-optimization with e.g. xtb (jobex -level xtb is very helpful in many cases)
- DFT: increased gridsize (m3 -> m4 or a non-m-grid size like 4), increased number of radial gridpoints (radsize 10 or 12 in $dft), more diffuse grid for diffuse basis set (diffuse 3 or diffuse 4 in the $dft section)
- tighter integral screening ($scftol 1d-15, $scftol 1d-16, ...)
- higher DIIS damping, but in a non-automated way, i.e. by checking that the damping is not too high such that one gets convergence just because the step size is too small
- increased orbital shift, but again, doing too much can give artificial convergence
- and probably a lot more technical tricks like fractional occupation numbers with $fermi (if you know some, please write them down in this topic)

Turbomole is a tool with pre-defined settings which do work quite well and quick in most cases, but there are a lot of adjustable screws.

Best Regards,

Uwe

PS: The fact that knocking down walls with your head is of no help should be noted in the FAQ, don't you think?  ;)