From af88624e32f93fc46dba294a4b4284e73e5f9519 Mon Sep 17 00:00:00 2001 From: EBB2675 Date: Wed, 25 Sep 2024 14:04:34 +0200 Subject: [PATCH] add a draft for AtomCenteredFunction --- .../schema_packages/basis_set.py | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/src/nomad_simulations/schema_packages/basis_set.py b/src/nomad_simulations/schema_packages/basis_set.py index 90a97408..984326ef 100644 --- a/src/nomad_simulations/schema_packages/basis_set.py +++ b/src/nomad_simulations/schema_packages/basis_set.py @@ -190,9 +190,40 @@ class AtomCenteredFunction(ArchiveSection): Specifies a single function (term) in an atom-centered basis set. """ - pass + function_type = Quantity( + type=str, + description=""" + Type of the function (e.g. GTO for Gaussian, STO for Slater) + """, + ) + + exponents = Quantity( + type=np.float32, + shape=['*'], + description=""" + List of exponents for the basis function. + """, + ) - # TODO: design system for writing basis functions like gaussian or slater orbitals + contraction_coefficients = Quantity( + type=np.float32, + shape=['*'], + description=""" + List of contraction coefficients corresponding to the exponents. + """, + ) + + atom_state = SubSection(sub_section=AtomsState.m_def, repeats=False) + + def __init__(self, atom_state: AtomsState, function_type: str, exponents: list, contraction_coefficients: list): + self.atom_state = atom_state + self.function_type = function_type + self.exponents = exponents + self.contraction_coefficients = contraction_coefficients + + def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None: + super().normalize(archive, logger) + self.name = self.m_def.name class AtomCenteredBasisSet(BasisSetComponent):