7.3.1.1. GFN1-xTB¶
ParAMS provides a GFN1xTBParameters
interface class to Grimme’s first generation xTB model, of which GFN1-xTB 1 is the standard parameterization.
The names of the parameters contained in the GFN1xTBParameters
class closely follow the naming in the original GFN1-xTB article. All parameters use the GFN1-xTB value as the default and have a default range assigned already, which is centered around the GFN1-xTB parameter value (taking physical constraints into account). All parameters are inactive by default, meaning they will not be optimized unless explicitly enabled. The following example shows how to set up a re-parameterization of the GFN1-xTB repulsive potentials of lithium and fluoride.
# Make an interface to the xTB model in DFTB.
# This loads Grimme's GFN1-xTB parameterization by default.
interface = GFN1xTBParameters()
# Activate optimization of the repulsive potential of Li.
interface['Li:alpha'].is_active = True
interface['Li:Z'].is_active = True
# Activate optimization of the repulsive potential of F.
interface['F:alpha'].is_active = True
interface['F:Z'].is_active = True
7.3.1.1.1. List of parameter names¶
The GFN1-xTB parameterization has 1492 parameters and covers all elements up to radon. The parameter files for GFN1-xTB can be found in $AMSRESOURCES/DFTB/GFN1-xTB
. The elements.xtbpar
contains all element-specific parameters, except for the basis set definition. Their names start with the element symbol, followed by the parameter name from table S31 in the supplementary information of the GFN1-xTB article. As an example, these are the element specific parameter for carbon:
Parameter name |
Default value |
Default range |
---|---|---|
|
0.479988 |
[0.159996, 1.439964] |
|
1.053856 |
[1.553856, 0.553856] |
|
1.281954 |
[0.640977, 2.563908] |
|
4.428763 |
[2.2143815, 6.6431445] |
|
0.0 |
[0.0, 0.5] |
|
2.55 |
[2.295, 2.805] |
The basis set definition from table S31 of the SI is stored in the basis.xtbpar
file. The corresponding parameter names start with Xx:Basis:nl
, where Xx
is the element symbol, n
the main quantum number and l
the angular momentum quantum number (s
, p
or d
). As an example, these are the 8 basis set parameters for carbon:
Parameter name |
Default value |
Default range |
---|---|---|
|
-7.08217 |
[-17.08217, 2.91783] |
|
0.0 |
[-5.0, 5.0] |
|
-13.58721 |
[-23.58721, -3.58721] |
|
1.960324 |
[0.4, 4.0] |
|
0.812216 |
[-9.187784, 10.812216] |
|
-0.471181 |
[-5.471181, 4.528819] |
|
-10.052785 |
[-20.052785, -0.052785] |
|
1.832096 |
[0.4, 4.0] |
Hint
One could add d-functions to carbon atoms by editing the basis.xtbpar
file and adding the corresponding 4 lines for e.g. a 3d set of functions with a guess for the parameter values. These new parameters would then also become available in the GFN1xTBParameters
class (with a default range). It is not possible to add/remove basis functions from within the GFN1xTBParameters
interface. The interface can only change the values of existing parameters, so you need to edit the files manually to create/remove parameters.
Warning
It is not possible to have multiple sets of basis functions with the same l-value for one element, i.e. you can not have 2p and 3p functions at the same time. The one exception to this rule is hydrogen, which comes with both a 1s and 2s function in GFN1-xTB. However, the basis of hydrogen is hardcoded at the moment and can not be changed in our xTB implementation.
In addition to the element-specific parameters, there are a couple of global parameters from table 2 of the article, which are stored in the globals.xtbpar
file. These names of these parameters start with Globals
:
Parameter name |
Default value |
Default range |
---|---|---|
|
1.85 |
[1.48, 2.22] |
|
2.25 |
[1.8, 2.7] |
|
2.0 |
[1.6, 2.4] |
|
2.08 |
[1.664, 2.496] |
|
2.85 |
[2.28, 3.42] |
|
-0.007 |
[-0.0056, -0.0084] |
|
0.006 |
[0.0048, 0.0072] |
|
-0.003 |
[-0.0024, -0.0036] |
|
-0.005 |
[-0.004, -0.006] |
|
0.005 |
[0.004, 0.006] |
|
2.0 |
[1.6, 2.4] |
|
1.5 |
[1.2, 1.78] |
|
1.3 |
[1.04, 1.56] |
|
0.44 |
[0.352, 0.528] |
|
1.1 |
[0.88, 1.32] |
|
1.2 |
[0.96, 1.44] |
The 4 parameters of the D3-BJ dispersion correction 2 are stored in the additional_parameters.yaml
file and prefixed with D3BJDispersion
:
Parameter name |
Default value |
Default range |
---|---|---|
|
1.0 |
[1.0, 1.0] |
|
2.4 |
[0.5, 6.0] |
|
0.63 |
[0.2, 2.0] |
|
5.0 |
[2.0, 8.0] |
Finally GFN1-xTB has a small number of element pair-wise parameters. These are also stored in globals.xtbpar
and have the names Globals.K_Xx-Yy
, where Xx
and Yy
are the symbols of the involved elements. These are all the element pair-wise parameters of GFN1-xTB:
Parameter name |
Default value |
Default range |
---|---|---|
|
0.96 |
[0.768, 1.152] |
|
0.95 |
[0.76, 1.14] |
|
1.04 |
[0.832, 1.248] |
|
0.97 |
[0.776, 1.164] |
|
1.01 |
[0.808, 1.212] |
|
0.9 |
[0.72, 1.08] |
|
0.8 |
[0.64, 0.96] |
|
0.8 |
[0.64, 0.96] |
Hint
Additional element pairs can be added to the file, and will then be accessible via the GFN1xTBParameters
class. A good default value is then 1.0
, which is the implicit default in GFN1-xTB if no element-pair specific parameter is given. Note that the ordering of the elements is irrelevant, so adding K_Li-F
is the same as adding K_F-Li
and only one of them should be added.
References
- 1
S. Grimme, C. Bannwarth, P. Shushkov, A Robust and Accurate Tight-Binding Quantum Chemical Method for Structures, Vibrational Frequencies, and Noncovalent Interactions of Large Molecular Systems Parametrized for All spd-Block Elements (Z = 1-86), J. Chem. Theory Comput., 2017, 13 (5), pp 1989–2009
- 2
S.Grimme, S.Ehrlich, L.Goerigk, Effect of the damping function in dispersion corrected density functional theory, J. Comput. Chem. 32, 1456 (2011)
7.3.1.1.2. GFN1xTBParameters API¶
-
class
GFN1xTBParameters
(folder=None, settings=None)¶ Interface to the parameterization of the GFN1-xTB model Hamiltonians in the AMS DFTB engine.
-
__init__
(folder=None, settings=None)¶ Create a new instance based on the parameterization in folder.
Parameters:
- folderoptional, str
The folder from which the values of the parameterization are read. If this is argument is not set, the standard GFN1-xTB parameterization will be read from
$AMSRESOURCES/DFTB/GFN1-xTB
.- settingsoptional, Settings
A settings instance with other settings to be used for the engine. Should start at normal root level of Settings instances used with the AMS driver, i.e. DFTB engine input should be in
settings.input.dftb
.
-
write
(folder, parameters=None)¶ Writes the current parameterization to disk.
If folder does not exist, it will be created. If folder exists the files in it will be overwritten if necessary.
-
get_engine
(parameters=None, path=None, write=True)¶ - Returns
Engine
for a DFTB engine with xTB model Hamiltonian matching the passed params.
If path is not set (should be a directory), the parameter files will be created in a temporary directory that is deleted when the returned
Engine
is garbage collected.
-