# Model Hamiltonians¶

As of the 2020 release, the DFTB engine supports two different classes of model Hamiltonians, Grimme’s extended tight-binding, and the classic Slater-Koster based DFTB. All of these model Hamiltonians are obtained by applying tight-binding approximations to the DFT total energy expression.

## Slater-Koster based DFTB¶

The efficiency of Slater-Koster based DFTB stems from its use of an optimized minimum valence orbital basis that reduces the linear algebra operations, and a two center-approximation for the Kohn-Sham potential that allows precalculation and storage of integrals using the Slater-Koster technique. This makes DFTB orders of magnitude faster than DFT, but requires parameter files (containing the integrals) for all pair-wise combinations of atoms in a molecule. Many elements can be handled with the parameter sets included in the distribution. Alternatively, sets of parameters in the SKF format can be downloaded and used from third party sources.

There are three flavors of Slater-Koster based DFTB available in our implementation:

• The “plain” DFTB Hamiltonian as introduced by Porezag and Seifert without a self-consistency cycle.
• The second order self-consistent charge extension SCC-DFTB (recently also called DFTB2), which accounts for density fluctuations and improves results on polar bonds. Note that the self-consistent calculations is about an order of magnitude slower than calculations with the “plain” DFTB Hamiltonian.
• The third order extension known as DFTB3, which improve the description of hydrogen-bonded complexes and proton affinities. Note that DFTB3 calculations are only marginally slower than SCC-DFTB based calculations.

Note that since these methods have been respectively parametrized, it is important to specify a matching parameter set when applying one of these models.

## Extended tight-binding (xTB)¶

The extended tight-binding (xTB) model Hamiltonian as recently been introduced by Grimme and coworkers. It makes similar approximations as Slater-Koster based DFTB, but instead of using precalculated integrals, xTB employs a (small) basis of Slater-type orbitals and uses an extended Hückel-like approximation for the Hamiltonian.

The DFTB Engine supports the GFN1-xTB parameterization of xTB, which is optimized for geometries, frequencies and non-covalent interactions and covers all elements of the periodic table up to radon.

## Model Hamiltonian¶

The following keys allow you to select a model Hamiltonian and control different aspects of how the stationary Schroedinger equation is solved.

Model [DFTB | SCC-DFTB | DFTB3 | GFN1-xTB | NonSCC-GFN1-xTB]

Model
Type: Multiple Choice GFN1-xTB [DFTB, SCC-DFTB, DFTB3, GFN1-xTB, NonSCC-GFN1-xTB] Selects the Hamiltonian used in the DFTB calculation: - DFTB/DFTB0/DFTB1 for classic DFTB without a self-consistent charge cycle - SCC-DFTB/DFTB2 with a self-consistency loop for the Mulliken charges - DFTB3 for additional third-order contributions. - GFN1-xTB for Grimme’s extended tight-binding model in the GFN1 version. - NonSCC-GFN1-xTB for a less accurate but faster version of GFN1-xTB without a self-consistency cycle The choice has to be supported by the selected parameter set.

Different parameters may be suitable for different model Hamiltonians. It is important to choose the appropriate parameter set for the type of calculation and molecular system under study, see parameter sets.

ResourcesDir string

ResourcesDir
Type: String The directory containing the parameter files. The path can be absolute or relative. Relative paths starting with ./ are considered relative to the directory in which the calculation is started, otherwise they are considered relative to $AMSRESOURCES/DFTB. This key is required for the Slater-Koster based DFTB models, but optional for xTB. Examples: ResourcesDir Dresden Uses the resource directory$AMSRESOURCES/DFTB/Dresden.
ResourcesDir /home/myusername/myparamsdir
Uses the specified path /home/myusername/myparamsdir as the resource directory.

NOTE: Each resource directory must contain a file called metainfo.yaml, which specifies the capabilities of the parameter set. For details see metainfo.yaml.

## Dispersion correction¶

The selected model Hamiltonian can be extended with dispersion correction:

DispersionCorrection [None | Auto | UFF | ULG | D2 | D3-BJ | D4]

