10.16. lib — Helper functions, parameters, and C extensions

10.16.1. lib.parameters

10.16.2. lib.logger Logger object

10.16.3. numpy extensions

10.16.4. scipy extensions

10.16.5. lib.chkfile

Chkfile is a HDF5 file. Functions to access key/value in chkfile Quickly loading object from chkfile

The results of SCF and MCSCF methods are saved as a Python dictionary in the chkfile. One can fast load the results and update the SCF and MCSCF objects using the python built in methods .__dict__.update, e.g.:

from pyscf import gto, scf, mcscf, lib
mol = gto.M(atom='N 0 0 0; N 1 1 1', basis='ccpvdz')
mf = mol.apply(scf.RHF).set(chkfile='n2.chk).run()
mc = mcscf.CASSCF(mf, 6, 6).set(chkfile='n2.chk').run()

# load SCF results
mf = scf.RHF(mol)
mf.__dict__.update(lib.chkfile.load('n2.chk', 'scf'))

# load MCSCF results
mc = mcscf.CASCI(mf, 6, 6)
mc.__dict__.update(lib.chkfile.load('n2.chk', 'mcscf'))

10.16.6. lib.diis

10.16.7. Other helper functions Background mode Temporary HDF5 file OpenMP threads Capture stdout Other helper functions in lib.misc