From 466a0934680634fa740ff6af6056cc09727b2328 Mon Sep 17 00:00:00 2001 From: Marvin Friede <51965259+marvinfriede@users.noreply.github.com> Date: Sat, 4 Jan 2025 16:10:43 +0100 Subject: [PATCH] GFN2 reference charges (#76) --- .pre-commit-config.yaml | 15 +- src/tad_dftd4/damping/atm.py | 5 +- src/tad_dftd4/damping/parameters/read.py | 38 +- src/tad_dftd4/data/r4r2.py | 4 +- src/tad_dftd4/model.py | 67 +- src/tad_dftd4/reference/__init__.py | 24 + src/tad_dftd4/reference/charge_eeq.py | 1910 ++++++++++++++++++++++ src/tad_dftd4/reference/charge_gfn2.py | 1587 ++++++++++++++++++ src/tad_dftd4/{ => reference}/params.py | 1886 --------------------- src/tad_dftd4/typing/builtin.py | 11 +- test/conftest.py | 7 +- test/test_disp/samples.py | 3 +- test/test_grad/test_param.py | 8 +- test/test_grad/test_pos.py | 4 +- test/test_model/test_general.py | 18 + test/test_model/test_model.py | 11 + test/test_model/test_params.py | 21 +- 17 files changed, 3679 insertions(+), 1940 deletions(-) create mode 100644 src/tad_dftd4/reference/__init__.py create mode 100644 src/tad_dftd4/reference/charge_eeq.py create mode 100644 src/tad_dftd4/reference/charge_gfn2.py rename src/tad_dftd4/{ => reference}/params.py (93%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e8bacee..603a5cb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,9 +14,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -ci: - skip: [mypy] - repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 @@ -54,23 +51,15 @@ repos: hooks: - id: isort name: isort (python) - args: ["--profile", "black", "--filter-files"] + args: ["--profile", "black", "--line-length", "80", "--filter-files"] - repo: https://github.com/psf/black rev: 24.10.0 hooks: - id: black - stages: [pre-commit] + args: ["--line-length", "80"] - repo: https://github.com/woodruffw/zizmor-pre-commit rev: v0.10.0 hooks: - id: zizmor - - - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.14.0 - hooks: - - id: mypy - pass_filenames: false - args: [--config-file=pyproject.toml, --ignore-missing-imports, src] - exclude: "test|examples/|test/conftest.py" diff --git a/src/tad_dftd4/damping/atm.py b/src/tad_dftd4/damping/atm.py index 2db6901..a6da085 100644 --- a/src/tad_dftd4/damping/atm.py +++ b/src/tad_dftd4/damping/atm.py @@ -151,7 +151,10 @@ def get_atm_dispersion( ) ang = torch.where( - mask_triples * (r2ij <= cutoff2) * (r2jk <= cutoff2) * (r2jk <= cutoff2), + mask_triples + * (r2ij <= cutoff2) + * (r2jk <= cutoff2) + * (r2jk <= cutoff2), 0.375 * s / r5 + 1.0 / r3, torch.tensor(0.0, **dd), ) diff --git a/src/tad_dftd4/damping/parameters/read.py b/src/tad_dftd4/damping/parameters/read.py index 9c3c2bd..67b5a27 100644 --- a/src/tad_dftd4/damping/parameters/read.py +++ b/src/tad_dftd4/damping/parameters/read.py @@ -18,7 +18,9 @@ Damping Parameters ================== -Read damping parameters from toml file. +Read damping parameters from toml file. The TOML file is coped from the DFT-D4 +Fortran GitHub repository. +(https://github.com/dftd4/dftd4/blob/main/assets/parameters.toml) """ from __future__ import annotations @@ -28,18 +30,38 @@ import torch -from ...typing import Tensor +from ...typing import Tensor, overload __all__ = ["get_params", "get_params_default"] +@overload +def get_params( + func: str, + variant: Literal["bj-eeq-atm"], + with_reference: Literal[False], + device: torch.device | None = None, + dtype: torch.dtype | None = None, +) -> dict[str, Tensor]: ... + + +@overload +def get_params( + func: str, + variant: Literal["bj-eeq-atm"], + with_reference: Literal[True], + device: torch.device | None = None, + dtype: torch.dtype | None = None, +) -> dict[str, Tensor | str]: ... + + def get_params( func: str, variant: Literal["bj-eeq-atm"] = "bj-eeq-atm", with_reference: bool = False, device: torch.device | None = None, dtype: torch.dtype | None = None, -) -> dict[str, Tensor]: +) -> dict[str, Tensor] | dict[str, Tensor | str]: """ Obtain damping parameters for a given functional. @@ -85,12 +107,12 @@ def get_params( par_section = variant_section[variant] - d = {} + d: dict[str, Tensor | str] = {} for k, v in par_section.items(): if k == "doi": if with_reference is False: continue - d[k] = v + d[k] = str(v) else: d[k] = torch.tensor(v, device=device, dtype=dtype) @@ -98,7 +120,9 @@ def get_params( def get_params_default( - variant: Literal["bj-eeq-atm", "d4.bj-eeq-two", "d4.bj-eeq-mbd"] = "bj-eeq-atm", + variant: Literal[ + "bj-eeq-atm", "d4.bj-eeq-two", "d4.bj-eeq-mbd" + ] = "bj-eeq-atm", device: torch.device | None = None, dtype: torch.dtype | None = None, ) -> dict[str, Tensor]: @@ -128,7 +152,5 @@ def get_params_default( for k, v in table["default"]["parameter"]["d4"][variant].items(): if isinstance(v, float): d[k] = torch.tensor(v, device=device, dtype=dtype) - else: - d[k] = v return d diff --git a/src/tad_dftd4/data/r4r2.py b/src/tad_dftd4/data/r4r2.py index 701e081..5aa1fcb 100644 --- a/src/tad_dftd4/data/r4r2.py +++ b/src/tad_dftd4/data/r4r2.py @@ -59,5 +59,7 @@ # fmt: on -R4R2 = torch.sqrt(0.5 * (r4_over_r2 * torch.sqrt(torch.arange(r4_over_r2.shape[0])))) +R4R2 = torch.sqrt( + 0.5 * (r4_over_r2 * torch.sqrt(torch.arange(r4_over_r2.shape[0]))) +) """r⁴ over r² expectation values.""" diff --git a/src/tad_dftd4/model.py b/src/tad_dftd4/model.py index 194c490..05e9bac 100644 --- a/src/tad_dftd4/model.py +++ b/src/tad_dftd4/model.py @@ -42,8 +42,8 @@ import torch from tad_mctc.math import einsum -from . import data, params -from .typing import Tensor, TensorLike +from . import data, reference +from .typing import Literal, Tensor, TensorLike __all__ = ["D4Model"] @@ -70,10 +70,13 @@ class D4Model(TensorLike): wf: float """Weighting factor for coordination number interpolation.""" + ref_charges: Literal["eeq", "gfn2"] + """Reference charges to use for the model.""" + alpha: Tensor """Reference polarizabilities of unique species.""" - __slots__ = ("numbers", "ga", "gc", "wf", "alpha") + __slots__ = ("numbers", "ga", "gc", "wf", "ref_charges", "alpha") def __init__( self, @@ -81,6 +84,7 @@ def __init__( ga: float = ga_default, gc: float = gc_default, wf: float = wf_default, + ref_charges: Literal["eeq", "gfn2"] = "eeq", alpha: Tensor | None = None, device: torch.device | None = None, dtype: torch.dtype | None = None, @@ -101,6 +105,8 @@ def __init__( wf : float, optional Weighting factor for coordination number interpolation. Defaults to `wf_default`. + ref_charges : Literal["eeq", "gfn2"], optional + Reference charges to use for the model. Defaults to `"eeq"`. alpha : Tensor | None, optional Reference polarizabilities of unique species. Defaults to `None`. device : torch.device | None, optional @@ -114,6 +120,7 @@ def __init__( self.ga = ga self.gc = gc self.wf = wf + self.ref_charges = ref_charges if alpha is None: self.alpha = self._set_refalpha_eeq() @@ -167,8 +174,18 @@ def weight_references( if q is None: q = torch.zeros(self.numbers.shape, **self.dd) - refc = params.refc.to(self.device)[self.numbers] - refq = params.refq.to(**self.dd)[self.numbers] + if self.ref_charges == "eeq": + from .reference.charge_eeq import clsq as _refq + + refq = _refq.to(**self.dd)[self.numbers] + elif self.ref_charges == "gfn2": + from .reference.charge_gfn2 import refq as _refq + + refq = _refq.to(**self.dd)[self.numbers] + else: + raise ValueError(f"Unknown reference charges: {self.ref_charges}") + + refc = reference.refc.to(self.device)[self.numbers] mask = refc > 0 # Due to the exponentiation, `norm` and `expw` may become very small @@ -179,7 +196,9 @@ def weight_references( # double`. In order to avoid this error, which is also difficult to # detect, this part always uses `torch.double`. `params.refcovcn` is # saved with `torch.double`, but I still made sure... - refcn = params.refcovcn.to(device=self.device, dtype=torch.double)[self.numbers] + refcn = reference.refcovcn.to(device=self.device, dtype=torch.double)[ + self.numbers + ] # For vectorization, we reformulate the Gaussian weighting function: # exp(-wf * igw * (cn - cn_ref)^2) = [exp(-(cn - cn_ref)^2)]^(wf * igw) @@ -204,14 +223,18 @@ def refc_pow(n: int) -> Tensor: expw = torch.where( mask, refc_pow_final, - torch.tensor(0.0, device=self.device, dtype=torch.double), # double! + torch.tensor( + 0.0, device=self.device, dtype=torch.double + ), # double! ) # normalize weights norm = torch.where( mask, torch.sum(expw, dim=-1, keepdim=True), - torch.tensor(1e-300, device=self.device, dtype=torch.double), # double!) + torch.tensor( + 1e-300, device=self.device, dtype=torch.double + ), # double!) ) gw_temp = (expw / norm).type(self.dtype) # back to real dtype @@ -219,7 +242,9 @@ def refc_pow(n: int) -> Tensor: maxcn = torch.max(refcn, dim=-1, keepdim=True)[0] # prevent division by 0 and small values - exceptional = (torch.isnan(gw_temp)) | (gw_temp > torch.finfo(self.dtype).max) + exceptional = (torch.isnan(gw_temp)) | ( + gw_temp > torch.finfo(self.dtype).max + ) gw = torch.where( exceptional, @@ -323,13 +348,23 @@ def _set_refalpha_eeq(self) -> Tensor: zero = torch.tensor(0.0, **self.dd) numbers = self.unique - refsys = params.refsys.to(self.device)[numbers] - refsq = params.refsq.to(**self.dd)[numbers] - refascale = params.refascale.to(**self.dd)[numbers] - refalpha = params.refalpha.to(**self.dd)[numbers] - refscount = params.refscount.to(**self.dd)[numbers] - secscale = params.secscale.to(**self.dd) - secalpha = params.secalpha.to(**self.dd) + refsys = reference.refsys.to(self.device)[numbers] + refascale = reference.refascale.to(**self.dd)[numbers] + refalpha = reference.refalpha.to(**self.dd)[numbers] + refscount = reference.refscount.to(**self.dd)[numbers] + secscale = reference.secscale.to(**self.dd) + secalpha = reference.secalpha.to(**self.dd) + + if self.ref_charges == "eeq": + from .reference.charge_eeq import clsh as _refsq + + refsq = _refsq.to(**self.dd)[numbers] + elif self.ref_charges == "gfn2": + from .reference.charge_gfn2 import refh as _refsq + + refsq = _refsq.to(**self.dd)[numbers] + else: + raise ValueError(f"Unknown reference charges: {self.ref_charges}") mask = refsys > 0 diff --git a/src/tad_dftd4/reference/__init__.py b/src/tad_dftd4/reference/__init__.py new file mode 100644 index 0000000..cfc370c --- /dev/null +++ b/src/tad_dftd4/reference/__init__.py @@ -0,0 +1,24 @@ +# This file is part of tad-dftd4. +# +# SPDX-Identifier: Apache-2.0 +# Copyright (C) 2024 Grimme Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +Reference Parameters +==================== + +Parameters of reference systems. +""" + +from .params import * diff --git a/src/tad_dftd4/reference/charge_eeq.py b/src/tad_dftd4/reference/charge_eeq.py new file mode 100644 index 0000000..1a69fbe --- /dev/null +++ b/src/tad_dftd4/reference/charge_eeq.py @@ -0,0 +1,1910 @@ +# This file is part of tad-dftd4. +# +# SPDX-Identifier: Apache-2.0 +# Copyright (C) 2024 Grimme Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +Parameters: EEQ +=============== + +Reference EEQ charges. +""" +import torch + +__all__ = ["clsq", "clsh"] + + +clsq = torch.tensor( + [ + [ + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # H + +0.00000000000000, # H2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # He + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Li + +0.37061732228445, # LiH + +0.50233549783851, # Cl4Li4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Be + +0.17355187691088, # BeH + +0.31121011558254, # BeH2 + +0.34700000000000, # Be4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # B + -0.10464538187607, # BH + -0.20153708141000, # BH2 + -0.28222637549158, # BH3 + -0.34038820700608, # B2H6 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # C + -0.17123705791311, # CH + -0.14210003554128, # C2H2 + -0.22250854670718, # C2H4 + -0.25653918216622, # C2H6 + -0.10441353918078, # C6H6 + +0.21030312699251, # OC + ], + [ + +0.00000000000000, # N + -0.35298592555229, # NH + -0.30125788296606, # N2H2 + -0.82429723124422, # NH3 + +0.00000000000000, # N2 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # O + -0.35471470167212, # OH + -0.59881526060460, # OH2 + +0.00000000000000, # O2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # F + -0.24773915491465, # FH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ne + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Na + +0.37895090683878, # NaH + +0.54307355286424, # Cl4Na4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Mg + +0.32933884303798, # MgH + +0.51074920852765, # MgH2 + +0.34300000000000, # Mg4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Al + +0.03709152257935, # AlH + +0.05079767549293, # AlH2 + +0.05291396113772, # AlH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Si + +0.01649127941162, # SiH + -0.00640083798505, # SiH2 + -0.03084420203156, # Si2H4 + -0.06585975737745, # Si2H6 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # P + -0.17987135979307, # PH + -0.12671124139840, # P2H2 + -0.17467927422329, # PH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # S + -0.16267234588041, # SH + -0.23775171448878, # SH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cl + -0.15045057451823, # ClH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ar + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # K + +0.44376242787490, # KH + +0.30400000000000, # K4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ca + +0.31814452979636, # CaH + +0.50078886624431, # CaH2 + +0.24400000000000, # Ca4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sc + +0.50144727255861, # ScH2 + +0.62485373296540, # ScH3 + +0.78700000000000, # ScF3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ti + +0.32259167829296, # TiH2 + +0.53505953733387, # TiH4 + +0.90400000000000, # TiF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # V + +0.30538713298844, # VH2 + +0.39745931358650, # VH3 + +0.93500000000000, # VF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cr + +0.17721817570715, # CrH2 + +0.16754955881404, # CrH12 + +0.61467776168125, # CrO6C6 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Mn + +0.26888428905691, # MnH2 + -0.01438794807264, # MnH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Fe + +0.16108330144470, # FeH2 + +0.05493242513468, # FeH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Co + +0.21568151580380, # CoH2 + +0.20590049778110, # CoH3 + -0.01577894818610, # CoH9 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ni + +0.09850839901243, # NiH2 + +0.02948298358915, # NiH8 + +0.02439689318964, # NiH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cu + +0.05450628884215, # CuH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Zn + +0.25796918840353, # ZnH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ga + +0.02870304944818, # GaH + +0.04511416923234, # GaH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ge + +0.00938786608492, # GeH + -0.00592798448224, # GeH2 + -0.03161585463110, # GeH3 + -0.06445558548675, # GeH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # As + -0.09954248086481, # AsH + -0.11896736577051, # AsH2 + -0.10225384717106, # AsH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Se + -0.12327157100582, # SeH + -0.17535803722366, # SeH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Br + -0.14490782122377, # BrH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Kr + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Rb + +0.44852683448077, # RbH + +0.41600000000000, # Rb4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sr + +0.42643340166796, # SrH + +0.64902814271780, # SrH2 + +0.51400000000000, # Sr4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Y + +0.57618546114280, # YH2 + +0.72312847632101, # YH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Zr + +0.34661262612707, # ZrH2 + +0.56547785565182, # ZrH4 + +0.94300000000000, # ZrF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Nb + +0.42830519499403, # NbH2 + +0.56050948600940, # NbH3 + +1.24600000000000, # NbF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Mo + +0.46738200215089, # MoH2 + +0.47338670395900, # MoH12 + +0.59427677788562, # MoH6 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tc + +0.24709379453256, # TcH2 + +0.18198173917164, # TcH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ru + +0.32415456703039, # RuH2 + +0.36375674498582, # RuH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Rh + +0.14509956942986, # RhH2 + +0.18388211183689, # RhH3 + +0.24549798804335, # RhH5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pd + +0.22956514930613, # PdH2 + +0.55444971429388, # PdH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ag + +0.10670361771604, # AgH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cd + +0.21898540545170, # CdH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # In + +0.06391398485994, # InH + +0.10806425732282, # InH2 + +0.14171698994803, # InH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sn + +0.03599066704066, # SnH + +0.04368851386536, # SnH2 + +0.03463534758499, # SnH3 + +0.01418221277464, # SnH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sb + -0.01439446368141, # SbH + -0.01543201581300, # SbH2 + -0.00985357197761, # SbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Te + -0.09115200126999, # TeH + -0.09678003345023, # TeH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # I + -0.13740767685282, # IH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Xe + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cs + +0.46524059775602, # CsH + +0.49200000000000, # Cs4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ba + +0.42198236936188, # BaH + +0.63397117832958, # BaH2 + +0.52800000000000, # Ba4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # La + +0.65599616057853, # LaH2 + +0.83084860530330, # LaH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.78733393312177, # CeH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pr + +0.78255214121928, # PrH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Nd + +0.78608430866652, # NdH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pm + +0.79124653412356, # PmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sm + +0.78972506109909, # SmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Eu + +0.65326281414848, # EuH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Gd + +0.78994446367069, # GdH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tb + +0.79462439284960, # TbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Dy + +0.79518107342432, # DyH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ho + +0.80930480242405, # HoH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Er + +0.81306730354597, # ErH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tm + +0.81408370489997, # TmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Yb + +0.78415843735390, # YbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Lu + +0.82263187273050, # LuH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Hf + +0.44266476936835, # HfH2 + +0.68407375970491, # HfH4 + +0.94300000000000, # HfF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ta + +0.23523422154086, # TaH2 + +0.30980440015125, # TaH3 + +1.09300000000000, # TaF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # W + +0.31319918056428, # WH2 + +0.23020705290823, # WH12 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Re + +0.10191716059118, # ReH2 + -0.03451303623343, # ReH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Os + +0.19864391765550, # OsH2 + -0.06474020857185, # OsH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ir + -0.01399684403519, # IrH2 + -0.04786532465344, # IrH3 + -0.07756443085155, # IrH4 + -0.12042733196092, # IrH5 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pt + +0.00248540621951, # PtH2 + +0.10111888298865, # PtH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Au + +0.02560952126341, # AuH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Hg + +0.11991146919920, # HgH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tl + +0.05732791283824, # TlH + +0.10187349213041, # TlH2 + +0.14012325640618, # TlH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pb + +0.11449566751294, # PbH + +0.16758459323190, # PbH2 + +0.18265663815354, # PbH3 + +0.17825662719618, # PbH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Bi + +0.04276095694715, # BiH + +0.06545183973370, # BiH2 + +0.07662886467999, # BiH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Po + -0.04479748091835, # PoH + -0.02201995669726, # PoH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # At + -0.07596582020292, # AtH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Rn + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Fr + +0.07920000000000, # FrH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ra + +0.23880000000000, # RaH + +0.30820000000000, # RaH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ac + +0.11750000000000, # AcH + +0.18970000000000, # AcH2 + +0.23800000000000, # AcH3 + +0.27140000000000, # AcH4 + +0.29250000000000, # AcH5 + +0.30940000000000, # AcH6 + ], + [ + +0.00000000000000, # Th + +0.08840000000000, # ThH + +0.15380000000000, # ThH2 + +0.20480000000000, # ThH3 + +0.24330000000000, # ThH4 + +0.00000000000000, # ThH5 missing (GEOM) + +0.00000000000000, # ThH6 missing (GEOM) + ], + [ + +0.00000000000000, # Pa + +0.10670000000000, # PaH + +0.18290000000000, # PaH2 + +0.24670000000000, # PaH3 + +0.29300000000000, # PaH4 + +0.32920000000000, # PaH5 + +0.00000000000000, # PaH6 missing (GEOM) + ], + [ + +0.00000000000000, # U + +0.07960000000000, # UH + +0.00000000000000, # UH2 missing + +0.16920000000000, # UH3 + +0.20390000000000, # UH4 + +0.19490000000000, # UH5 + +0.24560000000000, # UH6 + ], + [ + +0.00000000000000, # Np + +0.07660000000000, # NpH + +0.13320000000000, # NpH2 + +0.17550000000000, # NpH3 + +0.21870000000000, # NpH4 + +0.24240000000000, # NpH5 + +0.26660000000000, # NpH6 + ], + [ + +0.00000000000000, # Pu + +0.14950000000000, # PuH + +0.24790000000000, # PuH2 + +0.31810000000000, # PuH3 + +0.37790000000000, # PuH4 + +0.40920000000000, # PuH5 + +0.43640000000000, # PuH6 + ], + [ + +0.00000000000000, # Am + +0.15100000000000, # AmH + +0.24100000000000, # AmH2 + +0.30680000000000, # AmH3 + +0.00000000000000, # AmH4 missing + +0.38010000000000, # AmH5 + +0.40550000000000, # AmH6 + ], + [ + +0.00000000000000, # Cm + +0.07640000000000, # CmH + +0.13380000000000, # CmH2 + +0.17800000000000, # CmH3 + +0.21120000000000, # CmH4 + +0.23780000000000, # CmH5 + +0.25950000000000, # CmH6 + ], + [ + +0.00000000000000, # Bk + +0.02210000000000, # BkH + +0.04090000000000, # BkH2 + +0.05620000000000, # BkH3 + +0.07110000000000, # BkH4 + +0.00000000000000, # BkH5 missing (GEOM) + +0.00000000000000, # BkH6 missing (GEOM) + ], + [ + +0.00000000000000, # Cf + +0.15350000000000, # CfH + +0.25390000000000, # CfH2 + +0.33210000000000, # CfH3 + +0.38680000000000, # CfH4 + +0.00000000000000, # CfH5 missing + +0.45000000000000, # CfH6 + ], + [ + +0.00000000000000, # Es + +0.11350000000000, # EsH + +0.19140000000000, # EsH2 + +0.25500000000000, # EsH3 + +0.29690000000000, # EsH4 + +0.32680000000000, # EsH5 + +0.34710000000000, # EsH6 + ], + [ + +0.00000000000000, # Fm + +0.09860000000000, # FmH + +0.16690000000000, # FmH2 + +0.22300000000000, # FmH3 + +0.25830000000000, # FmH4 + +0.28460000000000, # FmH5 + +0.30460000000000, # FmH6 + ], + [ + +0.00000000000000, # Md + +0.06780000000000, # MdH + +0.11580000000000, # MdH2 + +0.15370000000000, # MdH3 + +0.17900000000000, # MdH4 + +0.00000000000000, # MdH5 missing (GEOM) + +0.00000000000000, # MdH6 missing (GEOM) + ], + [ + +0.00000000000000, # No + +0.04800000000000, # NoH + +0.08650000000000, # NoH2 + +0.11740000000000, # NoH3 + +0.14110000000000, # NoH4 + +0.15770000000000, # NoH5 + +0.17180000000000, # NoH6 + ], + [ + +0.00000000000000, # Lr + +0.05050000000000, # LrH + +0.08900000000000, # LrH2 + +0.11910000000000, # LrH3 + +0.14090000000000, # LrH4 + +0.15740000000000, # LrH5 + +0.17080000000000, # LrH6 + ], + ], + dtype=torch.float64, +) + +clsh = torch.tensor( + [ + [ + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # H + +0.00000000000000, # H2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # He + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Li + -0.37061732228445, # LiH + -0.50233549783851, # Cl4Li4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Be + -0.17355187691088, # BeH + -0.15560505779127, # BeH2 + -0.34700000000000, # Be4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # B + +0.10464538187607, # BH + +0.10076854070500, # BH2 + +0.09407545849719, # BH3 + +0.11346273566869, # B2H6 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # C + +0.17123705791311, # CH + +0.14210003554128, # C2H2 + +0.11125427335359, # C2H4 + +0.08551306072207, # C2H6 + +0.10441353918078, # C6H6 + -0.21030312699251, # OC + ], + [ + +0.00000000000000, # N + +0.35298592555229, # NH + +0.30125788296606, # N2H2 + +0.27476574374807, # NH3 + +0.00000000000000, # N2 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # O + +0.35471470167212, # OH + +0.29940763030230, # OH2 + +0.00000000000000, # O2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # F + +0.24773915491465, # FH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ne + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Na + -0.37895090683878, # NaH + -0.54307355286424, # Cl4Na4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Mg + -0.32933884303798, # MgH + -0.25537460426383, # MgH2 + -0.34300000000000, # Mg4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Al + -0.03709152257935, # AlH + -0.02539883774646, # AlH2 + -0.01763798704591, # AlH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Si + -0.01649127941162, # SiH + +0.00320041899253, # SiH2 + +0.01542210101578, # Si2H4 + +0.02195325245915, # Si2H6 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # P + +0.17987135979307, # PH + +0.12671124139840, # P2H2 + +0.05822642474110, # PH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # S + +0.16267234588041, # SH + +0.11887585724439, # SH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cl + +0.15045057451823, # ClH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ar + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # K + -0.44376242787490, # KH + -0.30400000000000, # K4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ca + -0.31814452979636, # CaH + -0.25039443312215, # CaH2 + -0.24400000000000, # Ca4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sc + -0.25072363627930, # ScH2 + -0.20828457765513, # ScH3 + -0.26200000000000, # ScF3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ti + -0.16129583914648, # TiH2 + -0.13376488433347, # TiH4 + -0.22575000000000, # TiF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # V + -0.15269356649422, # VH2 + -0.13248643786217, # VH3 + -0.18700000000000, # VF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cr + -0.08860908785357, # CrH2 + -0.01396246323450, # CrH12 + -0.19615593415441, # CrO6C6 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Mn + -0.13444214452845, # MnH2 + +0.00130799527933, # MnH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Fe + -0.08054165072235, # FeH2 + -0.00549324251347, # FeH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Co + -0.10784075790190, # CoH2 + -0.06863349926037, # CoH3 + +0.00175321646512, # CoH9 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ni + -0.04925419950621, # NiH2 + -0.00368537294864, # NiH8 + -0.00304961164871, # NiH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cu + -0.05450628884215, # CuH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Zn + -0.12898459420177, # ZnH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ga + -0.02870304944818, # GaH + -0.02255708461617, # GaH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ge + -0.00938786608492, # GeH + +0.00296399224112, # GeH2 + +0.01053861821037, # GeH3 + +0.01611389637169, # GeH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # As + +0.09954248086481, # AsH + +0.05948368288525, # AsH2 + +0.03408461572369, # AsH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Se + +0.12327157100582, # SeH + +0.08767901861183, # SeH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Br + +0.14490782122377, # BrH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Kr + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Rb + -0.44852683448077, # RbH + -0.41600000000000, # Rb4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sr + -0.42643340166796, # SrH + -0.32451407135890, # SrH2 + -0.51400000000000, # Sr4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Y + -0.28809273057140, # YH2 + -0.24104282544034, # YH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Zr + -0.17330631306353, # ZrH2 + -0.14136946391296, # ZrH4 + -0.23575000000000, # ZrF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Nb + -0.21415259749701, # NbH2 + -0.18683649533647, # NbH3 + -0.24920000000000, # NbF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Mo + -0.23369100107545, # MoH2 + -0.03944889199658, # MoH12 + -0.09904612964760, # MoH6 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tc + -0.12354689726628, # TcH2 + -0.01654379447015, # TcH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ru + -0.16207728351520, # RuH2 + -0.03637567449858, # RuH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Rh + -0.07254978471493, # RhH2 + -0.06129403727896, # RhH3 + -0.04909959760867, # RhH5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pd + -0.11478257465306, # PdH2 + -0.06930621428674, # PdH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ag + -0.10670361771604, # AgH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cd + -0.10949270272585, # CdH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # In + -0.06391398485994, # InH + -0.05403212866141, # InH2 + -0.04723899664934, # InH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sn + -0.03599066704066, # SnH + -0.02184425693268, # SnH2 + -0.01154511586166, # SnH3 + -0.00354555319366, # SnH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sb + +0.01439446368141, # SbH + +0.00771600790650, # SbH2 + +0.00328452399254, # SbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Te + +0.09115200126999, # TeH + +0.04839001672511, # TeH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # I + +0.13740767685282, # IH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Xe + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cs + -0.46524059775602, # CsH + -0.49200000000000, # Cs4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ba + -0.42198236936188, # BaH + -0.31698558916479, # BaH2 + -0.52800000000000, # Ba4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # La + -0.32799808028927, # LaH2 + -0.27694953510110, # LaH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.26244464437392, # CeH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pr + -0.26085071373976, # PrH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Nd + -0.26202810288884, # NdH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pm + -0.26374884470785, # PmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sm + -0.26324168703303, # SmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Eu + -0.32663140707424, # EuH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Gd + -0.26331482122356, # GdH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tb + -0.26487479761653, # TbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Dy + -0.26506035780811, # DyH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ho + -0.26976826747468, # HoH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Er + -0.27102243451532, # ErH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tm + -0.27136123496666, # TmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Yb + -0.26138614578463, # YbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Lu + -0.27421062424350, # LuH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Hf + -0.22133238468418, # HfH2 + -0.17101843992623, # HfH4 + -0.23575000000000, # HfF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ta + -0.11761711077043, # TaH2 + -0.10326813338375, # TaH3 + -0.21860000000000, # TaF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # W + -0.15659959028214, # WH2 + -0.01918392107569, # WH12 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Re + -0.05095858029559, # ReH2 + +0.00313754874849, # ReH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Os + -0.09932195882775, # OsH2 + +0.00647402085719, # OsH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ir + +0.00699842201760, # IrH2 + +0.01595510821781, # IrH3 + +0.01939110771289, # IrH4 + +0.02408546639218, # IrH5 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pt + -0.00124270310976, # PtH2 + -0.01263986037358, # PtH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Au + -0.02560952126341, # AuH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Hg + -0.05995573459960, # HgH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tl + -0.05732791283824, # TlH + -0.05093674606521, # TlH2 + -0.04670775213539, # TlH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pb + -0.11449566751294, # PbH + -0.08379229661595, # PbH2 + -0.06088554605118, # PbH3 + -0.04456415679904, # PbH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Bi + -0.04276095694715, # BiH + -0.03272591986685, # BiH2 + -0.02554295489333, # BiH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Po + +0.04479748091835, # PoH + +0.01100997834863, # PoH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # At + +0.07596582020292, # AtH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Rn + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Fr + -0.07920000000000, # FrH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ra + -0.23880000000000, # RaH + -0.15410000000000, # RaH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ac + -0.11750000000000, # AcH + -0.09485000000000, # AcH2 + -0.07933333333333, # AcH3 + -0.06785000000000, # AcH4 + -0.05850000000000, # AcH5 + -0.05156666666667, # AcH6 + ], + [ + +0.00000000000000, # Th + -0.08840000000000, # ThH + -0.07690000000000, # ThH2 + -0.06826666666667, # ThH3 + -0.06082500000000, # ThH4 + +0.00000000000000, # ThH5 missing (GEOM) + +0.00000000000000, # ThH6 missing (GEOM) + ], + [ + +0.00000000000000, # Pa + -0.10670000000000, # PaH + -0.09145000000000, # PaH2 + -0.08223333333333, # PaH3 + -0.07325000000000, # PaH4 + -0.06584000000000, # PaH5 + +0.00000000000000, # PaH6 missing (GEOM) + ], + [ + +0.00000000000000, # U + -0.07960000000000, # UH + -0.00000000000000, # UH2 missing + -0.05640000000000, # UH3 + -0.05097500000000, # UH4 + -0.03898000000000, # UH5 + -0.04093333333333, # UH6 + ], + [ + +0.00000000000000, # Np + -0.07660000000000, # NpH + -0.06660000000000, # NpH2 + -0.05850000000000, # NpH3 + -0.05467500000000, # NpH4 + -0.04848000000000, # NpH5 + -0.04443333333333, # NpH6 + ], + [ + +0.00000000000000, # Pu + -0.14950000000000, # PuH + -0.12395000000000, # PuH2 + -0.10603333333333, # PuH3 + -0.09447500000000, # PuH4 + -0.08184000000000, # PuH5 + -0.07273333333333, # PuH6 + ], + [ + +0.00000000000000, # Am + -0.15100000000000, # AmH + -0.12050000000000, # AmH2 + -0.10226666666667, # AmH3 + -0.00000000000000, # AmH4 missing + -0.07602000000000, # AmH5 + -0.06758333333333, # AmH6 + ], + [ + +0.00000000000000, # Cm + -0.07640000000000, # CmH + -0.06690000000000, # CmH2 + -0.05933333333333, # CmH3 + -0.05280000000000, # CmH4 + -0.04756000000000, # CmH5 + -0.04325000000000, # CmH6 + ], + [ + +0.00000000000000, # Bk + -0.02210000000000, # BkH + -0.02045000000000, # BkH2 + -0.01873333333333, # BkH3 + -0.01777500000000, # BkH4 + +0.00000000000000, # BkH5 missing (GEOM) + +0.00000000000000, # BkH6 missing (GEOM) + ], + [ + +0.00000000000000, # Cf + -0.15350000000000, # CfH + -0.12695000000000, # CfH2 + -0.11070000000000, # CfH3 + -0.09670000000000, # CfH4 + -0.00000000000000, # CfH5 missing + -0.07500000000000, # CfH6 + ], + [ + +0.00000000000000, # Es + -0.11350000000000, # EsH + -0.09570000000000, # EsH2 + -0.08500000000000, # EsH3 + -0.07422500000000, # EsH4 + -0.06536000000000, # EsH5 + -0.05785000000000, # EsH6 + ], + [ + +0.00000000000000, # Fm + -0.09860000000000, # FmH + -0.08345000000000, # FmH2 + -0.07433333333333, # FmH3 + -0.06457500000000, # FmH4 + -0.05692000000000, # FmH5 + -0.05076666666667, # FmH6 + ], + [ + +0.00000000000000, # Md + -0.06780000000000, # MdH + -0.05790000000000, # MdH2 + -0.05123333333333, # MdH3 + -0.04475000000000, # MdH4 + +0.00000000000000, # MdH5 missing (GEOM) + +0.00000000000000, # MdH6 missing (GEOM) + ], + [ + +0.00000000000000, # No + -0.04800000000000, # NoH + -0.04325000000000, # NoH2 + -0.03913333333333, # NoH3 + -0.03527500000000, # NoH4 + -0.03154000000000, # NoH5 + -0.02863333333333, # NoH6 + ], + [ + +0.00000000000000, # Lr + -0.05050000000000, # LrH + -0.04450000000000, # LrH2 + -0.03970000000000, # LrH3 + -0.03522500000000, # LrH4 + -0.03148000000000, # LrH5 + -0.02846666666667, # LrH6 + ], + ], + dtype=torch.float64, +) diff --git a/src/tad_dftd4/reference/charge_gfn2.py b/src/tad_dftd4/reference/charge_gfn2.py new file mode 100644 index 0000000..a4e0bd0 --- /dev/null +++ b/src/tad_dftd4/reference/charge_gfn2.py @@ -0,0 +1,1587 @@ +# This file is part of tad-dftd4. +# +# SPDX-Identifier: Apache-2.0 +# Copyright (C) 2024 Grimme Group +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +""" +Parameters: GFN2 +================ + +Reference GFN2 charges. +""" +import torch + +__all__ = ["refq", "refh"] + + +refq = torch.tensor( + [ + [ + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # H + +0.00000000000000, # H2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.0, # He + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Li + +0.35924680736483, # LiH + +0.60553105026862, # Cl4Li4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Be + +0.35318171705506, # BeH + +0.47868871444650, # BeH2 + -0.65605016262773, # Be4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000001, # B + +0.15557155274674, # BH + +0.19433603553394, # BH2 + +0.24475443834742, # BH3 + +0.14920702115395, # B2H6 + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000001, # C + -0.12994792301999, # CH + -0.07885200894330, # C2H2 + -0.07676292658733, # C2H4 + -0.09463126916388, # C2H6 + -0.02858894127595, # C6H6 + +0.05061953301341, # OC + ], + [ + -0.00000000000000, # N + -0.17975369721743, # NH + -0.15258555866677, # N2H2 + -0.42898107659879, # NH3 + -0.00000000000000, # N2 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000001, # O + -0.33069420009468, # OH + -0.56376716743110, # OH2 + -0.00000000000002, # O2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000001, # F + -0.39039862127573, # FH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ne + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Na + +0.44612149004129, # NaH + +0.69570459023927, # Cl4Na4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.0, # Mg + +0.31858696714581, # MgH + +0.41366273285585, # MgH2 + +0.50571212038828, # Mg4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000001, # Al + +0.24477359917277, # AlH + +0.36087089581165, # AlH2 + +0.43660315534647, # AlH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Si + +0.16996090538399, # SiH + +0.24464651050076, # SiH2 + +0.20893161783021, # Si2H4 + +0.36245469258615, # Si2H6 + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000002, # P + -0.08781933942405, # PH + -0.03728416546523, # P2H2 + -0.11027568692625, # PH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # S + -0.17222533230765, # SH + -0.34208440200689, # SH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cl + -0.33096614692963, # ClH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Ar + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # K + +0.44919564669363, # KH + +0.70700012466991, # K4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Ca + +0.42382301144653, # CaH + +0.53704626474621, # CaH2 + +0.63912284405165, # Ca4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016423, # Sc + +0.19081329495662, # ScH2 + +0.57390951001388, # ScH3 + +1.02910987985129, # ScF3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000032847, # Ti + +0.38774830140171, # TiH2 + +0.97207545160459, # TiH4 + +1.45284490238150, # TiF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016528, # V + +0.30616936989879, # VH2 + +0.39411696843052, # VH3 + +0.69749634235669, # VF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000208, # Cr + +0.53605366789797, # CrH2 + +0.32326600457791, # CrH12 + +0.17434704715481, # CrO6C6 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000016527, # Mn + +0.72906362172268, # MnH2 + -1.38551399356320, # MnH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000032847, # Fe + +0.89971355662264, # FeH2 + -0.19729173677108, # FeH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000016425, # Co + +0.33885434982022, # CoH2 + +0.06673726947568, # CoH3 + -0.99922236530237, # CoH9 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ni + -0.02893652143275, # NiH2 + -1.41046704877362, # NiH8 + -1.49873637353726, # NiH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Cu + +0.17543548739457, # CuH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.0, # Zn + +0.22218813020625, # ZnH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000001, # Ga + +0.30692560016815, # GaH + +0.25583231781832, # GaH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000001, # Ge + +0.15565415588149, # GeH + +0.19489066026694, # GeH2 + +0.07796365954686, # GeH3 + +0.08330185602026, # GeH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # As + +0.05341421485122, # AsH + +0.08123466402805, # AsH2 + +0.09121599779474, # AsH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000001, # Se + -0.14680263633976, # SeH + -0.30550786355706, # SeH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Br + -0.26466311607527, # BrH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Kr + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Rb + +0.38168923853998, # RbH + +0.61945426066521, # Rb4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Sr + +0.35645143561998, # SrH + +0.49180081018397, # SrH2 + +0.58944749671323, # Sr4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016424, # Y + +0.24428414680300, # YH2 + +0.57366289721017, # YH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000032846, # Zr + +0.23434724050528, # ZrH2 + +1.20638669472971, # ZrH4 + +1.59446204953052, # ZrF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016530, # Nb + +0.07227863443605, # NbH2 + +0.29185185542919, # NbH3 + +1.63800000000000, # NbF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000215, # Mo + +0.41711608738091, # MoH2 + -4.49557215843238, # MoH12 + -0.06533097052885, # MoH6 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000016529, # Tc + +0.64591594055856, # TcH2 + -0.23793642312608, # TcH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000032850, # Ru + +0.33761249164822, # RuH2 + -0.70670795998300, # RuH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000016424, # Rh + +0.13533447502854, # RhH2 + -0.06808099954071, # RhH3 + -0.00946705792926, # RhH5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pd + +0.13729986752066, # PdH2 + -1.40283988548386, # PdH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000088, # Ag + +0.07743633228111, # AgH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.0, # Cd + +0.33653584549362, # CdH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # In + +0.34258129843160, # InH + +0.26652372419494, # InH2 + +0.20507380029383, # InH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000001, # Sn + +0.11709105905770, # SnH + +0.20024277847179, # SnH2 + +0.07115823557122, # SnH3 + +0.02040246592599, # SnH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Sb + +0.11698834506861, # SbH + +0.18480068371662, # SbH2 + +0.23470973824995, # SbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000001, # Te + -0.00520338227711, # TeH + -0.00151877920060, # TeH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000001, # I + -0.18609272966361, # IH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # 1e + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.0, # Cs + +0.44073166763575, # CsH + +0.68068249931321, # Cs4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.0, # Ba + +0.39462085293344, # BaH + +0.56717887047949, # BaH2 + +0.62956728884112, # Ba4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016424, # La + +0.14182729573672, # LaH2 + +0.61948745805358, # LaH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.54768224095698, # CeH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000021208, # Pr + +0.56091390202022, # PrH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000019384, # Nd + +0.57175663319949, # NdH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000047809, # Pm + +0.57848494573230, # PmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000067069, # Sm + +0.58363743729144, # SmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000029832, # Eu + +0.14255010862838, # EuH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000020011, # Gd + +0.58503142163331, # GdH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000017383, # Tb + +0.60523146786190, # TbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016680, # Dy + +0.61019655094139, # DyH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016492, # Ho + +0.62162856785073, # HoH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016442, # Er + +0.62470266440724, # ErH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016430, # Tm + +0.63183032821235, # TmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016425, # Yb + +0.60550144239070, # YbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016423, # Lu + +0.64112998199707, # LuH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000032846, # Hf + +0.11182987101245, # HfH2 + +1.03176947330435, # HfH4 + +1.35275862077626, # HfF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000016531, # Ta + +0.16442900959316, # TaH2 + +0.50275891608761, # TaH3 + +1.84791460855243, # TaF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000215, # W + -0.33545451190268, # WH2 + -0.88683226154612, # WH12 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000001, # Re + +0.24763704610429, # ReH2 + -1.18136092555004, # ReH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000032846, # Os + +0.39810831827982, # OsH2 + -0.74972152576721, # OsH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000016428, # Ir + +0.25293750608113, # IrH2 + +0.07099664544311, # IrH3 + +0.08089441537446, # IrH4 + +0.07168988850722, # IrH5 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000057, # Pt + +0.06077075971517, # PtH2 + -1.31315249908318, # PtH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Au + +0.16039939518296, # AuH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.0, # Hg + -0.04321502684659, # HgH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000001, # Tl + +0.30915981534272, # TlH + +0.08292819294371, # TlH2 + -0.09717467138010, # TlH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000001, # Pb + +0.25127061741389, # PbH + +0.36893958472478, # PbH2 + +0.20035516415189, # PbH3 + +0.01348187443840, # PbH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.00000000000000, # Bi + +0.16648528849973, # BiH + +0.27582968178310, # BiH2 + +0.35078718856604, # BiH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000001, # Po + +0.13640050127609, # PoH + +0.28152411931918, # PoH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000001, # At + +0.03800713219800, # AtH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + ], + dtype=torch.float64, +) + + +refh = torch.tensor( + [ + [ + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # H + +0.00000000000000, # H2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # He + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Li + -0.35924680736483, # LiH + -0.60553105026862, # Cl4Li4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Be + -0.35318171705506, # BeH + -0.23934435722325, # BeH2 + +0.00000000000000, # Be4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # B + -0.15557155274761, # BH + -0.09716801776697, # BH2 + -0.08158481278247, # BH3 + -0.04973567371798, # B2H6 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # C + +0.12994792301999, # CH + +0.07885200894330, # C2H2 + +0.03838146329367, # C2H4 + +0.03154375638796, # C2H6 + +0.02858894127595, # C6H6 + -0.05061953301341, # OC + ], + [ + +0.00000000000000, # N + +0.17975369722031, # NH + +0.15258555866677, # N2H2 + +0.14299369219960, # NH3 + +0.00000000000000, # N2 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # O + +0.33069420009468, # OH + +0.28188358371555, # OH2 + +0.00000000000000, # O2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # F + +0.39039862127574, # FH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ne + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Na + -0.44612149004129, # NaH + -0.69570459023927, # Cl4Na4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Mg + -0.31858696714581, # MgH + -0.20683136642793, # MgH2 + +0.00000000000000, # Mg4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Al + -0.24477359917277, # AlH + -0.18043544790582, # AlH2 + -0.14553438511549, # AlH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Si + -0.16996090538399, # SiH + -0.12232325525038, # SiH2 + -0.10446580891510, # Si2H4 + -0.12081823086205, # Si2H6 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # P + +0.08781933942403, # PH + +0.03728416546523, # P2H2 + +0.03675856230875, # PH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # S + +0.17222533230765, # SH + +0.17104220100345, # SH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cl + +0.33096614692963, # ClH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ar + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # K + -0.44919564669363, # KH + -0.70700012466991, # K4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ca + -0.42382301144653, # CaH + -0.26852313237311, # CaH2 + -0.63912284405165, # Ca4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sc + -0.09540664747831, # ScH2 + -0.19130317000463, # ScH3 + -0.34303662000000, # ScF3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ti + -0.19387415070086, # TiH2 + -0.24301886290115, # TiH4 + -0.36600000000000, # TiF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # V + -0.15308468494977, # VH2 + -0.13137232283301, # VH3 + -0.13960000000000, # VF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cr + -0.26802683372543, # CrH2 + -0.02693883371483, # CrH12 + -0.12895656370357, # CrO6C6 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Mn + -0.36453181087692, # MnH2 + +0.12595581759665, # MnH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Fe + -0.44985677831131, # FeH2 + +0.01972917367711, # FeH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Co + -0.16942717490891, # CoH2 + -0.02224575649166, # CoH3 + +0.11102470725582, # CoH9 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ni + +0.01446826083399, # NiH2 + +0.17630838109670, # NiH8 + +0.18734204669216, # NiH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cu + -0.17543548739456, # CuH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Zn + -0.11109406510313, # ZnH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ga + -0.30692560016815, # GaH + -0.12791615890916, # GaH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ge + -0.15565415588148, # GeH + -0.09744533013347, # GeH2 + -0.02598788651562, # GeH3 + -0.02082546400506, # GeH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # As + -0.05341421485122, # AsH + -0.04061733201402, # AsH2 + -0.03040533259825, # AsH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Se + +0.14680263633976, # SeH + +0.15275393177853, # SeH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Br + +0.26466311607527, # BrH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Kr + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Rb + -0.38168923853998, # RbH + -0.61945426066521, # Rb4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sr + -0.35645143561998, # SrH + -0.24590040509199, # SrH2 + -0.58944749671323, # Sr4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Y + -0.12214207340151, # YH2 + -0.19122096573671, # YH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Zr + -0.11717362032611, # ZrH2 + -0.30159667368243, # ZrH4 + -0.39900000000000, # ZrF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Nb + -0.03613931721803, # NbH2 + -0.09728395180973, # NbH3 + -0.32760000000000, # NbF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Mo + -0.20855804369167, # MoH2 + +0.37463101320270, # MoH12 + +0.01088849508812, # MoH6 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tc + -0.32295797028009, # TcH2 + +0.02163058392055, # TcH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ru + -0.16880624582411, # RuH2 + +0.07067079599830, # RuH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Rh + -0.06766723747867, # RhH2 + +0.02269366651357, # RhH3 + +0.00189341152691, # RhH5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pd + -0.06864993376014, # PdH2 + +0.17535498568548, # PdH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ag + -0.07743633228111, # AgH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cd + -0.16826792274681, # CdH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # In + -0.34258129843160, # InH + -0.13326186209747, # InH2 + -0.06835793343128, # InH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sn + -0.11709105905770, # SnH + -0.10012138923590, # SnH2 + -0.02371941185707, # SnH3 + -0.00510061648150, # SnH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sb + -0.11698834506861, # SbH + -0.09240034185831, # SbH2 + -0.07823657941665, # SbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Te + +0.00520338227710, # TeH + +0.00075938960030, # TeH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # I + +0.18609272966361, # IH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # 1e + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Cs + -0.44073166763575, # CsH + -0.68068249931321, # Cs4Cl4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ba + -0.39462085293344, # BaH + -0.28358943523975, # BaH2 + -0.62956728884112, # Ba4O4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # La + -0.07091364828303, # LaH2 + -0.20649581935119, # LaH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + -0.18256074698566, # CeH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pr + -0.18697130067341, # PrH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Nd + -0.19058554439983, # NdH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pm + -0.19282831524410, # PmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Sm + -0.19454581243048, # SmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Eu + -0.07127505431420, # EuH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Gd + -0.19501047387777, # GdH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tb + -0.20174382262063, # TbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Dy + -0.20339885031380, # DyH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ho + -0.20720952261691, # HoH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Er + -0.20823422146908, # ErH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tm + -0.21061010940412, # TmH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Yb + -0.20183381413024, # YbH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Lu + -0.21370999399902, # LuH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Hf + -0.05591493550625, # HfH2 + -0.25794236832609, # HfH4 + -0.33818965519407, # HfF4 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ta + -0.08221450482839, # TaH2 + -0.16758630536254, # TaH3 + -0.36958292171049, # TaF5 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # W + +0.16772725595657, # WH2 + +0.07390268846218, # WH12 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Re + -0.12381852305011, # ReH2 + +0.10739644777728, # ReH11 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Os + -0.19905415913991, # OsH2 + +0.07497215257672, # OsH10 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Ir + -0.12646875304056, # IrH2 + -0.02366554848104, # IrH3 + -0.02022360384360, # IrH4 + -0.01433797770974, # IrH5 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pt + -0.03038537970592, # PtH2 + +0.16414406238540, # PtH8 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Au + -0.16039939518296, # AuH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Hg + +0.02160751342330, # HgH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Tl + -0.30915981534272, # TlH + -0.04146409647185, # TlH2 + +0.03239155712670, # TlH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Pb + -0.25127061741389, # PbH + -0.18446979236239, # PbH2 + -0.06678505471730, # PbH3 + -0.00337046860960, # PbH4 + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Bi + -0.16648528849972, # BiH + -0.13791484089155, # BiH2 + -0.11692906285535, # BiH3 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # Po + -0.13640050127609, # PoH + -0.14076205965959, # PoH2 + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + [ + +0.00000000000000, # At + -0.03800713219800, # AtH + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + +0.00000000000000, + ], + ], + dtype=torch.float64, +) diff --git a/src/tad_dftd4/params.py b/src/tad_dftd4/reference/params.py similarity index 93% rename from src/tad_dftd4/params.py rename to src/tad_dftd4/reference/params.py index f2323f1..263cd8c 100644 --- a/src/tad_dftd4/params.py +++ b/src/tad_dftd4/reference/params.py @@ -26,8 +26,6 @@ __all__ = [ "refcovcn", "refcnd3", - "refq", - "refsq", "refalpha", "refascale", "refscount", @@ -1140,1890 +1138,6 @@ dtype=torch.float64, ) -refq = torch.tensor( - [ - [ # dummay - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ # H - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ # He - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.37061732228445, - 0.50233549783800, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.17355187691088, - 0.31121011558254, - 0.34700000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.10464538187607, - -0.20153708141000, - -0.28222637549158, - -0.34038820700000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.17123705791311, - -0.14210003554128, - -0.22250854670718, - -0.25653918216622, - -0.10441353918078, - 0.21030312690000, - ], - [ - 0.00000000000000, - -0.35298592555229, - -0.30125788296606, - -0.82429723124422, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.35471470167212, - -0.59881526060460, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.24773915490000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.37895090683878, - 0.54307355286400, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.32933884303798, - 0.51074920852765, - 0.34300000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.03709152257935, - 0.05079767549293, - 0.05291396110000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.01649127941162, - -0.00640083798505, - -0.03084420203156, - -0.06585975730000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.17987135979307, - -0.12671124139840, - -0.17467927420000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.16267234588041, - -0.23775171448800, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.15045057450000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.44376242787490, - 0.30400000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.31814452979636, - 0.50078886624431, - 0.24400000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.50144727255861, - 0.62485373296540, - 0.78700000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.32259167829296, - 0.53505953733387, - 0.90400000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.30538713298844, - 0.39745931358650, - 0.93500000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.17721817570715, - 0.16754955881404, - 0.61467776160000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.26888428905691, - -0.01438794807200, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.16108330144470, - 0.05493242513400, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.21568151580380, - 0.20590049778110, - -0.01577894810000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.09850839901243, - 0.02948298358915, - 0.02439689310000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.05450628880000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.25796918840000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.02870304944818, - 0.04511416923200, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00938786608492, - -0.00592798448224, - -0.03161585463110, - -0.06445558540000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.09954248086481, - -0.11896736577051, - -0.10225384710000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.12327157100582, - -0.17535803722300, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.14490782120000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.44852683448077, - 0.41600000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.42643340166796, - 0.64902814271780, - 0.51400000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.57618546114280, - 0.72312847632100, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.34661262612707, - 0.56547785565182, - 0.94300000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.42830519499403, - 0.56050948600940, - 1.24600000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.46738200215089, - 0.47338670395900, - 0.59427677780000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.24709379453256, - 0.18198173917100, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.32415456703039, - 0.36375674498500, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.14509956942986, - 0.18388211183689, - 0.24549798800000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.22956514930613, - 0.55444971429300, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.10670361770000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.21898540540000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.06391398485994, - 0.10806425732282, - 0.14171698990000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.03599066704066, - 0.04368851386536, - 0.03463534758499, - 0.01418221270000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.01439446368141, - -0.01543201581300, - -0.00985357190000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.09115200126999, - -0.09678003345000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.13740767680000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.46524059775602, - 0.49200000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.42198236936188, - 0.63397117832958, - 0.52800000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.65599616057853, - 0.83084860530300, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.78733393310000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.78255214120000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.78608430860000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.79124653410000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.78972506100000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.65326281410000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.78994446360000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.79462439280000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.79518107340000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.80930480240000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.81306730350000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.81408370480000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.78415843730000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.82263187270000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.44266476936835, - 0.68407375970491, - 0.94300000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.23523422154086, - 0.30980440015125, - 1.09300000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.31319918056428, - 0.23020705290800, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.10191716059118, - -0.03451303623300, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.19864391765550, - -0.06474020857100, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.01399684403519, - -0.04786532465344, - -0.07756443085155, - -0.12042733190000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00248540621951, - 0.10111888298800, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.02560952120000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.11991146910000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.05732791283824, - 0.10187349213041, - 0.14012325640000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.11449566751294, - 0.16758459323190, - 0.18265663815354, - 0.17825662710000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.04276095694715, - 0.06545183973370, - 0.07662886460000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.04479748091835, - -0.02201995669700, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.07596582020000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ # Fr - 0.00000000000000, - 0.07920000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ # Ra - 0.00000000000000, - 0.23880000000000, - 0.30820000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ # Ac - 0.00000000000000, - 0.11750000000000, - 0.18970000000000, - 0.23800000000000, - 0.27140000000000, - 0.29250000000000, - 0.30940000000000, - ], - [ # Th - 0.00000000000000, - 0.08840000000000, - 0.15380000000000, - 0.20480000000000, - 0.24330000000000, - 0.00000000000000, # ThH5 missing (GEOM) - 0.00000000000000, # ThH6 missing (GEOM) - ], - [ # Pa - 0.00000000000000, - 0.10670000000000, - 0.18290000000000, - 0.24670000000000, - 0.29300000000000, - 0.32920000000000, - 0.00000000000000, # PaH6 missing (GEOM) - ], - [ # U - 0.00000000000000, - 0.07960000000000, - 0.00000000000000, # UH2 missing - 0.16920000000000, - 0.20390000000000, - 0.19490000000000, - 0.24560000000000, - ], - [ # Np - 0.00000000000000, - 0.07660000000000, - 0.13320000000000, - 0.17550000000000, - 0.21870000000000, - 0.24240000000000, - 0.26660000000000, - ], - [ # Pu - 0.00000000000000, - 0.14950000000000, - 0.24790000000000, - 0.31810000000000, - 0.37790000000000, - 0.40920000000000, - 0.43640000000000, - ], - [ # Am - 0.00000000000000, - 0.15100000000000, - 0.24100000000000, - 0.30680000000000, - 0.00000000000000, # AmH4 missing - 0.38010000000000, - 0.40550000000000, - ], - [ # Cm - 0.00000000000000, - 0.07640000000000, - 0.13380000000000, - 0.17800000000000, - 0.21120000000000, - 0.23780000000000, - 0.25950000000000, - ], - [ # Bk - 0.00000000000000, - 0.02210000000000, - 0.04090000000000, - 0.05620000000000, - 0.07110000000000, - 0.00000000000000, # BkH5 missing (GEOM) - 0.00000000000000, # BkH6 missing (GEOM) - ], - [ # Cf - 0.00000000000000, - 0.15350000000000, - 0.25390000000000, - 0.33210000000000, - 0.38680000000000, - 0.00000000000000, # CfH5 missing - 0.45000000000000, - ], - [ # Es - 0.00000000000000, - 0.11350000000000, - 0.19140000000000, - 0.25500000000000, - 0.29690000000000, - 0.32680000000000, - 0.34710000000000, - ], - [ # Fm - 0.00000000000000, - 0.09860000000000, - 0.16690000000000, - 0.22300000000000, - 0.25830000000000, - 0.28460000000000, - 0.30460000000000, - ], - [ # Md - 0.00000000000000, - 0.06780000000000, - 0.11580000000000, - 0.15370000000000, - 0.17900000000000, - 0.00000000000000, # MdH5 missing (GEOM) - 0.00000000000000, # MdH6 missing (GEOM) - ], - [ # No - 0.00000000000000, - 0.04800000000000, - 0.08650000000000, - 0.11740000000000, - 0.14110000000000, - 0.15770000000000, - 0.17180000000000, - ], - [ # Lr - 0.00000000000000, - 0.05050000000000, - 0.08900000000000, - 0.11910000000000, - 0.14090000000000, - 0.15740000000000, - 0.17080000000000, - ], - ], - dtype=torch.float64, -) - -refsq = torch.tensor( - [ - [ # dummy - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ # H - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ # He - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ # Li - 0.00000000000000, - -0.37061732228445, - -0.50233549783851, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.17355187691088, - -0.15560505779127, - -0.34700000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.10464538187607, - 0.10076854070500, - 0.09407545849719, - 0.11346273566869, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.17123705791311, - 0.14210003554128, - 0.11125427335359, - 0.08551306072207, - 0.10441353918078, - -0.21030312699251, - ], - [ - 0.00000000000000, - 0.35298592555229, - 0.30125788296606, - 0.27476574374807, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.35471470167212, - 0.29940763030230, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.24773915491465, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.37895090683878, - -0.54307355286424, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.32933884303798, - -0.25537460426383, - -0.34300000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.03709152257935, - -0.02539883774646, - -0.01763798704591, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.01649127941162, - 0.00320041899253, - 0.01542210101578, - 0.02195325245915, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.17987135979307, - 0.12671124139840, - 0.05822642474110, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.16267234588041, - 0.11887585724439, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.15045057451823, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.44376242787490, - -0.30400000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.31814452979636, - -0.25039443312215, - -0.24400000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.25072363627930, - -0.20828457765513, - -0.26200000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.16129583914648, - -0.13376488433347, - -0.22575000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.15269356649422, - -0.13248643786217, - -0.18700000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.08860908785357, - -0.01396246323450, - -0.19615593415441, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.13444214452845, - 0.00130799527933, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.08054165072235, - -0.00549324251347, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.10784075790190, - -0.06863349926037, - 0.00175321646512, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.04925419950621, - -0.00368537294864, - -0.00304961164871, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.05450628884215, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.12898459420177, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.02870304944818, - -0.02255708461617, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.00938786608492, - 0.00296399224112, - 0.01053861821037, - 0.01611389637169, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.09954248086481, - 0.05948368288525, - 0.03408461572369, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.12327157100582, - 0.08767901861183, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.14490782122377, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.44852683448077, - -0.41600000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.42643340166796, - -0.32451407135890, - -0.51400000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.28809273057140, - -0.24104282544034, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.17330631306353, - -0.14136946391296, - -0.23575000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.21415259749701, - -0.18683649533647, - -0.24920000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.23369100107545, - -0.03944889199658, - -0.09904612964760, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.12354689726628, - -0.01654379447015, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.16207728351520, - -0.03637567449858, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.07254978471493, - -0.06129403727896, - -0.04909959760867, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.11478257465306, - -0.06930621428674, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.10670361771604, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.10949270272585, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.06391398485994, - -0.05403212866141, - -0.04723899664934, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.03599066704066, - -0.02184425693268, - -0.01154511586166, - -0.00354555319366, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.01439446368141, - 0.00771600790650, - 0.00328452399254, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.09115200126999, - 0.04839001672511, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.13740767685282, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.46524059775602, - -0.49200000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.42198236936188, - -0.31698558916479, - -0.52800000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.32799808028927, - -0.27694953510110, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - -0.26244464437392, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.26085071373976, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.26202810288884, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.26374884470785, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.26324168703303, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.32663140707424, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.26331482122356, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.26487479761653, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.26506035780811, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.26976826747468, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.27102243451532, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.27136123496666, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.26138614578463, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.27421062424350, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.22133238468418, - -0.17101843992623, - -0.23575000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.11761711077043, - -0.10326813338375, - -0.21860000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.15659959028214, - -0.01918392107569, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.05095858029559, - 0.00313754874849, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.09932195882775, - 0.00647402085719, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00699842201760, - 0.01595510821781, - 0.01939110771289, - 0.02408546639218, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.00124270310976, - -0.01263986037358, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.02560952126341, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.05995573459960, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.05732791283824, - -0.05093674606521, - -0.04670775213539, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.11449566751294, - -0.08379229661595, - -0.06088554605118, - -0.04456415679904, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - -0.04276095694715, - -0.03272591986685, - -0.02554295489333, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.04479748091835, - 0.01100997834863, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.07596582020292, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, # Fr - -0.0792000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ - 0.00000000000000, # Ra - -0.2388000000000, - -0.1541000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - 0.00000000000000, - ], - [ # Ac - 0.00000000000000, - -0.11750000000000, - -0.09485000000000, - -0.07933333333333, - -0.06785000000000, - -0.05850000000000, - -0.05156666666667, - ], - [ # Th - +0.00000000000000, - -0.08840000000000, - -0.07690000000000, - -0.06826666666667, - -0.06082500000000, - +0.00000000000000, # ThH5 missing (GEOM) - +0.00000000000000, # ThH6 missing (GEOM) - ], - [ # Pa - 0.00000000000000, - -0.10670000000000, - -0.09145000000000, - -0.08223333333333, - -0.07325000000000, - -0.06584000000000, - 0.00000000000000, # PaH6 missing (GEOM) - ], - [ # U - 0.00000000000000, - -0.07960000000000, - -0.00000000000000, # UH2 missing - -0.05640000000000, - -0.05097500000000, - -0.03898000000000, - -0.04093333333333, - ], - [ # Np - 0.00000000000000, - -0.07660000000000, - -0.06660000000000, - -0.05850000000000, - -0.05467500000000, - -0.04848000000000, - -0.04443333333333, - ], - [ # Pu - 0.00000000000000, - -0.14950000000000, - -0.12395000000000, - -0.10603333333333, - -0.09447500000000, - -0.08184000000000, - -0.07273333333333, - ], - [ # Am - 0.00000000000000, - -0.15100000000000, - -0.12050000000000, - -0.10226666666667, - -0.00000000000000, # AmH4 missing - -0.07602000000000, - -0.06758333333333, - ], - [ # Cm - 0.00000000000000, - -0.07640000000000, - -0.06690000000000, - -0.05933333333333, - -0.05280000000000, - -0.04756000000000, - -0.04325000000000, - ], - [ # Bk - 0.00000000000000, - -0.02210000000000, - -0.02045000000000, - -0.01873333333333, - -0.01777500000000, - 0.00000000000000, # BkH5 missing (GEOM) - 0.00000000000000, # BkH6 missing (GEOM) - ], - [ # Cf - 0.00000000000000, - -0.15350000000000, - -0.12695000000000, - -0.11070000000000, - -0.09670000000000, - -0.00000000000000, # CfH5 missing - -0.07500000000000, - ], - [ # Es - 0.00000000000000, - -0.11350000000000, - -0.09570000000000, - -0.08500000000000, - -0.07422500000000, - -0.06536000000000, - -0.05785000000000, - ], - [ # Fm - 0.00000000000000, - -0.09860000000000, - -0.08345000000000, - -0.07433333333333, - -0.06457500000000, - -0.05692000000000, - -0.05076666666667, - ], - [ # Md - 0.00000000000000, - -0.06780000000000, - -0.05790000000000, - -0.05123333333333, - -0.04475000000000, - 0.00000000000000, # MdH5 missing (GEOM) - 0.00000000000000, # MdH6 missing (GEOM) - ], - [ # No - 0.00000000000000, - -0.04800000000000, - -0.04325000000000, - -0.03913333333333, - -0.03527500000000, - -0.03154000000000, - -0.02863333333333, - ], - [ # Lr - 0.00000000000000, - -0.05050000000000, - -0.04450000000000, - -0.03970000000000, - -0.03522500000000, - -0.03148000000000, - -0.02846666666667, - ], - ], - dtype=torch.float64, -) - refalpha = torch.tensor( [ [ # dummy diff --git a/src/tad_dftd4/typing/builtin.py b/src/tad_dftd4/typing/builtin.py index 9c6ac29..0449429 100644 --- a/src/tad_dftd4/typing/builtin.py +++ b/src/tad_dftd4/typing/builtin.py @@ -21,6 +21,13 @@ Built-in type annotations are imported from the *tad-mctc* library, which handles some version checking. """ -from tad_mctc.typing import Any, Callable, NoReturn, TypedDict +from tad_mctc.typing import ( + Any, + Callable, + Literal, + NoReturn, + TypedDict, + overload, +) -__all__ = ["Any", "Callable", "NoReturn", "TypedDict"] +__all__ = ["Any", "Callable", "Literal", "NoReturn", "TypedDict", "overload"] diff --git a/test/conftest.py b/test/conftest.py index 71e4572..a015f7c 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -89,7 +89,8 @@ def pytest_addoption(parser: pytest.Parser) -> None: default=6, type=int, help=( - "Number of digits of precision for floating point output " "(default = 4)." + "Number of digits of precision for floating point output " + "(default = 4)." ), ) @@ -169,4 +170,6 @@ def pytest_runtest_setup(item: pytest.Function) -> None: for _ in item.iter_markers(name="cuda"): if not torch.cuda.is_available(): - pytest.skip("Torch not compiled with CUDA or no CUDA device available.") + pytest.skip( + "Torch not compiled with CUDA or no CUDA device available." + ) diff --git a/test/test_disp/samples.py b/test/test_disp/samples.py index 0b60b37..3c42f4d 100644 --- a/test/test_disp/samples.py +++ b/test/test_disp/samples.py @@ -49,7 +49,8 @@ class Record(Molecule, Refs): "LiH": Refs( { "q": torch.tensor( - [3.708714958301688e-01, -3.708714958301688e-01], dtype=torch.float64 + [3.708714958301688e-01, -3.708714958301688e-01], + dtype=torch.float64, ), "disp": torch.tensor( [ diff --git a/test/test_grad/test_param.py b/test/test_grad/test_param.py index a0bdb18..b93f167 100644 --- a/test/test_grad/test_param.py +++ b/test/test_grad/test_param.py @@ -157,7 +157,9 @@ def test_gradcheck_batch(dtype: torch.dtype, name1: str, name2: str) -> None: @pytest.mark.parametrize("dtype", [torch.double]) @pytest.mark.parametrize("name1", ["LiH"]) @pytest.mark.parametrize("name2", ["LiH", "SiH4"]) -def test_gradgradcheck_batch(dtype: torch.dtype, name1: str, name2: str) -> None: +def test_gradgradcheck_batch( + dtype: torch.dtype, name1: str, name2: str +) -> None: """ Check a single analytical gradient of parameters against numerical gradient from `torch.autograd.gradgradcheck`. @@ -170,7 +172,9 @@ def test_gradgradcheck_batch(dtype: torch.dtype, name1: str, name2: str) -> None @pytest.mark.parametrize("dtype", [torch.double]) @pytest.mark.parametrize("name1", ["LiH"]) @pytest.mark.parametrize("name2", ["AmF3", "MB16_43_01"]) -def test_gradgradcheck_batch_slow(dtype: torch.dtype, name1: str, name2: str) -> None: +def test_gradgradcheck_batch_slow( + dtype: torch.dtype, name1: str, name2: str +) -> None: """ These fail with `fast_mode=True` (and sometimes randomly on GA runners). """ diff --git a/test/test_grad/test_pos.py b/test/test_grad/test_pos.py index e3bde2e..902648d 100644 --- a/test/test_grad/test_pos.py +++ b/test/test_grad/test_pos.py @@ -144,7 +144,9 @@ def test_gradcheck_batch(dtype: torch.dtype, name1: str, name2: str) -> None: @pytest.mark.parametrize("dtype", [torch.double]) @pytest.mark.parametrize("name1", ["LiH"]) @pytest.mark.parametrize("name2", sample_list) -def test_gradgradcheck_batch(dtype: torch.dtype, name1: str, name2: str) -> None: +def test_gradgradcheck_batch( + dtype: torch.dtype, name1: str, name2: str +) -> None: """ Check a single analytical gradient of parameters against numerical gradient from `torch.autograd.gradgradcheck`. diff --git a/test/test_model/test_general.py b/test/test_model/test_general.py index e3dda79..1795750 100644 --- a/test/test_model/test_general.py +++ b/test/test_model/test_general.py @@ -62,3 +62,21 @@ def test_change_device_fail() -> None: # trying to use setter with pytest.raises(AttributeError): model.device = torch.device("cpu") + + +# raise error when creating the model in `_set_refalpha_eeq` +def test_ref_charges_fail() -> None: + numbers = torch.tensor([14, 1, 1, 1, 1]) + + with pytest.raises(ValueError): + D4Model(numbers, ref_charges="wrong") # type: ignore + + +# raise error in `weight_references` when trying to change the ref_charges +def test_ref_charges_fail_2() -> None: + numbers = torch.tensor([14, 1, 1, 1, 1]) + model = D4Model(numbers, ref_charges="eeq") + + model.ref_charges = "wrong" # type: ignore + with pytest.raises(ValueError): + model.weight_references() diff --git a/test/test_model/test_model.py b/test/test_model/test_model.py index c5f53f2..175850c 100644 --- a/test/test_model/test_model.py +++ b/test/test_model/test_model.py @@ -92,3 +92,14 @@ def test_batch(name1: str, name2: str, dtype: torch.dtype) -> None: gw = d4.weight_references(cn=cn, q=q) c6 = d4.get_atomic_c6(gw) assert pytest.approx(refs.cpu(), abs=tol, rel=tol) == c6.cpu() + + +def test_ref_charges() -> None: + numbers = torch.tensor([14, 1, 1, 1, 1]) + model_eeq = D4Model(numbers, ref_charges="eeq") + model_gfn2 = D4Model(numbers, ref_charges="gfn2") + + weights_eeq = model_eeq.weight_references() + weights_gfn2 = model_gfn2.weight_references() + + assert pytest.approx(weights_eeq, abs=1e-1) == weights_gfn2 diff --git a/test/test_model/test_params.py b/test/test_model/test_params.py index 5c662ee..cfa85dd 100644 --- a/test/test_model/test_params.py +++ b/test/test_model/test_params.py @@ -22,17 +22,24 @@ import torch -from tad_dftd4 import data, params +from tad_dftd4 import data, reference +from tad_dftd4.reference import charge_eeq, charge_gfn2 def test_params_shape() -> None: maxel = 104 # 103 elements + dummy - assert params.refc.shape == torch.Size((maxel, 7)) - assert params.refascale.shape == torch.Size((maxel, 7)) - assert params.refcovcn.shape == torch.Size((maxel, 7)) - assert params.refsys.shape == torch.Size((maxel, 7)) - assert params.refq.shape == torch.Size((maxel, 7)) - assert params.refalpha.shape == torch.Size((maxel, 7, 23)) + assert reference.refc.shape == torch.Size((maxel, 7)) + assert reference.refascale.shape == torch.Size((maxel, 7)) + assert reference.refcovcn.shape == torch.Size((maxel, 7)) + assert reference.refsys.shape == torch.Size((maxel, 7)) + assert reference.refalpha.shape == torch.Size((maxel, 7, 23)) + + assert charge_eeq.clsq.shape == torch.Size((maxel, 7)) + assert charge_eeq.clsh.shape == torch.Size((maxel, 7)) + + # GFN2 charges only up to Rn + assert charge_gfn2.refq.shape == torch.Size((86, 7)) + assert charge_gfn2.refh.shape == torch.Size((86, 7)) def test_data_shape() -> None: