vibeqc.basis_crystal

CRYSTAL-format basis-set parser and NWChem/.g94 emitter.

Targets the per-element CRYSTAL basis-set files distributed by the Bredow group (Peintinger–Vilela Oliveira–Bredow, pob-*): one file per element, named ZZ_Sym (e.g. 06_C), plain-text CRYSTAL input.

Supported today

All-electron shells (S, SP, P, D, F, G). These cover the light-element Bredow sets (pob-TZVP and pob-DZVP-rev2 for H–Br). The emitter produces NWChem/.g94 files that libint loads without modification.

Not yet supported

ECP blocks (INPUT header on Rb–I and Cs–Po pob-* archives). Parsing them is trivial; applying them in vibe-qc needs libecpint integration, which is a separate follow-on. Such files raise NotImplementedError for now.

CRYSTAL per-element format summary

Line 1::

Z NSHELL

or for ECP-using atoms::

(200 + Z) NSHELL

Each shell starts with::

ITYPE LAT NG CHE SCAL

where

  • ITYPE — 0 = user-defined (the only case the Bredow files use).

  • LAT — shell angular-momentum code:

    0=S, 1=SP, 2=P, 3=D, 4=F, 5=G.

  • NG — number of primitive Gaussians.

  • CHE — formal occupancy (electrons) assigned to this shell.

  • SCAL — scale factor applied to the exponents (1.0 = as-written).

Followed by NG lines of exponent coefficient (or exponent s_coef p_coef for SP shells).

Functions

emit_g94(atoms[, header_comment])

Convert a list of per-element basis specs into a single .g94 (Gaussian / NWChem format) string that libint can load.

fetch_bredow_basis_sets([dest_dir, names, ...])

Download the Bredow group all-electron basis sets and convert them to .g94 files loadable by libint.

parse_crystal_atom_basis(text[, source])

Parse a single CRYSTAL per-element basis file.

parse_crystal_atom_basis_file(path)

Convenience wrapper: parse a CRYSTAL per-element file from disk.

Classes

CrystalAtomBasis(Z, has_ecp[, shells])

Parsed per-atom basis set (one Bredow file).

CrystalShell(shell_type, occupancy, scale_factor)

One contracted Gaussian shell in CRYSTAL format.

class vibeqc.basis_crystal.CrystalShell(shell_type, occupancy, scale_factor, exponents=<factory>, coefficients=<factory>, coefficients_p=<factory>)[source]

Bases: object

One contracted Gaussian shell in CRYSTAL format.

Parameters:
shell_type: str
occupancy: float
scale_factor: float
exponents: list[float]
coefficients: list[float]
coefficients_p: list[float]
property n_primitives: int
class vibeqc.basis_crystal.CrystalAtomBasis(Z, has_ecp, shells=<factory>)[source]

Bases: object

Parsed per-atom basis set (one Bredow file).

Parameters:
Z: int
has_ecp: bool
shells: list[CrystalShell]
property element_symbol: str
vibeqc.basis_crystal.parse_crystal_atom_basis(text, source='<string>')[source]

Parse a single CRYSTAL per-element basis file.

source is used only in error messages.

Parameters:
Return type:

CrystalAtomBasis

vibeqc.basis_crystal.parse_crystal_atom_basis_file(path)[source]

Convenience wrapper: parse a CRYSTAL per-element file from disk.

Parameters:

path (str | Path)

Return type:

CrystalAtomBasis

vibeqc.basis_crystal.emit_g94(atoms, header_comment='')[source]

Convert a list of per-element basis specs into a single .g94 (Gaussian / NWChem format) string that libint can load.

Parameters:
Return type:

str

vibeqc.basis_crystal.fetch_bredow_basis_sets(dest_dir=None, names=None, *, verbose=True)[source]

Download the Bredow group all-electron basis sets and convert them to .g94 files loadable by libint.

Parameters:
  • dest_dir (str | Path | None) – Target directory for the .g94 output files. Defaults to basis_library/basis/ inside the vibe-qc source tree (the path already on LIBINT_DATA_PATH in editable installs).

  • names (Iterable[str] | None) – Subset of basis-set keys to fetch (from _BREDOW_ARCHIVES). None fetches all supported light-element archives.

  • verbose (bool) – Print progress + citation info.

Return type:

dict mapping basis name → path of the generated .g94 file.