DispersionCorrection
Type: Multiple Choice None [None, Auto, UFF, ULG, D2, D3-BJ, D4] Dispersion This key is used to specify an empirical dispersion model. Please refer to the DFTB documentation for details on the different methods. By default no dispersion correction will be applied. Setting this to auto applies the dispersion correction recommended in the DFTB parameter set’s metainfo file. Note that the D3-BJ dispersion correction is enabled by default when using the GFN1-xTB model Hamiltonian, but can be disabled manually by setting this keyword to None.

The newest and most accurate dispersion correction is D4. We recommend both the D3-BJ and D4 dispersion corrections as good defaults, depending on their availability for the specific combination of the model Hamiltonian and parameterization. Note that the D4 dispersion corrections is computationally more expensive than D3-BJ for bulk periodic systems (it scales as O(N3) with the number of atoms and is not parallelized), thus the user may first want to evaluate if the increased accuracy justifies the increased computational cost.

## Solvation (GBSA)¶

Solvation effects can be included via the implicit GBSA solvation model. We gratefully acknowledge the Grimme’s group in Bonn for their contribution of the GBSA solvation method code.

To enable the GBSA method, specify the desired solvent:

Solvation
Solvent [...]
End

Solvation
Type: Block Generalized Born solvation model with Solvent Accessible Surface Area (GBSA).
Solvent
Type: Multiple Choice None [None, Acetone, Acetonitrile, CHCl3, CS2, DMSO, Ether, H2O, Methanol, THF, Toluene] Solvent used in the GBSA implicit solvation model.

More options can be specified in the Solvation block:

Solvation
UseGSASA Yes/No
GSolvState [Gas1BarSolvent | Gas1MSolvent1M | Gas1BarSolvent1M]
Temperature float
SurfaceGrid [230 | 974 | 2030 | 5810]
End

Solvation
UseGSASA
Type: Bool Yes Solvation Free Energy Include shift term and G(SASA) terms in the energy and gradient.
GSolvState
Type: Multiple Choice Gas1MSolvent1M [Gas1BarSolvent, Gas1MSolvent1M, Gas1BarSolvent1M] Reference state for solvation free energy shift.
Temperature
Type: Float 298.15 Kelvin The temperature used when calculating the solvation free energy shift. Only used for ‘Gas1BarSolvent’ and ‘Gas1BarSolvent1M’ GSolvState options.
SurfaceGrid
Type: Multiple Choice 230 [230, 974, 2030, 5810] Number of angular grid points for the construction of the solvent accessible surface area. Usually the default number of grid point suffices, but in case of suspicious behaviors you can increase the number of points.

## SCC details and spin-polarization¶

SCC
Converge
Charge float
End
DIIS
Enabled Yes/No
MaxSamples integer
MaximumCoefficient float
MinSamples integer
MixingFactor float
End
HXDamping Yes/No
Iterations integer
OrbitalDependent Yes/No
Unrestricted Yes/No
End

SCC
Type: Block This optional section configures various details of the self-consistent charge cycle. If the model Hamiltonian does not need a self-consistent solution (e.g. plain DFTB0), none of this information is used and the entire section will be ignored.
AdaptiveMixing
Type: Bool Yes Change the mixing parameter based on the monitored energy. A significant increase of energy will strongly reduce the mixing. Then it will slowly grow back to the SCC%Mixing value.
Converge
Type: Block Controls the convergence criteria of the SCC cycle.
Charge
Type: Float 1e-08 Charge convergence The maximum change in atomic charges between subsequent SCC iterations. If the charges change less, the SCC cycle is considered converged.
DIIS
Type: Block Parameters influencing the DIIS self-consistency method
Enabled
Type: Bool Yes If not enabled simple mixing without DIIS acceleration will be used.
MaxSamples
Type: Integer 20 Specifies the maximum number of samples considered during the direct inversion of iteration of subspace (DIIS) extrapolation of the atomic charges during the SCC iterations. A smaller number of samples potentially leads to a more aggressive convergence acceleration, while a larger number often guarantees a more stable iteration. Due to often occurring linear dependencies within the set of sample vectors, the maximum number of samples is reached only in very rare cases.
MaximumCoefficient
Type: Float 10.0 When the diis expansion coefficients exceed this threshold, the solution is rejected. The vector space is too crowded. The oldest vector is discarded, and the expansion is re-evaluated.
MinSamples
Type: Integer -1 When bigger than one, this affects the shrinking of the DIIS space on linear depence. It will not reduce to a smaller space than MinSamples unless there is extreme dependency.
MixingFactor
Type: Float 0.15 The parameter used to mix the DIIS linear combination of previously sampled atomic charge vectors with an analogous linear combination of charge vectors resulting from population analysis combination. It can assume real values between 0 and 1.
HXDamping
Type: Bool This option activates the DFTB3 style damping for H-X bonds. Note that this is always enabled if the DFTB%Model key is set to DFTB3. Not used with xTB.
Iterations
Type: Integer 500 Allows to specify the maximum number of SCC iterations. The default should suffice for most standard calculations. Convergence issues may arise due to the use of the Aufbau occupations for systems with small HOMO-LUMO gaps. In this case the use of a Fermi broadening strategy may improve convergence. Choosing a smaller mixing parameter (see DFTB%SCC%Mixing) may also help with convergence issues: it often provides a more stable but slower way to converge the SCC cycle.
OrbitalDependent
Type: Bool Activates or disables orbital resolved calculations. If this key is absent the recommended settings from the parameter file’s metainfo.
Unrestricted
Type: Bool No Enables spin unrestricted calculations. Only collinear spin polarization is supported, see Theor Chem Acc (2016) 135: 232, for details. Must be supported by the chosen parameter set. Not yet compatible with DFTB3, k-space sampling periodic calculations or the xTB models.
Occupation
KT float
NumBoltz integer
Strategy [Auto | Aufbau | Fermi]
Temperature float
End

