This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Notebooks · lib/basis/named

A basis set by its name, as PySCF spells it

basis_named(name) gives the Basis record (lib/basis/basis) of the basis set PySCF would load for name. The name is read by PySCF's rule (pyscf.gto.basis._format_basis_name): lower case, with -, _ and spaces taken out, so "6-31G", "6-31g", "631g*" and "6-31Gs" are one set. Then the key is looked up in the aliases PySCF 2.5.0 has for the eight sets here:

sto3g                STO-3G      lib/basis/sto3g
631g                 6-31G       lib/basis/pople631g
631g*, 631gs         6-31G*      lib/basis/pople631gs
631g**, 631gss       6-31G**     lib/basis/pople631gss
ccpvdz               cc-pVDZ     lib/basis/ccpvdz
ccpvtz               cc-pVTZ     lib/basis/ccpvtz
def2svp              def2-SVP    lib/basis/def2svp
def2tzvp             def2-TZVP   lib/basis/def2tzvp

Any other name stops the run and lists the eight. PySCF knows many more sets; these are the ones lib/basis has tables for (H through Ar).

A program that imports none of the tables gets all eight, so any of the names works. A program that imports one or more of them (import basis.pople631g) links those alone, and a name whose table it does not import stops the run and says which import line to add; the water story links one table this way. (The eight imports are an #! if-none-used block, kept only when the program's other imports reach none of the tables, and each branch of the lookup is an #! if-used block, kept only when the program imports that table: lang/viv/src/lib.rs, expand_uses.) basis.all imports all eight on purpose.

Used with from basis.named import basis_named.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 37–147