Part of LOM

This blog is part of web activities of the Laboratory of Organic Materials (LOM) of the Institute of Solid State Physics of the University of Latvia.

Friday, May 13, 2022

Gaussian input section ordering: Gen + Generic + External iteration

Sometimes I need to calculate solvent-wise relaxed excited states with a basis set not built in Gaussian. Often when I am doing this I encounter an error: either the SCRF module is trying to interpret the basis as a solvent definition:

 Using the following non-standard input for PCM:
 C H N O 0
 ------------------------------------------------------------------------------
 The following wrong keyword(s) have been found:
 C
 
 
 
 0
 ------------------------------------------------------------------------------

  or the actual solvent definition is confusing the program: 

 Unrecognized atomic symbolNonEq

 So what is going on? If we look at the official Gaussian page for the Input section ordering [1]:

 

we see that there are two SCRF sections! The problem with our input file was that we assumed that the ExternalIteration keyword is everywhere while in reality it is not present in the first job. Typically this happens because of the copy-paste attitude, also when the input files are prepared by a [non-ideally written] script.

The way I know works is as follows:

  1. For the first job with NonEq=Write we put the SCRF additional input after the Gen/GenECP additional input;
  2. For the rest of jobs, we do the opposite.
I hope this helps :)

 

[1] https://gaussian.com/input/

Sunday, November 7, 2021

Kā instalēt e-parakstu Ubuntu (ar fizisko karšu lasītāju).


 

Nākas uzrakstīt pašam, jo informācija internetos atšķiras no lapas uz lapu, galvenokārt jau svaiguma ziņā. Vietnē www.eparaksts.lv (puslīdz) aktuālā informācija ir šeit:

https://www.eparaksts.lv/download/eparakstitajs3-user-en_23012018_170527.pdf

Un nevis šeit:

https://www.eparaksts.lv/lv/lejupielades

Secība ir šāda:

1) dabūjam ierīces draiveri. Tas jāmeklē Google vai citā meklētājā; man ir DNIelectronico, kam mājaslapa ir tikai spāniski, bet viss ir aptuveni saprotams:

https://www.dnielectronico.es/portaldnie/PRF1_Cons02.action?pag=REF_1112

Neiesaku ņemt draiverus no jebkā, kas nav ražotāja mājaslapa, kā arī pirkt lasītāju, kam nav ražotāja mājaslapā Linux draiveri.

2) dabūjam AWP starpprogrammatūras pakotni no https://www.eparaksts.lv/lv/lejupielades (cilne "Starpprogrammatūra"). Vairāk neko no šejienes NELEJUPIELĀDĒJAM! Instalējot šo, apt automātiski pieinstalēs citas nepieciešamās lietas.

3) vēl ir vajadzīga viena cita starpprogrammatūra, latvia-eid-middleware, kas, kopā ar e-parakstītāja pakotni (deb, nevis tarball) ir pieejama LVRTC uzturētajā (kā izskatās) repozitorijā. Tā pievienošana ir aprakstīta minētajā pdf failā, bet ir jāatceras atjaunot distribūcijas versiju no xenial uz focal (vai kura nu būs LTS uz laiku, kad šo lasīsiet). Ja fails pazudīs, instrukciju dodu zemāk:

$ sudo wget -qO - https://www.eparaksts.lv/files/ep3updates/debian/public.key  | sudo apt-key add -
$ sudo apt-add-repository "deb https://www.eparaksts.lv/files/ep3updates/debian focal eparaksts"
$ sudo apt-add-repository --remove "deb-src https://www.eparaksts.lv/files/ep3updates/debian focal eparaksts"
$ sudo apt update
$ sudo apt install eparakstitajs3  latvia-eid-middleware eparaksts-token-signing

Voilá, viss, paldies Dievam, strādā!


Thursday, March 7, 2019

Comparative performance of QC programs, or Why you should [not] buy commercial software

Sometimes (e.g. when designing Your laboratory or Your project budget) You meet with the difficult choice of deciding which program to buy for Your computations. Or maybe just use a freeware or some with academic licence?

This is not so easy question, because that depends on what are You going to do. There are four main pros (or cons) of any computational code:
  • performance
  • availability of different methods
  • computational stability
  • ease of use.
Commercial codes have more tendency to excel in performance and stability, because their main clients are labs/research institutions for which quantum chemical computations are something auxiliary; they may host some computationalists but they are not the priority. All the good journals nowadays require comparison with quantum chemical/mechanical calculations, be it chemistry or molecular / solid-state physics; hence these researchers need to get their results
  • as soon as possible
  • as easily as possible.
What they usually do not care about much is
  • the quality of results (except when they disagree with they experimental ones).
Ease of use is less important if they have aforementioned computationalists.
Hence among the four main traits of QC software two or three are important for them – and these are the ones commercial institutions usually excel in (the performance and computational stability).