Occupation
Type: Block Configures the details of how the molecular orbitals are occupied with electrons.
KT
Type: Float Hartree (KT) Boltmann constant times temperature, used for electronic temperature with strategy is auto. The default value is the default value for Temperature*3.166815423e-6. This key and Temperature are mutually exlusive.
NumBoltz
Type: Integer 10 The electronic temperature is done with a Riemann Stieltjes numerical integration, between zero and one occupation. This defines the number of points to be used.
Strategy
Type: Multiple Choice Auto [Auto, Aufbau, Fermi] Occupation This optional key allows to specify the fill strategy to use for the molecular orbitals. Can either be ‘Aufbau’ for simply filling the energetically lowest orbitals, or ‘Fermi’ for a smeared out Fermi-Dirac occupation. By default the occupation strategy is determined automatically, based on the other settings (such as the number of unpaired electrons).
Temperature
Type: Float 300.0 Kelvin Fermi temperature The Fermi temperature used for the Fermi-Dirac distribution. Ignored in case of aufbau occupations.
UnpairedElectrons integer

UnpairedElectrons
Type: Integer 0 Spin polarization This specifies the number of unpaired electrons (not the multiplicity!). This number will then be used in the orbital-filling strategy. Has to be compatible with the total number of electrons, meaning it must be an even number if the total number of electrons is even and odd if the total number is odd. Must be an integer value. Note that this does not activate spin polarization, it only affects the filling of the orbitals.

## k-space integration¶

As of the 2019 release, the k-space integration is unified between BAND and DFTB and uses the same keys as input, and the same defaults. See the page on k-space integration in the BAND manual for details and recommendations.

KSpace
Quality [GammaOnly | Basic | Normal | Good | VeryGood | Excellent]
Regular
NumberOfPoints integer_list
End
Symmetric
KInteg integer
End
Type [Regular | Symmetric]
End

KSpace
Type: Block Options for the k-space integration (i.e. the grid used to sample the Brillouin zone).
Quality
Type: Multiple Choice Normal [GammaOnly, Basic, Normal, Good, VeryGood, Excellent] K-space Select the quality of the K-space grid used to sample the Brillouin Zone. If ‘GammaOnly’, only one point (the gamma point) will be used. For the other options, the actual number of K points generated depends on the size of the unit cell. The larger the real space cell, the fewer K points will be generated. The CPU-time and accuracy strongly depend on this option.
Regular
Type: Block Options for the regular k-space integration grid.
NumberOfPoints
Type: Integer List Use a regular grid with the specified number of k-points along each reciprocal lattice vector. For 1D periodic systems you should specify only one number, for 2D systems two numbers, and for 3D systems three numbers.
Symmetric
Type: Block Options for the symmetric k-space integration grid.
KInteg
Type: Integer Accuracy Specify the accuracy for the Symmetric method. 1: absolutely minimal (only the G-point is used) 2: linear tetrahedron method, coarsest spacing 3: quadratic tetrahedron method, coarsest spacing 4,6,… (even): linear tetrahedron method 5,7…. (odd): quadratic method The tetrahedron method is usually by far inferior.
Type
Type: Multiple Choice Regular [Regular, Symmetric] K-space grid type The type of k-space integration grid used to sample the Brillouin zone (BZ) used. ‘Regular’: simple regular grid. ‘Symmetric’: symmetric grid for the irreducible wedge of the first BZ (useful when high-symmetry points in the BZ are needed to capture the correct physics of the system, graphene being a notable example).

