pyscfad.scf.hf.SCF.get_jk#
- SCF.get_jk(mol=None, dm=None, hermi=1, with_j=True, with_k=True, omega=None)[source]#
Compute J, K matrices for all input density matrices
- Args:
mol : an instance of
Mole
- dmndarray or list of ndarrays
A density matrix or a list of density matrices
- Kwargs:
- hermiint
Whether J, K matrix is hermitian
0 : not hermitian and not symmetric1 : hermitian or symmetric2 : anti-hermitian- vhfopt :
A class which holds precomputed quantities to optimize the computation of J, K matrices
- with_jboolean
Whether to compute J matrices
- with_kboolean
Whether to compute K matrices
- omegafloat
Parameter of range-separated Coulomb operator. When omega is 0 (or None), integrals are computed with the full-range Coulomb potential. When it is larger than zero, integrals are evaluated with the long-range Coulomb potential erf( omega * r12 ) / r12. When omega is smaller than 0, short-range Coulomb potential erfc( omega * r12 ) / r12 is applied.
- Returns:
Depending on the given dm, the function returns one J and one K matrix, or a list of J matrices and a list of K matrices, corresponding to the input density matrices.
Examples:
>>> from pyscf import gto, scf >>> from pyscf.scf import _vhf >>> mol = gto.M(atom='H 0 0 0; H 0 0 1.1') >>> dms = numpy.random.random((3,mol.nao_nr(),mol.nao_nr())) >>> j, k = scf.hf.get_jk(mol, dms, hermi=0) >>> print(j.shape) (3, 2, 2)