qstack.basis_opt.opt

Basis set optimization routines and command-line interface.

qstack.basis_opt.opt.main()[source]

Run basis set optimization via command-line interface.

qstack.basis_opt.opt.optimize_basis(elements_in, basis_in, molecules_in, gtol_in=1e-07, method_in='CG', printlvl=2, check=False)[source]

Optimize a given basis set.

Parameters:
  • elements_in (str) – List of elements to optimize. If None, optimize all elements in the basis.

  • basis_in (list) – List of files paths (str) or dicts containing basis set(s).

  • molecules_in (list) – List of file paths (str) or dicts containing molecular data.

  • gtol_in (float) – Gradient norm must be less than gtol_in before successful termination (minimization).

  • method_in (str) – Type of solver. Check scipy.optimize.minimize for full documentation.

  • printlvl (int) – Level of printing during optimization (0: none, 1: final basis, 2: detailed).

  • check (bool) – If True, compute and return both analytical and numerical gradients without optimization.

Returns:

Dictionary containing the optimized basis.

Command-line use

Optimize a density fitting basis set.

usage: python3 -m qstack.basis_opt.opt [-h]
                                       [--elements ELEMENTS [ELEMENTS ...]]
                                       --basis BASIS [BASIS ...]
                                       --molecules MOLECULES [MOLECULES ...]
                                       [--gtol GTOL] [--method METHOD]
                                       [--print PRINT] [--check]

Named Arguments

--elements

elements for optimization

--basis

initial df bases

--molecules

molecules

--gtol

tolerance

Default: 1e-07

--method

minimization algoritm

Default: 'CG'

--print

printing level

Default: 2

--check

check the gradient and exit

Default: False

Note

If you built those docs yourself and the command-line section is empty, please make sure you have installed the right components of qstack.