QuantumPatch DFT Engines

Introduction

QuantumPatch (QP) performs full quantum-mechanical electronic structure analysis of organic thin films, based on morphologies from Deposit. To this purpose, different quantum chemistry codes are embedded into QuantumPatch as "engines" to perform computations on single molecules or pairs and provide the results for further analysis in QP.

  • In the DFT Engines(nanomatch-modules/QuantumPatch/DFTEngines.markdown#DFT Engines) section you can find specifications ot the available settings for each engine (DFTBplus, Psi4 and Turbomole).
  • The Fallbacks section explains how fallback enginges can be used to stabilize and speed up your QP simulation.

DFT Engines

DFTBplus

Density Functional Tight Binding (DFTB) is an approximate Density Functional Theory (DFT) method which approaches DFT energy functionals with a Taylor Expansion. It's main advantage is its very low runtime cost with big Hamiltonian and Overlap integral tables under neglect of three-center terms. DFTB+ is a versatile open-source implementation of the DFTB method aimed at electron transport simulations for large systems.

Required Settings

While DFTB+ has no required settings a few words are to be said on how to set up a valid typical DFTB model calculations.

  • DFTB2: Formerly known als SCC-DFTB, DFTB2 is the most used DFTB model to date. DFTB2 is used with the following options:
    • thirdorder: false
  • DFTB3: DFTB3 is the most recent DFTB model with parameters designed for organic and biological molecular systems. DFTB3 calculations are set up with the following options:
    • thirdorder: true
  • LC-DFTB: Longrange-corrected DFTB implements exact exchange (within the approximations of DFTB) in a range-separated DFT fashion. Range-separated DFTB calculations are only implemented up to a DFTB2 level of theory but compatible with linear response theory. LC-DFTB calculations are set up as:
    • thirdorder: false
    • rangesep: true
  • TD-DFTB: Time-dependent DFTB works, the same way linear response DFT does, via solving the Casida equationsin a Davidson solver to retrieve excited state properties. TD-DFTB is implemented in DFTB+ only to a DFTB2 level of theory but can, if chosen, be run with LC-DFTB. TD-DFTB calculations are set up as follows:
    • thirdorder: false
    • lin_resp: true

Optional Settings

  • charge: Total net charge of your system (integers only, no fractional charges).
  • charge_model: Declares population analysis to use for calculation of partial atomic charges.
    • cm3: The Charge Model 3 (CM3) is an empirical correction to Mulliken population analysis charges fitted to reproduce experimental dipoles.
    • mulliken: Standard Mulliken population analysis. Strongly basis set dependendt and sometimes unreliable.
  • dispersion: If set to true will enable the empirical D3 dispersion model for this calculation. Uses the modified Becke-Johnson damping function in place of the standard zero-damping.
  • lin_resp: If set to true will enable linear response (random phase approximation) for time-dependent (TD-)DFTB to calculate excited state properties.
  • memory: Set memory limit for your calculation. Only used for ridft calculations.
  • optimize: Whether Psi4 should optimize the input geometry (needs gradients, currently not possible with double hybrid functionals).
  • roots: How many excitations to converge within linear response equations. Due to root switching in DFT a minimum of 5 excitations is recommended, even if only the first is needed.
  • rs_param: Can be default, ip_fit, or a real number.
    • default: Uses the standard omega parameter for the given range-separated functional.
    • ip_fit: Chooses the range-separation parameter so that the geometrie's ionization potential matches the highest occupied molecular orbital (HOMO) energy.
    • If any number is given here it will be used as the range-separation parameter.
  • rangesep: Whether to use (range-separated) LC-DFTB.
  • relaxation_steps: Maximum number of iterations before stopping geometry optimization.
  • singlet: Only read if lin_resp is set to true. If set to true TD-DFTB will calculate excitations that result in singlet electron configurations. Can be combined with triplet option to either pick a excitation multiplicity or receive both.
  • thirdorder: Whether to turn the third order of the Taylor expansion of the DFT functional on (DFTB3).
  • threads: How many concurrent threads should be used for this calculation.
  • triplet: Only read if lin_resp is set to true. If set to true TD-DFTB will calculate excitations that result in triplet electron configurations. Can be combined with singlet option to either pick a excitation multiplicity or receive both.

Psi4Engine

Psi4 is a state of the art research open-source quantum chemistry software that focuses on efficient high-accuracy calculations of electronic structure. We use it for its Density Functional Theroy (DFT) implementation, where it also includes several range-separated functionals with dynamic ionization potential fitting to improve charge transport properties.

Required Settings

  • basis: Define a basis set to carry out the calculation with. Basis sets are currently defined for the whole system and cannot be defined per atom out of QuantumPatch. Available basis sets are:

    • STO-3G
    • 3-21G
    • 6-31G
    • 6-31G*
    • 6-31G**
    • 6-31+G
    • 6-31+G*
    • 6-31+G**
    • 6-31++G
    • 6-31++G*
    • 6-31++G**
    • 6-311G
    • 6-311G*
    • 6-311G**
    • 6-311+G
    • 6-311+G*
    • 6-311+G**
    • 6-311++G
    • 6-311++G*
    • 6-311++G**
    • def2-SV(P)
    • def2-SVP
    • def2-TZVP
    • def2-TZVPP
    • def2-QZVP
    • def2-QZVPP
    • cc-pVDZ
    • cc-pVTZ
    • cc-pVQZ
    • aug-cc-pVDZ
    • aug-cc-pVTZ
    • aug-cc-pVQZ
  • functional: Define a DFT functional to carry out calculations with. Supported are several Generalized Gradient Approximation (GGA) functionals and Meta-GGAs, some of which are mixed with exact HF exchange (so called hybrid functionals). Psi4 also allows usage of some double hybrid functionals which also mix the correlation energy functional with part Møller–Plesset perturbation theory (MP) correclation energy. There are no geometry optimizations or linear response calculations possible with double hybrid functionals. As opposed to TURBOMOLE the Psi4 code allows for calculations with range-separated functionals (sometimes also called longrange-corrected) which improve upon calculated transport properties. Available functionals are:

    • B2GPPLYP
    • B2PLYP
    • B3LYP
    • BLYP
    • BP86
    • CAM-B3LYP
    • HSE06
    • M11
    • M11-L
    • PBE
    • revPBE
    • PBE0
    • revPBE0
    • PW91
    • TPSS
    • TPSSh
    • revTPSSh
    • wPBE
    • X3LYP
    • XLYP

Optional Settings

  • charge: Total net charge of your system (integers only, no fractional charges).
  • charge_model: Declares population analysis to use for calculation of partial atomic charges.
    • esp: Uses electrostatic potential (ESP) fitted charges that represent the full electron density as atomic point charges. Uses real space integrals but produces better charge clouds for QuantumPatch calculations. Recommended.
    • mulliken: Standard Mulliken population analysis. Strongly basis set dependendt and sometimes unreliable.
  • dispersion: If set to true will enable the empirical D3 dispersion model for this calculation. Uses the modified Becke-Johnson damping function in place of the standard zero-damping.
  • memory: Set memory limit for your calculation. Only used for ridft calculations.
  • optimize: Whether Psi4 should optimize the input geometry (needs gradients, currently not possible with double hybrid functionals).
  • rs_param: Can be default, ip_fit, or a real number.
    • default: Uses the standard omega parameter for the given range-separated functional.
    • ip_fit: Chooses the range-separation parameter so that the geometrie's ionization potential matches the highest occupied molecular orbital (HOMO) energy.
    • If any number is given here it will be used as the range-separation parameter.
  • relaxation_steps: Maximum number of iterations before stopping geometry optimization.
  • threads: How many concurrent threads should be used for this calculation.

TURBOMOLE

TURBOMOLE is a highly sophisticated quantum chemistry toolkit for ab initio electronic structure calculations with focus on Density Functional Theroy (DFT) and post-Hartree-Fock (post-HF) methods. QuantumPatch utilizes TURBOMOLE for its quick integration schemes Self-Consistent-Field (SCF) and convergence utility.

Required Settings

  • basis: Define a basis set to carry out the calculation with. Basis sets are currently defined for the whole system and cannot be defined per atom out of QuantumPatch. Available basis sets are:
    • STO-3G
    • 3-21G
    • 4-31g hondo
    • 6-31g hondo
    • 6-31G
    • 6-31G*
    • 6-31G**
    • 6-311G
    • 6-311G*
    • 6-311G**
    • 6-311++G**
    • DZ
    • DZP
    • TZ
    • TZP
    • TZV
    • TZVP
    • TZVPP
    • TZVPPP
    • QZV
    • QZVP
    • SV
    • SVP
    • SV(P)
    • def-SVP
    • def-SV(P)
    • def-TZVP
    • def-TZVPP
    • def-QZVP
    • def-QZVPP
    • def2-SVP
    • def2-SV(P)
    • def2-TZVP
    • def2-TZVPP
    • def2-SZVPD
    • def2-TZVPD
    • def2-TZVPPD
    • def2-QZVPD
    • def2-QZVPPD
    • dhf-SV(P)
    • dhf-SVP
    • dhf-TZVP
    • dhf-TZVPP
    • dhf-QZVP
    • dhf-QZVPP
    • cc-pVDZ
    • aug-cc-pVDZ
    • cc-pwVDZ
    • aug-cc-pwVDZ
    • cc-pVTZ
    • aug-cc-pVTZ
    • cc-pwVTZ
    • aug-cc-pwVTZ
    • cc-pVQZ
    • aug-cc-pVQZ
    • cc-pwVQZ
    • aug-cc-pwVQZ
  • functional: Define a DFT functional to carry out calculations with. Supported are several Generalized Gradient Approximation (GGA) functionals and Meta-GGAs, some of which are mixed with exact HF exchange (so called hybrid functionals). Turbomole also allows usage of some double hybrid functionals which also mix the correlation energy functional with part Møller–Plesset perturbation theory (MP) correclation energy. There are no geometry optimizations or linear response calculations possible with double hybrid functionals. Available functionals are:
    • SVWN
    • SVWN_Gaussian
    • PWLDA
    • BLYP
    • BVWN
    • BP86
    • PBE
    • TPSS
    • BHLYP
    • B3LYP
    • B3LYP_Gaussian
    • PBE0
    • TPSSH
    • PW6B95
    • M06
    • M06-1
    • M06-2X
    • B2PLYP

Optional Settings

  • charge: Total net charge of your system (integers only, no fractional charges).
  • charge_model: Declares population analysis to use for calculation of partial atomic charges.
    • esp: Uses electrostatic potential (ESP) fitted charges that represent the full electron density as atomic point charges. Uses real space integrals but produces better charge clouds for QuantumPatch calculations. Recommended.
    • mulliken: Standard Mulliken population analysis. Strongly basis set dependendt and sometimes unreliable.
  • dispersion: If set to true will enable the empirical D3 dispersion model for this calculation. Uses the modified Becke-Johnson damping function in place of the standard zero-damping.
  • fixed_atoms: List of fixed atom indices with first atom starting with index 0. These atoms will not be moved in a geometry optimization.
  • geometry_convergence: Defaults to normal, can be set to tight and extreme. Changes energy and maximum force convergence criterium for geometry relaxations.
    • normal: Energy convergence criterium at 1.0d-5 and maximum gradient at 1.0d-5.
    • tight: Changes energy convergence criterium to 1.0d-6 and maximum gradient to 1.0d-4.
    • extreme: Changes energy convergence criterium to 1.0d-7 and maximum gradient to 1.0d-5.
  • lin_resp: If set to true will enable linear response (random phase approximation) for time-dependent (TD-)DFT to calculate excited state properties.
  • memory: Set memory limit for your calculation. Only used for ridft calculations.
  • method: Which Turbomole SCF executable to use, advanced users only. Do not set this option unless you want to force certain behavior. QuantumPatch automatically sets reasonable defaults.
    • ridft: DFT calculation with resolution of identity for Coulomb integrals. Only available for certain functionals.
    • dscf: Standard DFT calculation with full four-center-two-electron Coulomb integral calculation.
  • minimal_basis_guess: Defaults to true. Calculates a converged density with a minimal basis first and using the resulting eigenvectors as the initial wave function coefficients for the actual calculation.
  • optimize: Whether Turbomole should optimize the input geometry (needs gradients, currently not possible with double hybrid functionals). Also works in linear response TD-DFT calculations (see lin_resp option).
  • relaxation_steps: Maximum number of iterations before stopping geometry optimization.
  • roots: How many excitations to converge within linear response equations. Due to root switching in DFT a minimum of 5 excitations is recommended, even if only the first is needed.
  • scf_convergence: Defaults to normal, can be set to tight and extreme. Changes DIIS damping parameter annealing settings, increases maximum SCF iterations and SCF energy convergence criterium.
    • normal: SCF convergence reached at 6th decimal. Maximum number of iterations is 75. DIIS damping parameter starts at 0.3 and is decreased by an average step of 0.05 down to a minimum of 0.1.
    • tight: SCF convergence reached at 7th decimal. Maximum number of iterations increased to 200. DIIS damping parameter starts at 4.5 and is decreased by an average step of 0.15 down to a minimum of 0.4.
    • extreme: SCF convergence reached at 7th decimal. Maximum number of iterations increased to 300. DIIS damping parameter starts at 9.0 and is decreased by an average step of 0.25 down to a minimum of 0.5.
  • threads: How many concurrent threads should be used for this calculation.
  • triplet: Only read if lin_resp is set to true. If set to true will only calculate excitations that result in triplet electron configurations. If set to false all linear response calculations will only calculate singlet excitations.

Fallbacks

Fallbacks ### Need for Fallback engines Convergence of quantum chemistry runs is a critical issue in QuantumPatch, which is basically a smart combination of (several) hundreds of single molecule (or pair-) quantum chemistry computations: A lot of computation time can be wasted if individual single-molecule computations do not converge or crash. Simply increasing level of the method or tightening convergence criterion would solve this issue, but lead to unacceptably high computation times. We therefore implemented the option to supply a fallback engine for each engine used in QuantumPatch: If a single molecule computation does not converge or crash using the standard engine, QP switches to the fallback engine (with a higher likelyhood of convergence, but also higher computational cost) for this single computation. If the fallback runs through successfully, QuantumPatch continues normally. Since fallback engines usually require more computation time, it may be useful to use multithreading (e.g. 8 cores) for the fallback engine, even if the standard engine runs serially.

Examples for usage of fallback engines

  • Standard Fallback: In some cases, e.g. if charged molecules are involved, DFT runs e.g. with a Turbomole engine may not converge using standard settings. In this case, as illustrated in the Figure on the right, we recommend to (i) define a fallback engine with the same settings (functional, basis set) but with more strict convergence criterion, e.g. "tight", "extreme" or "superextreme" (near the bottom of the Figure on the right), named "TM Fallback". Then check the "use fallback" checkbox of the standard engine ("Turbomole 1" in the example on the right) and chose "TM Fallback" from the dropdown. As the fallback engine is only used if "normal" convergence criterion is not tight enough, it never hurts to specify this type of fallback.
  • DFTB+ and mixed systems: If you wish to use DFTB+ as engine for parts of your system, e.g. the outer shells, but some of your molecules are not DFTB+ compatible (e.g. Irppy3 embedded in TPBi), you can nevertheless use a DFTB+ engine in combination with a Fallback engine that can handle all molecules in the sample, e.g. Turbomole with BP86, SVP. In this case, QP will try to run DFTB+ and switch to the Fallback engine only for these molecules for which DFTB+ crashes due to incompatible atom types.

Connected documentation

Previous: Input Files | Next: Typical Runs

The results of the search are