I checked performance for three programs (two academy-free and one commercial) for the following case:
Molecule: C34H32N2O4, mostly unsaturated, with no symmetry elements (72 atoms, 282 electrons, 210 degrees of freedom)
Computational model: B3LYP/6-31G(d,p), with B3LYP defined as in Gaussian and no solvent in the model (760 basis functions)
Computational tasks: geometry optimization and thermochemistry of the ground state.

The results are as following:

Geometry optimization time Gibbs free energy time
Commercial 1 1374 3209
Academic 1 3815 143394
Academic 2 36488


Final SCF energy Final Gibbs free energy
Commercial 1 -1725.348479 -1724.833152
Academic 1 -1725.314384 -1724.788763
Academic 2 -1725.314514


Here are the same data on pictures: 


 Looks impressive, doesn't it? It is this moment I realized why those commercial suites cost that much.

 So, should we use only commercial software? Again, it depends.
  • If You are doing many calculations routinely and either do not care about selecting the best method or want to use some of the community standards, then probably You should consider buying some commercial package.
  • If You are interested in using new methods out-of-the-box, consider using academic freeware because usually they contain more new methods.

Why are there usually more new methods in the freeware? The reason is simple: they don't need to spend their time and/or people on customer support and refining the robustness of the code of the ease of use. This is because these programs are written by people who understand what's going on for people who understand what's going on, hence both the authors and users has less urge to communicate.

The trade-off is, again, not that clear, because new methods may be computationally more effective even if the commonly used algorithms are less effective that in some commercial code which does not have this new method.

What about the customer service? Aren't there forums from which You can get the support? Well, there are, but, again. for the academic/freeware the community-based approach is invaluable. Commercial software may have some (2–4) people they are paying to reply to every message they get; for freeware, anyone who knows the answer will answer. When he or she has time. And if they know how to solve this particular problem which probably they haven't run into yet. Therefore, both cases have their advantages and disadvantages.

 These are my thoughts, so feel free to disagree :-)

Sunday, November 5, 2017

Density functionals in Gaussian 09, rev. A–E and Gaussian 16, rev. A—B: classified and with brief description

Some foreword here. The list itself comes below.

This post comes here instead of taking notes on paper that are available to myself only and are hard to expand.

To obtain full analogue of a wave function from density-related properties, one needs to use not only electron density ρ itself but also density matrix ρ2 (N×N, where N is number of electrons; it serves to build expression for kinetic energy) and the second-order density matrix γ2 (also N×N; it describes electron interaction) – see [2]. Kohn–Sham DFT actually accounts for the first two system charasteristics.[2] As there is hardly possible any simple substitution for the γ2, all density functionals are very approximate models (density functional approximation, DFA) and there is plenty of fitted parameters in some of them. All of them are built upon some theoretical models, assuming these or those approximations; parameters are fitted to satisfy few or many constraints. "Non-empirical functional" means therefore that the functional parameters are fitted to theoretical constraints rather to experimental data. One of most basic theoretical constraints is to describe properly the uniform electron gas (UEG) a.k.a. jellium, which is actually disobeyed by some GGA.[4]

Local [spin] density approximation (L[S]DA) looks only at electron density ρ at any particular point, assuming slow variation of it throughout the system (solid or molecule). Gradient correction computes also density gradient ∇ρ at that point; together with some other corrections of similar meaning it makes up generalized gradient approximation (GGA). Next, kinetic energy can be introduced into the density functional (in addition to orbital-dependent term of Kohn–Sham equations), either through kinetic energy density τ=½Σ|∇ψ|2 or through Laplacian of the density, ∇2ρ, or through both.[3,4] Kinetic energy density variant dominates because inclusion of the Laplacian often causes numerical instabilities in calculations.[4] It should be noted that meta functionals usually show dependence of results on the type of integration grid, thus it should be selected fine enough.[4] In classical variant, there are separate expressions for exchange functional and for correlation functional; but there are also functionals designed in "monolithic" way, with non-separable exchange and correlation parts (non-separable gradient approximation, NGA, and its meta analogue).[4] Also, there are non-classical ways to define exchange and correlation energy, so that corresponding functionals are not combinable with others (these are called "standalone functionals").[5] Local functionals have advantage over their hybrid counterparts in that they require less computational effort with large systems (especially solids), and some newest ones have notable prediction quality.[19]

Hybrid functionals contain some fraction of exact (orbital-dependent) exchange part to avoid self-interaction error, range-separated hybrids have this fraction dying off from low at small inter-electron distances to high at large inter-electron distances. Error function is used for this purpose, as it can be implemented analytically for Gaussian type basis functions.[6] Screened exchange interaction functionals are useful for solids, as in this case calculating orbital-dependent exchange is usually limited to nearby cells due to enormous resource consumption.[6].

For chemical kinetics (computing reaction barriers), there are usually higher amount of orbital-dependent exchange needed. For example, it was found that performance for reaction barriers of B97 functional as a function of HF-like exchange contribution has two optima, one (local) at ≈ 16% and one (global) at ≈ 45 %. There was an idea that varying (from molecule to molecule) amount of exact echange is suitable and it can be mimicked by τ-dependence, resulting in functional with reasonable performance both for energy minima and for energetic barriers.[7]

