pyextal.jaxMultipole.bank ========================= .. py:module:: pyextal.jaxMultipole.bank .. autoapi-nested-parse:: XD data banks of Slater-type atomic wavefunctions. Two banks ship with the package, both in the format of the XD charge-density program: ``RDF_SCM`` Dirac-Fock wavefunctions, He..Kr from Su & Coppens (1998) Acta Cryst. A54, 646, and Rb..Xe plus common ions from Macchi & Coppens (2001) Acta Cryst. A57, 656. 116 entries, ions included, no lanthanides. ``PBE-QZ4P-ZORA`` Scalar-relativistic PBE/QZ4P wavefunctions (Volkov & Macchi, unpublished) for neutral ground-state atoms H..Cf, 99 entries. An entry is:: :ELEM Z W df'Mo df''Mo df'Cu df''Cu b_n r_atomic r_cov r_vdW SPH a1 b1 ... a6 b6 c analytical f_x(s) = sum a exp(-b s^2) + c SZ zeta_1 ... zeta_12|18 single-zeta exponents, fixed orbital order STO orb occ nbf orb occ nbf ... (occ < 0 marks valence) C zeta n C zeta n ... nbf triples per occupied orbital, in the order of the STO header with basis functions ``N r^(n-1) exp(-zeta r)``, ``N = (2 zeta)^(n+1/2) / sqrt((2n)!)``, exponents in bohr^-1. A line ending in ``=`` continues on the next one (the PBE bank's 18-slot ``SZ`` and long ``STO`` headers). The order of the 12 ``SZ`` slots is documented in the RDF bank header. The PBE bank adds six more without saying which; checking every one of its 99 entries against the occupied orbitals pins them to ``6s 6p 5d 7s 6d 5f`` -- each slot is non-zero only in atoms that occupy that orbital -- and :func:`load_bank` re-asserts it on every load. Core and valence ---------------- A bank's occupation signs are XD's default partition, and they are not always the one a model wants: Ti is stored ``4s 2`` (core) ``3d -2`` (valence), while Friis et al. (2004) refine Ti with 3d^2 4s^2 as valence; La in the PBE bank is ``6s 2 5d -1``. :func:`configure` takes the partition and the occupations explicitly, and can take the core from one entry and the valence from another. Attributes ---------- .. autoapisummary:: pyextal.jaxMultipole.bank.SZ_ORDER Classes ------- .. autoapisummary:: pyextal.jaxMultipole.bank.Orbital pyextal.jaxMultipole.bank.BankEntry pyextal.jaxMultipole.bank.Shell pyextal.jaxMultipole.bank.AtomConfig Functions --------- .. autoapisummary:: pyextal.jaxMultipole.bank.bank_path pyextal.jaxMultipole.bank.load_bank pyextal.jaxMultipole.bank.entry pyextal.jaxMultipole.bank.radial_density pyextal.jaxMultipole.bank.configure pyextal.jaxMultipole.bank.pair_table pyextal.jaxMultipole.bank.sph_fx Module Contents --------------- .. py:data:: SZ_ORDER :value: ('1s', '2s', '3s', '4s', '2p', '3p', '4p', '3d', '4d', '4f', '5s', '5p', '6s', '6p', '5d', '7s',... .. py:class:: Orbital One occupied orbital of a bank entry. :ivar name: ``'3d'``, ``'4s'``, ... :vartype name: str :ivar l: Angular momentum. :vartype l: int :ivar occ: Occupation as stored, sign removed. :vartype occ: float :ivar valence: The bank marked it valence (negative occupation). :vartype valence: bool :ivar coef: Expansion coefficients C_k. :vartype coef: np.ndarray :ivar zeta: Exponents, bohr^-1. :vartype zeta: np.ndarray :ivar n: Principal quantum numbers of the basis functions. :vartype n: np.ndarray .. py:attribute:: name :type: str .. py:attribute:: l :type: int .. py:attribute:: occ :type: float .. py:attribute:: valence :type: bool .. py:attribute:: coef :type: numpy.ndarray .. py:attribute:: zeta :type: numpy.ndarray .. py:attribute:: n :type: numpy.ndarray .. py:method:: norm() ``int R(r)^2 r^2 dr``, which should be 1 up to the bank's rounding. .. py:class:: BankEntry One ``:ELEM`` segment. :ivar key: Segment label as written, e.g. ``'Ti'``, ``'Ti4+'``, ``'O-'``. :vartype key: str :ivar Z: Atomic number. :vartype Z: int :ivar mass: Atomic mass. :vartype mass: float :ivar sph: ``(a, b, c)`` of the analytical spherical form factor. :vartype sph: tuple :ivar sz: Orbital name -> single-zeta exponent (bohr^-1), non-zero only. :vartype sz: dict :ivar orbitals: Occupied orbitals, in the STO header order. :vartype orbitals: tuple[Orbital] :ivar bank: Which bank it came from. :vartype bank: str .. py:attribute:: key :type: str .. py:attribute:: Z :type: int .. py:attribute:: mass :type: float .. py:attribute:: sph :type: tuple .. py:attribute:: sz :type: dict .. py:attribute:: orbitals :type: tuple .. py:attribute:: bank :type: str :value: '' .. py:property:: element .. py:property:: electrons .. py:method:: orbital(name) .. py:function:: bank_path(name) File of a bundled bank, or ``name`` itself when it is a path. .. py:function:: load_bank(name='RDF_SCM') Parses a bank. :param name: ``'RDF_SCM'``, ``'PBE-QZ4P-ZORA'`` or a path to an XD bank. :type name: str :returns: Keyed by segment label exactly as written (``'Ti'``, ``'Ti4+'``); look-ups through :func:`entry` tolerate case. :rtype: dict[str, BankEntry] .. py:function:: entry(key, bank='RDF_SCM') One bank entry, by label, ignoring case (``'TI'`` finds ``'Ti'``). .. py:function:: radial_density(orbitals, r_bohr, occupations=None, renormalize=True) Spherical density ``4 pi r^2 rho(r)`` (electrons per bohr) of a set of orbitals. Used for tests and maps; the scattering factors never need it. .. py:class:: Shell A group of orbitals that share one scattering function. :ivar name: e.g. ``'core'``, ``'3d'``, ``'4s'``, or ``'3d+4s'``. :vartype name: str :ivar orbitals: Members. :vartype orbitals: tuple[Orbital] :ivar occupations: Electrons in each member. :vartype occupations: tuple[float] :ivar source: Bank key the orbitals came from. :vartype source: str .. py:attribute:: name :type: str .. py:attribute:: orbitals :type: tuple .. py:attribute:: occupations :type: tuple .. py:attribute:: source :type: str .. py:property:: electrons .. py:class:: AtomConfig A core/valence partition of one atom. :ivar key: Bank key of the valence entry. :vartype key: str :ivar element: Element symbol. :vartype element: str :ivar Z: Nuclear charge. :vartype Z: int :ivar core: The frozen core, scattered with ``kappa = 1``. :vartype core: Shell :ivar valence: Valence shells. Each gets a population; they share or not a kappa according to the model specification. :vartype valence: tuple[Shell] :ivar bank: Bank name. :vartype bank: str .. py:attribute:: key :type: str .. py:attribute:: element :type: str .. py:attribute:: Z :type: int .. py:attribute:: core :type: Shell .. py:attribute:: valence :type: tuple .. py:attribute:: bank :type: str .. py:property:: Pc .. py:property:: Pv .. py:property:: neutral_valence Valence electrons the neutral atom would have, ``Z - Pc``. .. py:function:: configure(entry_or_key, valence=None, occupations=None, core_from=None, shells='joined', bank='RDF_SCM') Chooses the core/valence partition and the occupations of one atom. :param entry_or_key: The atom, e.g. ``'Ti'`` or an entry. :type entry_or_key: BankEntry | str :param valence: Orbitals to treat as valence. Defaults to those the bank marks valence. ``[]`` makes the atom all core. :type valence: list[str], optional :param occupations: Orbital -> electrons, overriding the stored values (both core and valence orbitals may be listed). :type occupations: dict, optional :param core_from: Take the core orbitals from this entry instead -- e.g. an ion's contracted core under a neutral atom's valence. :type core_from: BankEntry | str, optional :param shells: ``'joined'`` puts all valence orbitals into one shell with one population (Friis-style 3d^2 4s^2 with a single Pv); ``'separate'`` gives each orbital its own shell. :type shells: str :param bank: Bank to resolve string keys in. :type bank: str :returns: AtomConfig .. py:function:: pair_table(shell, renormalize=True) Fourier-Bessel weights of a shell's spherical density. The shell's density, normalised to one electron when every orbital is, is ``sum_orb (occ/Pshell) R_orb^2`` -- so its scattering factor at ``kappa`` is ``sum w _N(k; kappa alpha)`` with ``sum w = 1``. :param shell: The shell. :type shell: Shell :param renormalize: Rescale each orbital to unit norm first; the stored coefficients are rounded and miss by up to ~2e-5. :type renormalize: bool :returns: ``N -> (w, alpha)``, alpha in bohr^-1, grouped by power so each group is one vectorised evaluation. Empty for an empty shell. :rtype: dict[int, tuple[np.ndarray, np.ndarray]] .. py:function:: sph_fx(e, s) The bank's analytical spherical form factor ``sum a exp(-b s^2) + c``. :param e: Entry. :type e: BankEntry :param s: sin(theta)/lambda, Angstrom^-1. :type s: array-like