## xTB specific keywords¶

A few keywords only apply to the xTB model Hamiltonian.

XTBConfig
useXBTerm Yes/No
End

XTBConfig
Type: Block This block allows for minor tweaking.
SlaterRadialThreshold
Type: Float 1e-05 Threshold determining the range of the basis functions. Using a larger threshold will speed up the calculation, but will also make the results less accurate.
useXBTerm
Type: Bool No Whether to use the Halogen bonding (XB) term. This is not advised as it has a non-continuous PES.

Note

The GFN1-xTB implementation in AMS currently does not implement the electronic entropy term from the article by Grimme et al. It therefore gives slightly different energies (but not gradients!) for systems with partially occupied molecular orbitals.

## Technical options¶

Technical
AnalyticalStressTensor Yes/No
EwaldSummation
CellRangeFactor float
Enabled Yes/No
Tolerance float
End
MatricesViaFullMaxSize integer
Parallel
nCoresPerGroup integer
nGroups integer
nNodesPerGroup integer
End
ReuseKSpaceConfig Yes/No
Screening
End
UseGeneralizedDiagonalization Yes/No
End

Technical
Type: Block This optional section is about technical aspects of the program that should not concern the normal user.
AnalyticalStressTensor
Type: Bool Yes Whether to compute the stress tensor analytically. Note: This can only be used together with Ewald summation as it will give (slightly) wrong results with Madelung screening.
EwaldSummation
Type: Block Configures the details of the Ewald summation of the Coulomb interaction.
CellRangeFactor
Type: Float 2.0 Smaller values will make the Ewald summation less accurate but faster.
Enabled
Type: Bool Yes Whether to use Ewald summation for the long-range part of the Coulomb interaction. Otherwise screening is used.
Tolerance
Type: Float 1e-10 Larger values will make the Ewald summation less accurate but faster.
MatricesViaFullMaxSize
Type: Integer 2047 Matrices smaller than this size are constructed via a full matrix. This is faster, but uses more memory in the construction.
Parallel
Type: Block Calculation of the orbitals in several k-points is trivially parallel.
nCoresPerGroup
Type: Integer Number of cores in each working group.
nGroups
Type: Integer Total number of processor groups. This is the number of tasks that will be executed in parallel.
nNodesPerGroup
Type: Integer Cores per task Number of nodes in each group. This option should only be used on homogeneous compute clusters, where all used compute nodes have the same number of processor cores.
ReuseKSpaceConfig
Type: Bool Yes Keep the number of k-points constant during a lattice optimization. Otherwise the PES might display jumps, because the number of points depends on the lattice vector sizes. If this option is on it will always use the number of k-points that was used from a previous result.
Screening
Type: Block For SCC-DFTB in periodic systems the Coulomb interaction can (instead of using Ewald summation) be screened with a Fermi-Dirac like function defined as S(r)=1/(exp((r-r_madel)/d_madel)+1). This section allows to change some details of the screening procedure. Note that Coulomb screening is only used if the Ewald summation is disabled.
dMadel
Type: Float Bohr Sets the smoothness of the screening function. The default is 1/10 of [rMadel].
rMadel
Type: Float Bohr Sets the range of the screening function. The default is 2x the norm of the longest lattice vector.
UseGeneralizedDiagonalization
Type: Bool Yes Whether or not to use generalized diagonalization. Does not affect the results, but might be faster or slower.
StoreMatrices Yes/No

StoreMatrices
Type: Bool No Determines whether the Hamiltonian and overlap matrices are stored in the binary result file.