To facilitate description of dispersion interaction between molecules or parts of a big molecule, empirical dispersion can be introduced into the form of the functional. It depends only of the type of element, sometimes on its "hybridization", so is kind of molecular mechanics incorporated in DFA. Other means of proper accounting for non-covalent interactions is addition of non-local van-der-Waals functional, introducing special atomic-centered potential or just including many covalently-bound systems into the training structure set for semi-empirical functionals.[8] As both methods implemented at the same time can worsen the quality of results, one must be cautious when using dispersion correction for such functionals as Minnesota group ones which include parametrization with respect to non-covalently bound systems.

In double hybrid functionals, not only part of exchange is substituted with HF-like expression, but also part of correlation is modeled as in wave-function functional theory, e. g., by means of Görling–Levy perturbation theory. Such functionals are computationally expensive, close to MP2 in their resource consumption,[1] but may offer higher quality of results, improving description of so-called static correlation. This approach includes construction of optimized effective potential (OEP) to transfer between perturbed orbitals and electron density; Brillouin's theorem does not apply either.[16]

References that were used for more than getting acquainted with the nature of certain density functional are listed below. Others can be found in reference 1.
[1]    Æ. Frisch,  M. Frisch, F. R. Clemente & G. W. Trucks, Gaussian, Inc., 2009
[2]    W. Kutzelnigg, J. Mol. Struct.:THEOCHEM, 2006, 768, 163–173
[3]    J. Toulouse, A. Savin & C. Adamo, J. Chem. Phys., 2002, 117, 10465
[4]    R. Peverati & D. G. Truhlar., Phil. Trans. R. Soc. A, 2014, 372, 20120476
[5]    A. D. Boese & N. C. Handy. J. Chem. Phys, 2002, 116(22), 9559–9569
[6]    J. Heyd, G. E. Scuseria & M. Ernzerhof, J. Chem. Phys., 2003, 118(18), 8207–8215
[7]   A. D. Boese & J. M. L. Martin, J. Chem. Phys., 2004, 121(8), 3405
[8]    S. Grimme, J. Antony, S. Ehrlich & H. Krieg. J. Chem. Phys., 2010, 132, 154104
[9]    G. Zhang & C. B. Musgrave, J. Phys. Chem. A, 2007, 111, 1554-1561
[10]  J. P. Perdew, K. Burke & M. Ernzerhof, Phys. Rev. Lett., 1996, 77(18), 3865
[11]  H. D. Schmider & A. D. Becke, J. Chem. Phys., 1998, 108(23), 9624–9631
[12]  P. J. Wilson, T. J. Bradley & D. J. Tozer, J. Chem. Phys., 2001, 115(20), 9233–9242
[13]  G. I. Csonka, J. P. Perdew & A. Ruzsinszky, J. Chem. Theory Comput., 2010, 6, 3688–3703
[14]  V. N. Staroverov, G. E. Scuseria, J. Tao & J. P. Perdew, J. Chem. Phys., 2003, 119(23), 12129
[15]  D. Bousquet, E. Brémond, J. C. Sancho-García, I. Ciofini & C. Adamo, Theor. Chem. Acc., 2015, 134, 1602
[16]  L. Goerigk & S. Grimme,  WIREs Comput. Mol. Sci., 2014, 4, 576–600
[17]  Personal communications with Gaussian Tech support team (help@gaussian.com; mine was mostly with Dr. Fernando R. Clemente, seldom also with Dr. Douglas J. Fox and Dr. Lufeng Zou)
[18] Minnesota group webpage at  https://comp.chem.umn.edu/info/DFT.htm
[19] H. S. Yu, X. He & D. G. Truhlar, J. Chem. Theory Comput., 2016, 12(3), 1280–1293.
[20] H. S. Yu, X. He, S. L. Li & D. G. Truhlar, Chem. Sci., 2016, 7, 5032–5051.
[21] E. Brémond & C. Adamo, J. Chem. Phys., 2011, 135, 024106.
[22] E. Brémond, J. C. Sancho-García, Á. J. Pérez-Jiménez & C. Adamo, J. Chem. Phys., 2014, 141, 031101.
[23] S. Kozuch & J. M. L. Martin, Phys. Chem. Chem. Phys., 2011, 13, 20104–20107.
[24] Y. Zhao & D. G. Truhlar, J. Phys. Chem. A, 2005, 109(25), 5656–5667.
[25] P. Verma & D. G. Truhlar, Phys. Chem. Chem. Phys., 2017, 19, 12898—12912.
[26] M. Steinmetz & S. Grimme, ChemistryOpen, 2013, 2(3), 115–124.


The list itself.
 All references are in Gaussian 09 Reference [1]. Some information is extracted from the G09 Ref., more is found from references therein. Keywords to be used in Gaussian are colored red, conventional name, if different, – orange, HF-like exchange amount for hybrids – green. The range separation parameter (given in inverse bohrs) is colored dark turquoise. If there are no third-order properties available (such as hyperpolarizabilities, Raman intensities, etc.), NTO is added at the end of description. Functionals available in latter revisions are denoted by 09C or 09D, respectively.

