Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
the_density_functional_program [2023/11/06 16:41] – [Grid caching (GRIDSAVE, NOGRIDSAVE)] hesselmannthe_density_functional_program [2025/01/09 09:54] (current) – fix layout doll
Line 965: Line 965:
  
  
 +**Important note regarding some functionals from LibXC that also are available in Molpro's internal functional library:**
 +A number of functionals which are both available in LibXC and Molpro may give slightly different results in total energies (in the micro hartree range for small molecules) due to truncation of significant digits of underlying parameters. An example for this is the PBE functional [[https://doi.org/10.1103/PhysRevLett.77.3865]] in which case the implementation in Molpro uses parameters taken only from the PBE paper some of which are truncated compared to the original source, see references in the PBE paper. Compared to this, LibXC uses a more accurate representation of the parameters in terms of significant digits, resulting to differences in the micro hartree range. Such differences are unlikely to have any effect on energy differences, such as reaction or atomisation energies, but should be kept in mind when comparing total energies calculated with the Molpro and LibXC functionals, respectively.
  
 +Functionals known to yield slighty different results according to this:
  
- +^ Molpro ^ LibXC ^ 
- +| PBEX    | GGA_X_PBE | 
- +| PBEXREV  | GGA_X_PBE_R |  
- +| PBEC     | GGA_C_PBE | 
 +| PBESOLC  | GGA_C_PBE_SOL | 
 +| PW91C    | GGA_C_PW91 | 
 +| HCTH93   | GGA_XC_HCTH_93 | 
 +| HCTH120  | GGA_XC_HCTH_120 | 
 +| M06LX    | MGGA_X_M06_L | 
 +| B95      | MGGA_C_BC95 | 
 +| TPSSC    | MGGA_C_TPSS | 
 +| M06C     | MGGA_C_M06 | 
 +| M06HFC   | MGGA_C_M06_HF | 
 +| M062XC   | MGGA_C_M06_2X | 
 +| M06LC    | MGGA_C_M06_L | 
 +| M05C     | MGGA_C_M05 | 
 +| M052XC   | MGGA_C_M05_2X | 
 +| M06X     | HYB_MGGA_X_M06 | 
 +| M062XX   | HYB_MGGA_X_M06_2X |
  
 ==== Implementing new functionals ==== ==== Implementing new functionals ====
Line 1289: Line 1306:
  
 The total energy will then be calculated as EDFT-D2=EDFT+Edisp(D2) if x=d2 (see Ref. [2]), The total energy will then be calculated as EDFT-D2=EDFT+Edisp(D2) if x=d2 (see Ref. [2]),
-EDFT-D3=EDFT+Edisp(D3) if x=d3 (see Ref. [3]), and EDFT-D4=EDFT+Edisp(D4) if x=d4 (see Ref. [4]).+EDFT-D3=EDFT+Edisp(D3) if x=d3 (see Ref. [3]), and 
 +EDFT-D4=EDFT+Edisp(D4) if x=d4 (see Ref. [4]).
  
 Currently the default dispersion correction added to the DFT energy is the D4 dispersion correction developed by Grimme //et al.//, see Ref. [4].  Currently the default dispersion correction added to the DFT energy is the D4 dispersion correction developed by Grimme //et al.//, see Ref. [4]. 
Line 1379: Line 1397:
  
 Gradient contributions from the D3 and D4 dispersion correction are automatically computed in DFT geometry optimisations. Gradient contributions from the D3 and D4 dispersion correction are automatically computed in DFT geometry optimisations.
 +
 +Note that not all functionals implemented in Molpro (and Libxc) are known to the D4 program (and vice versa). And in some cases the functionals supported by D4 might have a different identifier than used in Molpro. To see which functionals can be used with D4, see the documentation at [[https://github.com/dftd4/dftd4]]. Most functionals supported by D4 can also be given by their Libxc names, for example
 +<code> ks,gga_x_b88,gga_c_p86,disp=d4 </code>
 +using the ''B88'' exchange and ''P86'' correlation functional names as defined in the Libxc library. For compound functionals like B+P86 it is important to //insert the exchange functional first and the correlation functional second//!
 +
 +
  
 References:\\ References:\\
Line 1442: Line 1466:
 where ''orbital_index'' is the index of the orbital in the order used for constructing the density matrix, and ''occupation_number'' is the occupation number of this orbital between 0 and 1. These commands can be repeated in case of several fractionally occupied orbitals. When specifying the charge and the wave function, all fractionally occupied orbitals must be considered as occupied orbitals. where ''orbital_index'' is the index of the orbital in the order used for constructing the density matrix, and ''occupation_number'' is the occupation number of this orbital between 0 and 1. These commands can be repeated in case of several fractionally occupied orbitals. When specifying the charge and the wave function, all fractionally occupied orbitals must be considered as occupied orbitals.
  
-For DFT calculations, the implementation has only been done for the option ''matrix=0'' in the ''uks'' command.+For DFT calculations, the implementation has only been done for the option ''matrix=0'' in the ''uks'' command. Furthermore, the option ''old'' must be added to the ''uks'' command in order to redirect Molpro to the old unrestricted SCF programn (the setting of fractional occupations is not available in the new SCF code).
  
 Example of a PBE calculation on the fractional C cation with 5.3 electrons: Example of a PBE calculation on the fractional C cation with 5.3 electrons:
Line 1450: Line 1474:
 geom={C} geom={C}
 fracocca,4,0.3 fracocca,4,0.3
-{uks,pbe,matrix=0;wf,6,0,2}+{uks,pbe,matrix=0,old; wf,6,0,2}
 </code> </code>
 Example of a RSH calculation on the fractional CO anion with 14.8 electrons: Example of a RSH calculation on the fractional CO anion with 14.8 electrons:
Line 1465: Line 1489:
 fracocca,8,0.8 fracocca,8,0.8
 {int;erf,0.5} {int;erf,0.5}
-{uks,ecerfpbe,exerfpbe,matrix=0;rangehybrid;wf,15,0,1}+{uks,ecerfpbe,exerfpbe,matrix=0,old; rangehybrid;wf,15,0,1}
 </code> </code>
 Example of a HF calculation on the H atom with 0.5 alpha electron and 0.5 beta electron: Example of a HF calculation on the H atom with 0.5 alpha electron and 0.5 beta electron:
Line 1475: Line 1499:
 fracocca,1,.5 fracocca,1,.5
 fracoccb,1,.5 fracoccb,1,.5
-{uhf;wf,2,0,0}+{uhf,old; wf,2,0,0}
 </code> </code>
-Subsequent RPA correlation calculations (see [[the_density_functional_program#random-phase_approximation|here]]) will be automatically done with fractional orbital occupation numbers.+Subsequent RPA correlation calculations (see [[kohn-sham_random-phase_approximation#random-phase_approximation_rpatddft_program|here]]) will be automatically done with fractional orbital occupation numbers.
  
 References\\ References\\