pyscf.sgx package#
Submodules#
pyscf.sgx.sgx module#
Pseudo-spectral methods (COSX, PS, SN-K)
- class pyscf.sgx.sgx.SGX(mol, auxbasis=None, pjs=False)[source]#
Bases:
StreamObject
- property auxbasis#
- get_jk(dm, hermi=1, vhfopt=None, with_j=True, with_k=True, direct_scf_tol=1e-13, omega=None)[source]#
- kernel(*args, **kwargs)[source]#
Kernel function is the main driver of a method. Every method should define the kernel function as the entry of the calculation. Note the return value of kernel function is not strictly defined. It can be anything related to the method (such as the energy, the wave-function, the DFT mesh grids etc.).
- to_gpu(out=None)#
Convert a method to its corresponding GPU variant, and recursively converts all attributes of a method to cupy objects or gpu4pyscf objects.
- pyscf.sgx.sgx.sgx_fit(mf, auxbasis=None, with_df=None, pjs=False)[source]#
For the given SCF object, update the J, K matrix constructor with corresponding SGX or density fitting integrals.
- Args:
mf : an SCF object
- Kwargs:
- auxbasisstr or basis dict
Same format to the input attribute mol.basis. If auxbasis is None, optimal auxiliary basis based on AO basis (if possible) or even-tempered Gaussian basis will be used.
- with_dfSGX
Existing SGX object for the system.
- pjs: bool
Whether to perform P-junction screening (screening matrix elements by the density matrix). Default False. If True, dfj is set to True automatically at the beginning of the calculation, as this screening is only for K-matrix elements.
- Returns:
An SCF object with a modified J, K matrix constructor which uses density fitting integrals to compute J and K
Examples:
>>> mol = gto.M(atom='H 0 0 0; F 0 0 1', basis='ccpvdz', verbose=0) >>> mf = sgx_fit(scf.RHF(mol)) >>> mf.scf() -100.00978770917165
>>> mol.symmetry = 1 >>> mol.build(0, 0) >>> mf = sgx_fit(scf.UHF(mol)) >>> mf.scf() -100.00978770951018
pyscf.sgx.sgx_jk module#
semi-grid Coulomb and eXchange without differential density matrix
To lower the scaling of coulomb and exchange matrix construction for large system, one coordinate is analytical and the other is grid. The traditional two electron integrals turn to analytical one electron integrals and numerical integration based on grid.(see Friesner, R. A. Chem. Phys. Lett. 1985, 116, 39)
Minimizing numerical errors using overlap fitting correction.(see Lzsak, R. et. al. J. Chem. Phys. 2011, 135, 144105) Grid screening for weighted AO value and DktXkg. Two SCF steps: coarse grid then fine grid. There are 5 parameters can be changed: # threshold for Xg and Fg screening gthrd = 1e-10 # initial and final grids level grdlvl_i = 0 grdlvl_f = 1 # norm_ddm threshold for grids change thrd_nddm = 0.03 # set block size to adapt memory sblk = 200
Set mf.direct_scf = False because no traditional 2e integrals
- pyscf.sgx.sgx_jk.get_jk(sgx, dm, hermi=1, with_j=True, with_k=True, direct_scf_tol=1e-13)#