Empirical dispersion can be added to any functional using EmpiricalDispersion=AAA keyword. Available models are those by G. A. Petersson & M. J. Frisch (AAA=PFD), as well as by S. Grimme et al., either simple (D3, GD3) or using Becke–Johnson damping at small distances (D3BJ, GD3BJ). The correction can help not only to describe non-covalent interactions, but also to improve overall performance of the functional, partly due to intramolecular dispersion, partly due to empirical nature of the correction. Adiabatic properties (IP, EA, PA) were found hardly affected by the presence of this correction, but atomization energies, isomer and conformer stabilities were noticeably improved; issues related to self-interaction error were found even to worsen in the case of B3LYP.[15]


Pure DFA:
See formulas at  https://www.molpro.net/info/2012.1/doc/manual/node817.html

LDA:
Exchange:
  • S (default LSDA; P. Hohenberg, W. Kohn, L. J. Sham, 1964–1965; J. C. Slater, 1974)
  • XA (; P. Hohenberg, W. Kohn, L. J. Sham, 1964–1965; J. C. Slater, 1974)
Correlation:
  • VWN (VWN3 or default LSDA, fitting RPA solution to UEG; this was originally used as a part of B3LYP and retained as such in Gaussian, in contrast with many other computational suites like ORCA and GAMESS)
  • VWN5 (fitting Ceperly–Alder solution to UEG; both VWN versions are by S. H. Vosko, L. Wilk and M. Nuisar, 1980)
  • PL (Perdew Local; Perdew & Zunger's, 1981, fit to Ceperley's Monte Carlo calculations on UEG)

GGA:
Exchange:
  • B (B88 by A. Becke, 1988; one empirical parameter; default combinations BLYP, BP86,...)
  • O (OPTX by N. Handy et al., 2001; more empirical, i.e. less constraints than in B, no UEG limit; default combination OLYP)
  • P (P86, Perdew 1986 – not explicitly listed in [1]!) NTO
  • PW91 (J. Perdew & Y. Wang, 1991; non-empirically parameterized)
  • mPW (non-empirical extension for PW91 by C. Adamo & V. Barone to better describe van der Waals interactions)
  • G96 (P. M. W. Gill, 1996: simplified B88 without asymptotic bound) NTO
  • PBE (non-empirical, developed by dropping energetically unimportant physical constraints used in development of PW91)[10]
  • PBEh (ωPBE – yes, not some hybrid; this is 1998 revision of PBE, refining exchange hole description) NTO
Correlation:
  • LYP (Ch. Lee, W. Yang & R. G. Parr, 1998; uses Colle–Salvetti correlation energy formula)
  • V5LYP (mix of VWN5 and LYP; this can be used to build B3LYP as it is defined in GAMESS and ORCA)
  • P86 (J. P. Perdew, 1986; improvement on the Langreth–Mehl functional)
  • VP86 (mix of VWN5 and P86, just like in V5LYP)
  • PW91 (J. P. Perdew & Y. Wang, 1991; non-empirically parameterized)
  • PBE (non-empirical; see [10])
