QuantumPatch DFT Engines
Introduction
QuantumPatch (QP) performs full quantummechanical 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(nanomatchmodules/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 threecenter terms. DFTB+ is a versatile opensource 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 SCCDFTB, DFTB2 is the most used DFTB model to date. DFTB2 is used with the following options:
 thirdorder:
false
 thirdorder:
 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
 thirdorder:
 LCDFTB: Longrangecorrected DFTB implements exact exchange (within the approximations of DFTB) in a rangeseparated DFT fashion. Rangeseparated DFTB calculations are only implemented up to a DFTB2 level of theory but compatible with linear response theory. LCDFTB calculations are set up as:
 thirdorder:
false
 rangesep:
true
 thirdorder:
 TDDFTB: Timedependent DFTB works, the same way linear response DFT does, via solving the Casida equationsin a Davidson solver to retrieve excited state properties. TDDFTB is implemented in DFTB+ only to a DFTB2 level of theory but can, if chosen, be run with LCDFTB. TDDFTB calculations are set up as follows:
 thirdorder:
false
 lin_resp:
true
 thirdorder:
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 BeckeJohnson damping function in place of the standard zerodamping. 
lin_resp: If set to
true
will enable linear response (random phase approximation) for timedependent (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 rangeseparated functional. 
ip_fit:
Chooses the rangeseparation 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 rangeseparation parameter.

 rangesep: Whether to use (rangeseparated) LCDFTB.
 relaxation_steps: Maximum number of iterations before stopping geometry optimization.

singlet: Only read if lin_resp is set to
true.
If set totrue
TDDFTB 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 totrue
TDDFTB 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 opensource quantum chemistry software that focuses on efficient highaccuracy calculations of electronic structure. We use it for its Density Functional Theroy (DFT) implementation, where it also includes several rangeseparated 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:
 STO3G
 321G
 631G
 631G*
 631G**
 631+G
 631+G*
 631+G**
 631++G
 631++G*
 631++G**
 6311G
 6311G*
 6311G**
 6311+G
 6311+G*
 6311+G**
 6311++G
 6311++G*
 6311++G**
 def2SV(P)
 def2SVP
 def2TZVP
 def2TZVPP
 def2QZVP
 def2QZVPP
 ccpVDZ
 ccpVTZ
 ccpVQZ
 augccpVDZ
 augccpVTZ
 augccpVQZ

functional: Define a DFT functional to carry out calculations with. Supported are several Generalized Gradient Approximation (GGA) functionals and MetaGGAs, 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 rangeseparated functionals (sometimes also called longrangecorrected) which improve upon calculated transport properties. Available functionals are:
 B2GPPLYP
 B2PLYP
 B3LYP
 BLYP
 BP86
 CAMB3LYP
 HSE06
 M11
 M11L
 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 BeckeJohnson damping function in place of the standard zerodamping. 
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 rangeseparated functional. 
ip_fit:
Chooses the rangeseparation 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 rangeseparation 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 postHartreeFock (postHF) methods. QuantumPatch utilizes TURBOMOLE for its quick integration schemes SelfConsistentField (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:
 STO3G
 321G
 431g hondo
 631g hondo
 631G
 631G*
 631G**
 6311G
 6311G*
 6311G**
 6311++G**
 DZ
 DZP
 TZ
 TZP
 TZV
 TZVP
 TZVPP
 TZVPPP
 QZV
 QZVP
 SV
 SVP
 SV(P)
 defSVP
 defSV(P)
 defTZVP
 defTZVPP
 defQZVP
 defQZVPP
 def2SVP
 def2SV(P)
 def2TZVP
 def2TZVPP
 def2SZVPD
 def2TZVPD
 def2TZVPPD
 def2QZVPD
 def2QZVPPD
 dhfSV(P)
 dhfSVP
 dhfTZVP
 dhfTZVPP
 dhfQZVP
 dhfQZVPP
 ccpVDZ
 augccpVDZ
 ccpwVDZ
 augccpwVDZ
 ccpVTZ
 augccpVTZ
 ccpwVTZ
 augccpwVTZ
 ccpVQZ
 augccpVQZ
 ccpwVQZ
 augccpwVQZ

functional:
Define a DFT functional to carry out calculations with. Supported are several Generalized Gradient Approximation (GGA) functionals and MetaGGAs, 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
 M061
 M062X
 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 BeckeJohnson damping function in place of the standard zerodamping.  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 totight
andextreme.
Changes energy and maximum force convergence criterium for geometry relaxations.
normal:
Energy convergence criterium at 1.0d5 and maximum gradient at 1.0d5. 
tight:
Changes energy convergence criterium to 1.0d6 and maximum gradient to 1.0d4. 
extreme:
Changes energy convergence criterium to 1.0d7 and maximum gradient to 1.0d5.


lin_resp: If set to
true
will enable linear response (random phase approximation) for timedependent (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 fourcentertwoelectron 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 TDDFT 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 totight
andextreme.
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. 
superextreme:
SCF convergence reached at 7th decimal. Maximum number of iterations increased to 500. DIIS damping parameter starts at 9.0 and is decreased by an average step of 0.25 down to a minimum of 0.95.

 threads: How many concurrent threads should be used for this calculation.

triplet: Only read if lin_resp is set to
true.
If set totrue
will only calculate excitations that result in triplet electron configurations. If set tofalse
all linear response calculations will only calculate singlet excitations.
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 singlemolecule 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