Source code for tad_libcint.basis.datastructures
# This file is part of tad-libcint, modified from diffqc/dqc.
#
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2024 Grimme Group
#
# Original file licensed under the Apache License, Version 2.0 by diffqc/dqc.
# Modifications made by 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.
"""
Basis: Datastructures
=====================
Data classes for basis construction.
"""
from __future__ import annotations
from dataclasses import dataclass
from tad_libcint.typing import Tensor
__all__ = ["AtomCGTOBasis", "CGTOBasis"]
[docs]
@dataclass
class CGTOBasis:
angmom: int
alphas: Tensor # (nbasis,)
coeffs: Tensor # (nbasis,)
normalized: bool = True
[docs]
def wfnormalize_(self) -> CGTOBasis:
# will always be normalized already in dxtb because we have to also
# include the orthonormalization of the H2s against the H1s
return self
[docs]
@dataclass
class AtomCGTOBasis:
atomz: int | float | Tensor
bases: list[CGTOBasis]
pos: Tensor # (ndim,)