Standalone:
  • Becke's-like form of mapped reduced gradient-dependent auxillary functionals. Such functionals are built by mapping the reduced density gradient to auxillary variable, constructing auxillary functionals dependent on it and summing over three groups of these auxillary functionals – for exchange, for like-spin correlation and for unlike-spin correlation; examples are B97[D]HCTH series and some hybrid functionals (see below).[11] 
  • B97D (B97-D; S. Grimme's year 2006 functional containing empirical dispersion, based on A. D. Becke's B97 functional built in a manner similar to HCTH (but only with 9 parameters as a trade-off to reduce overfitting)
  • B97D3 (B97 with Grimme's D3BJ empirical dispersion correction involving Becke–Johnson damping) 09D
  • HCTH series (F. A. Hamprecht, A. Cohen, D. J. Tozer & N. C. Handy, 1998–2001; 15-parameter (five in each groups of three) semi-empirical functionals developed as weighted sum of parameterized auxillary UEG-describing functionals – gradient is remapped onto another variable): HCTH or HCTH407 (HCTH/407), HCTH93 (HCTH/93), HCTH147 (HCTH/147), and there is no HCTH/120; the number corresponds to number of systems in the training set – quite small molecules, but also transition metal complexes and cations and anions
  • SOGGA11 (second-order GGA functional that recovers the correct UEG limit; it does not perform good for lattice constants)[4] 09D
meta-GGA:
Exchange:
  • revTPSS (revised form of TPSS, to correctly predict lattice constants) 09C
  • TPSS (J. Tao, J. P. Perdew, V. N. Staroverov & G. E. Scuseria, 2003; non-empirical, two reference systems – UEG and H atom; τ) NTO (G09 only)
  • PKZB (predecessor of TPSS, one empirical parameter, τ) NTO
  • BRx (A. D. Becke & M. R. Roussel; non-empirical, ∇2 + τ) NTO
Correlation:
  • revTPSS (revised form of TPSS, to correctly predict lattice constants) 09C
  • TPSS (J. Tao, J. P. Perdew, V. N. Staroverov & G. E. Scuseria, 2003; non-empirical, two reference systems – UEG and H atom; τ)  NTO (G09 only)
  • PKZB (predecessor of TPSS, one empirical parameter, τ) NTO
  • B95 (A. D. Becke, 1995; built on Perdew–Wang fit to UEG with some constraints, including minimal self-interaction and τ-dependence)
  • KCIS (J. B. Krieger, J. Q. Chen, G. J. Iafrate & A. Savin, 1999; non-empirical, based on "the idea of UEG with a gap in the excitation spectrum", τ)
  • BRc (A. D. Becke & M. R. Roussel; non-empirical, ∇2 + τ)
Standalone:
  • VSXC (T. Van Voorhis & G. E. Scuseria, 1998; based on expansion of density matrix through Bessel functions and Legandre polynomials, both for exchange and correlation; τ)
  • tHCTH (τ-HCTH; A. D. Boese & N. C. Handy, 2002; quite evidently τ-dependent version of HCTH/407 but with only four groups, each now containing four parameters, so 16 parameters)
  • M06L (M06-L; Y. Zhao & D. G. Truhlar; τ-dependent, just as all Minnesota functionals – "M" stands for Minnesota or meta[4])
  • M11L (M11-L; τ; this functional is constructed similarly to LC-GGA, but both expressions for exchange energy are two different semi-empirical meta-GGA functionals, i.e., there is no HF-like part here) 09D

NGA:
  • N12 (a first realization of non-separable gradient approximation by D. G. Truhlar et al., here only gradient enhancement is inseparable from the local exchange) 09D

meta-NGA:
  • MN12L (MN12-L, τ-dependent variant of N12, especially good for IP [4]) 09D
  • MN15L (MN15-L, having the same form as MN12-L, but performing much better for transition metals and having built-in middle-range correlation energy (no dispersion correction needed, as authors say; the training database is also larger) [19]) 16A


Global hybrid DFA:



The Becke's 3-parameter form (see below):
P2EXHF+ P1(P4EXS + P3ΔEXnon-local) + P6EClocal + P5ΔECnon-local
can be applied to any exchange and correlation functional available by using IOp keywords. Usually P1 is set to 0 or 1 and all the scaling of EX is obtained through changing P3 and P4. The exchange and correlation functional (naturally, not a standalone one) is defined by the usual keyword, e. g., BLYP or PBEPBE. The only local exchange functional available is that by Slater. The IOp keywords are:
IOp(3/76=AAAAABBBBB): P1 = AAAAA/10 000; P2 = BBBBB/10 000
IOp(3/77=AAAAABBBBB): P3 = AAAAA/10 000; P4 = BBBBB/10 000
IOp(3/78=AAAAABBBBB): P5 = AAAAA/10 000; P6 = BBBBB/10 000

GH-GGA:
  • Becke's 3-parameter form (based on SVWN, replacing part of S with non-local HF-like orbital-based exchange expression, as well as adding semi-local exchange correction to S from B88 and semi-local correlation correction to VWN, taken from some of following functionals: P86, PW91 (in original article) or LYP; this results in B3P86, B3PW91 and ubiquitous B3LYP, respectively. Note that coefficient values in B3LYP were not optimized after replacing PW91 with LYP; moreover, here G. Csonka explains two other severe inconsistencies in B3LYP, suggesting that its rather good performance stems in fortuitous cancellation of errors: ".. B88 functional is fundamentally wrong, LYP is wrong, and the mixing is wrong.."; technically, 20% HF):
  • X3LYP (eXtended functional by X. Xu & W. A. Goddard; exchange functional was built from B88 and PW91 combination so as to fit better Gaussian–like dependence of functional on the reduced density gradient; parametrization was done while accounting for hydrogen bonding and van der Waals systems in addition to usual thermochemistry, including IP and EA – 5 parameters, 21.8% HF)
  • mPW3PBE variant of 3-parameter form by Adamo and Barone (AFAIU 20% HF)
  • O3LYP (A. J. Cohen & N. C. Handy, 2001; similar by form to B3LYP (boasted to be better) and using OPTX semi-local exchange correction; 11.61% HF [9])
  • Becke's 1-parameter form (as implemented by C. Adamo and V. Barone, using Perdew at el.'s determined non-empirical amount of HF-like exchange): B1LYP, mPW1PW, mPW1LYP and mPW1PBE (25% HF; last two are variants not implemented in original papers)
  • Becke's-like form of mapped reduced gradient-dependent auxillary functionals: B98, B97-1 and B97-2 hybrids
  • B98 (revision of B97 by H. L. Schmider & A. D. Becke, 10 empirical parameters, 21.98% HF)
  • B971 (B97-1, year 1998 reparametrization of B97 by F. A. Hamprecht, A. J. Cohen, D. J. Tozer and N. C. Handy, 21% HF)
  • B972 (B97-2, revision by P. J. Wilson, T. J. Bradley & D. J. Tozer such that the functional not only predicts well thermochemistry of a given structure set but the corresponding potential is as parallel as possible to the potential determined from the "accurate", correlated electron density in the manner of Zhao, Morrison and Parr – an approach of optimized effective potential, OEP, extended to the case of hybrid functionals; 21% HF left untouched, as variation was discovered to be small)[12]
  • PBE1PBE (PBE0 or PBEh (note that another functional bears the last name in Gaussian!), non-empirical functional by J. P. Perdew, K. Burke and M. Ernzerhof, 1996, as constructed and tested by C. Adamo and V. Barone in 1999; it is argued on the basis of 4th-order perturbation theory that theoretically HF-like exchange mixing amount should be 25%; however, later it was shown by G. Csonka, A. Ruzsinszky and J. P. Perdew that this argumentation is actually valid only for atomization energies and can vary by factor of about 2, what is indeed observed in reality) [13]
  • PBEh1PBE (revision of PBE0 using not the original PBE exchange, but the revised one, PBEh – see above)
  • APF (A. Austin, G. A. Petersson, M. J. Frisch et al., specially developed to avoid long-range interactions what allows to add empirical dispersion correction to obtain APFD (APF-D) functional) 09D
  • SOGGA11X (hybrid version of second-order GGA functional that recovers the correct UEG limit; 40.15% HF) 09D
  • Half-and-half "old-school" functional form by Becke. Gaussian 09 includes for backward compatibility two of them (and none of original functionals as proposed by A. D. Becke in 1993): BHandH (no B88 correction, just half LSDA and half HF-like, so 50% HF) and BHandHLYP (LSDA part is summed with B88 correction, again 50% HF). In both cases the correlation part is that of LYP.
GH-meta-GGA:
It is interesting to note that meta-GGA-hybrids can have much smaller HF admixture than GGA-hybrids; it is argued that meta-GGA can have theoretically more sensible dependence on the coupling constant in the formula of adiabatic connection.[14]
  • Becke's 1-parameter form (original functional, based on standalone B95, is B1B9528% HF)
  • TPSSh (hybrid version of TPSS in 1-parameter form, with 10% HF; missing reference in [1]!)
  • tHCTHhyb (τ-HCTHh, hybrid version of τ-HCTH with 17 parameters and 15% HF; not clearly documented in [1]!)
  • BMK (Boese–Martin for Kinetics; functional with the same form as τ-HCTHh, but optimized to perform well both for thermodynamics (absolute energies of stable species) and kinetics (reaction barriers), mimicking variable amount of HF-like exchange by τ-dependence; 42% HF)
  • Minnesota M05 family of hybrid functionals: M05 (overall good performance, 28% HF) and M052X (M05-2X, very good for many areas, including thermochemistry and kinetics, but not for multireference systems such as many transition metal compounds because of static correlation error, 56% HF; τ)
  • Minnesota M06 family of hybrid functionals: M06 (overall good performance, 27% HF), M062X (M06-2X, very good for many areas, including thermochemistry and kinetics, but not for multireference systems such as many transition metal compounds, 54% HF) and M06HF (M06-HF, designed for spectroscopy and other areas where elimination of self-interaction error is essential, 100% HF-like exchange; τ). My personal experience is that calculations with M06-HF but without UltraFine grid, at least in Gaussian 09, converge slowly and unreliably; hence, I would not suggest to use it without UltraFine grid.
  • Minnesota M08 family of hybrid functionals: M08HX (M08-HX, a furher development of M06-2X with "a much cleaner" [4] form and a base for M11 family; 52.23% HF). 16A
  • Minnesota 6-parameter hybrid functionals: PW6B95 (based on PW91 exchange and B95 meta-GGA correlation, built specifically for thermochemistry and representing non-bonding interactions against the corresponding databases; 28% HF).[24,25] Also, empirical dispersion–corrected variation PW6B95D3 is available(PW6B95-D3, approved by Grimme et al. in their benchmark;[26] 28% HF). 16A

GH-NGA:

GH-meta-NGA:
  • MN15 (a further development of non-separable gradient functionals by Truhlar's group, specifically tuned to provide both accurate energies for multi-reference systems and barrier heights [20]) 16A


Range-separated hybrid DFA:

Any pure functional can be made into range-separated hybrid (0% HF at small inter-electronic distance, 100% at infinite interelectronic distance) by adding LC- prefix to combination of exchange and correlation keywords or to the keyword of standalone functional (e.g., LC-PBEPBE, LC-BLYP, LC-tHCTH).

The speed at which short-range part ([mostly] DFA) is replaced by the long-range part ([mostly] HF) is determined by the range-separation parameter (denoted ω or μ and expressed in inverse bohrs); the smaller it is, the larger amount of he system is described by short-range functional. Its value by default is ω = 0.47 but can be changed by two keywords (separately for HF-X and DFT-X):
IOp(3/107={ω*10000}00000) 09B and
IOp(3/108={ω*10000}00000), 09B
respectively. Second five figures in the argument correspond to the long range of HSE-like functionals (AFAIU), so not actual for simple RSHs.

RSH-GGA:
  • LC-wPBE (LC-ωPBE, LC-RSH version of ωPBE which is denoted – guess how? – PBEh in Gaussian; RSH parameter is 0.4)
  • CAM-B3LYP (Coulomb-attenuated method by T. Yanai, D. P. Tew & N. C. Handy; it has 19% HF in the short range and 65% HF in the long range, with the RSH parameter 0.33)
    This flavour of functionals also can be further controlled by IOp keywords. The original description of CAM-B3LYP had a constant amount of HF-like exchange in the whole range (α), to which some additional HF-X is gradually added in the long range, up to amount β; hence, amount of HF is changing from α to α+β. Again, there are two separate keywords for HF-X and DFT-X. The α can be set with
    IOp(3/130={α*10000}) 09B and

    IOp(3/131={α*10000}) 09B

    for HF-X and DFT-X, respectively;
    β can be set with
    IOp(3/119={β*10000}00000) 09B and

    IOp(3/120={β*10000}00000) 09B
    for HF-X and DFT-X, respectively.
    In case of β, the second five figures in the argument, AFAIU, again correspond to the long range of HSE-like functionals.
    WARNING!
    Any of these keywords, when used with zero argument, sets the default values for particular functional in use; to set any of the parameters to zero, you must use argument -1, e.g., IOp(3/130=-1) IOp(3/130=1000000000). If you are considering coefficient for different ranges, like in HSE, to be set to zero, then use three first additional figures in argument:
    IOp(3/130=222XXXXXYYYYY),
    with order {mid-range}{long-range}{short-range}.
  • wB97 (ωB97; standard LC-expansion of B97 – but with five summation terms in each of three groups –  by J.-D. Chai & M. Head–Gordon; UEG limit is enforced and RSH parameter is 0.4)
  • wB97X (ωB97X, the same as B97X but containing 15.77% HF in the short range; UEG limit is enforced and RSH parameter is 0.3)
  • wB97XD (ωB97X-D, a ωB97X with empirical dispersion correction incorporated, much improving its performance for non-covalent interactions and somewhat also for covalent ones; in short range, it contains 22.2% HF)
  • see HISSbPBE below 09D

RSH-meta-GGA:
  • M11 (42.8% HF in the short range, 100% HF in the long range, RSH parameter is 0.25; τ) 09D

RSH-NGA:

RSH-meta-NGA:



Screened-Coulomb-potential-based hybrid DFA:

The actual form of HSE-like screened-exchange functionals is:
EXC = aEXHF,SR(ω) + (1–a )EXPBE,SR(ω) + EXPBE,LR(ω) + ECPBE
Therefore, it is very different from the form of RSH: two parameters instead of 1 or 3, one, ω, determining how fast does HF decay in this short-range part (SR), and another one, a, determining amount of decaying HF generally in the short-range region. In the long-range region, there is only DFA part.
  • HSEh1PBE (HSE06, year 2006 reparametrization of HSE03 by A. V. Krukau, O. A. Vydrov, A. F. Izmaylov & G. E. Scuseria; ω = 0.11 and 25% HF)
  • HSE2PBE (HSE03, with two separate ω parameters as noted in HSE06 paper; ωHF = 0.1061 and ωPBE = 0.1890) NTO
  • HSE1PBE (version before support for third derivatives was added) NTO
  • wPBEh (ωPBEh, exchange part of HSE with screening constant ω = 0.15; this keyword means only exchange part in G09, so the actual functional can be called by wPBEhPBE or elsewise) NTO
  • HISSbPBE (HISS, ingenious functional by T. M. Henderson, A. F. Izmaylov, G. E. Scuseria & A. Savin that combines utility of screened-exchange and range-separated hybrid functionals to introduce HF-like exchange only in the middle range; middle range weight is 60% HF, ωSR = 0.84 and ωLR = 0.20) 09D
Screened-Coulomb-NGA:
  • N12SX (N12-SX; analogue of N12 with screened HF-like exchange, 25% HF to 0% HF) 09D
Screened-Coulomb-meta-NGA:
  • MN12SX (MN12-SX; analogue of N12 with τ-dependence and screened HF-like exchange, good for EA and PA,[4] 25% HF to 0% HF; τ) 09D


Double-hybrid density functionals:

  • B2PLYP (the first DH functional, constructed from second-order perturbation theory; 53% HF for exchange and 27% PT2 for correlation)
  • B2PLYPD (modification with Grimme's empirical correction for dispersion)
  • B2PLYPD3 (modification with Grimme's D3BJ empirical correction) 09D and 25% PT2 for correlation)
  • mPW2PLYPD (modification with Grimme's empirical correction for dispersion)
  • PBE0DH (PBE0-DH; a DH functional constructed with non-empirical considerations in ind, much like its parent GH PBE0; it has 50% HF for exchange and only 12.5% MP2 for correlation and is also shown to perform reliably) [21] 16A
  • PBEQIDH (PBE-QIDH; a DH functional with single parameter, so that the amount of exact exchange is determined by the amount of PT2 correlation; this functional form is obtained from integrating the adiabatic connection and has 70% HF for exchange and 33% MP2 for correlation, with HF amount able to be increased while remaining justified by the theoretical considerations) [22] 16A
  • DSDPBEP86 (DSD-PBEP86; spin-component-scaled DH, with exchange and correlation parts selected from 6 × 6 alternatives by the quality of results) [23] 16A

    Note that this functional is also available in G09 since release D, which enabled the dispersion correction (that of Becke--Johnson type). According to the supplementary of [23], user should select B2PLYP as the method, add the EmpiricalDispersion=GD3BJ keyword and then change the DFT parameters by adding the following IOp options:
    IOp(3/125=0250005300,3/78=0430004300,3/76=0300007000,3/74=1004) ,
    with
    • functional change by the last option;
    • penultimate option changing the amount of HF-like exchange;
    • the second option changing the type of correlation, and
    • the first option choosing the coefficients for the same-spin and opposite-spin terms in MP2.


I hope this will help myself and somebody else, too :)
End and glory to God.

Wednesday, October 18, 2017

While the blog is on hiatus, why don't You peep at our lab?

Actually, these photos are ca. 10 years old, but the overall impression will be right. This is the room where experiments with lasers take place.


Friday, June 30, 2017

Small bash code to split batch .OUT file in parts

This is trivial, but in any case…

Batch jobs output files can grow big, which causes problems for reading them. This code splits them in smaller chunks by selected number of jobs done to be read automatically later. Chunk filenames are derived from the initial file name by adding "_L1", "_L2", etc. before file extension.

$ ./asplout split-by-how-many filename
112230: Normal termination of Gaussian 09 at Thu Apr 27 00:30:13 2017.
391832: Normal termination of Gaussian 09 at Fri May 5 03:24:39 2017.
454985: Normal termination of Gaussian 09 at Fri May 5 20:41:34 2017.
531521: Normal termination of Gaussian 09 at Sat May 6 17:43:29 2017.
629500: Normal termination of Gaussian 09 at Mon May 8 02:16:22 2017.
682260: Normal termination of Gaussian 09 at Mon May 8 16:48:18 2017.
773911: Normal termination of Gaussian 09 at Tue May 9 19:28:10 2017.


#!/bin/bash
[ "$1" == "-h" ] && echo "First argument: # of jobs in single split. Second argument: .OUT file name." && exit 0
irk=0; pesk=0
cp $2 bakabaka.out
while read menschutk; do ((irk++)); [ $((irk/$1*$1)) -eq $irk ] && { moose=$(echo $menschutk | cut -d : -f 1); sed -n '1,'$((moose-pesk))'p' $2 > ${2%.out}_L$((irk/$1)).out && echo $menschutk; sed -i '1,'$((moose-pesk))'d' $2; pesk=$moose; }; done < <(grep -n 'Normal termination' bakabaka.out)

rm bakabaka.out

Some inabilities of G09 / G16 that You might overlook in the Reference

Lately, I have run into the fact that there are some functionals in Gaussian for which 3rd derivatives are not supported. This means the following jobs are unavailable with them:
  • Polar=DCSHG (hyperpolarizabilities)
  • SCRF=ExternalIteration (state-specific solvation)
  • Freq=Raman (Raman intensities) *
  • Freq=Anharmonic (anharmonic corrections) *
  • maybe there are more, but I have never run into them…

*never experienced myself, but these methods definitely deal with the  3rd derivatives

No blame for Gaussian, Inc. — everything is in the Reference. But it is at the end of description of DFT Methods in the printed Reference, so can be overlooked (I did so); on the web page, it is at the "Availability" tab (that's probably more convenient).

Affected functionals for G09 are:

Exchange (x): Correlation (c): Hybrid:
Gill96, P, BRx, PKZB, TPSS, wPBEh, PBEh PKZB, TPSS HSE1PBE, HSE2PBE

For G16:

Exchange (x): Correlation (c): Hybrid:
G96, P86, PKZB, wPBEh, PBEh PKZB OHSE1PBE, OHSE2PBE

Of course, all higher-rung functionals constructed from these are also affected, e.g., TPSSh in G09. That means TPSS in G16 does have 3rd derivatives — another reason to buy the new version!

When a job dies due to such an unavailability, one of the following messages is printed multiple times (probably it is the number of second derivatives which would be differentiated again):

Invalid value of MaxDer in TPSSx

No func 3rd derivs with HSE (interestingly, I got it while using LC-wPBE).

Mentioning HSE is interesting because it is HSE03 exchange which is used for the short-range in LC-wPBE and not the PBE one, both in original paper by Vydrov and Scuseria of 2006 and as implemented in Gaussian. This is no nearly obvious, but it's how it is. Some renowned authors (for example, Takao Tsuneda in his year 2014 monograph about DFT; see p. 129). still erroneously assume it to be PBE.