From 3f6278aef1eb28b56187abdfb845447272df235c Mon Sep 17 00:00:00 2001 From: ndaelman Date: Wed, 17 Jul 2024 19:16:15 +0200 Subject: [PATCH] Add atom-centered basis --- .../schema_packages/numerical_settings.py | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/nomad_simulations/schema_packages/numerical_settings.py b/src/nomad_simulations/schema_packages/numerical_settings.py index abd14fb0..0170f604 100644 --- a/src/nomad_simulations/schema_packages/numerical_settings.py +++ b/src/nomad_simulations/schema_packages/numerical_settings.py @@ -19,6 +19,7 @@ from itertools import accumulate, chain, tee from typing import TYPE_CHECKING, Optional, Union +from nomad_simulations.schema_packages.atoms_state import AtomsState import numpy as np import pint from ase.dft.kpoints import get_monkhorst_pack_size_and_offset, monkhorst_pack @@ -928,6 +929,31 @@ def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None: super().normalize(archive, logger) +class AtomCenteredFunction(ArchiveSection): + """ + Specifies a single function in an atom-centered basis set. + """ + + +class AtomCenteredBasisSet(BasisSet): + """ + Defines an atom-centered basis set. + """ + + atoms = SubSection(sub_section=AtomsState.m_def, repeats=True) + # ? @JosePizarro3: are we ensure that the atoms_state is always set? can you point me to any normalizer? + + functional_composition = SubSection( + sub_section=AtomCenteredFunction.m_def, repeats=True + ) + + def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None: + super().normalize(archive, logger) + # self.name = self.m_def.name + # TODO: set name based on basis functions + # ? use naming BSE + + class BasisSetContainer(NumericalSettings): """Section providing an overview of the full basis set. The basis set may contain multiple basis sets specifications `BasisSet`,