fcdmft.df.df module#

J-metric density fitting

class fcdmft.df.df.DF(mol, auxbasis=None)[source]#

Bases: StreamObject

Object to hold 3-index tensor

Attributes:
auxbasisstr or dict

Same input format as Mole.basis

auxmolMole object

Read only Mole object to hold the auxiliary basis. auxmol is generated automatically in the initialization step based on the given auxbasis. It is used in the rest part of the code to determine the problem size, the integral batches etc. This object should NOT be modified.

_cderi_typestr

Can be ‘incore’, ‘outcore’, or ‘direct’. By default, ‘outcore’ is chosen if _cderi_to_save is passed in or if the DF integrals are too large to fit in memory. Otherwise, the default is ‘incore’.

_cderi_to_savestr

If _cderi_to_save is specified, the DF integral tensor will be saved in this file.

_cderistr or numpy array

If _cderi is specified, the DF integral tensor will be read from this HDF5 file (or numpy array). When the DF integral tensor is provided from the HDF5 file, its dataset name should be consistent with DF._dataname, which is ‘j3c’ by default. The DF integral tensor \(V_{x,ij}\) should be a 2D array in C (row-major) convention, where x corresponds to index of auxiliary basis, and the composite index ij is the orbital pair index. The hermitian symmetry is assumed for the composite ij index, ie the elements of \(V_{x,i,j}\) with \(i\geq j\) are existed in the DF integral tensor. Thus the shape of DF integral tensor is (M,N*(N+1)/2), where M is the number of auxbasis functions and N is the number of basis functions of the orbital basis.

blockdimint

When reading DF integrals from disk the chunk size to load. It is used to improve IO performance.

Attributes:
auxbasis

Methods

__call__(*args, **kwargs)

Update the attributes of the current object.

apply(fn, *args, **kwargs)

Apply the fn to rest arguments: return fn(*args, **kwargs). The return value of method set is the object itself. This allows a series of functions/methods to be executed in pipe.

check_sanity()

Check input of class/object attributes, check whether a class method is overwritten.

copy()

Returns a shallow copy

kernel(*args, **kwargs)

Kernel function is the main driver of a method.

post_kernel(envs)

A hook to be run after the main body of the kernel function.

pre_kernel(envs)

A hook to be run before the main body of kernel function is executed.

range_coulomb(omega)

Creates a temporary density fitting object for RSH-DF integrals.

reset([mol])

Reset mol and clean up relevant attributes for scanner mode

run(*args, **kwargs)

Call the kernel function of current object.

set(*args, **kwargs)

Update the attributes of the current object.

to_gpu([out])

Convert a method to its corresponding GPU variant, and recursively converts all attributes of a method to cupy objects or gpu4pyscf objects.

view(cls)

New view of object with the same attributes.

ao2mo

build

dump_flags

get_ao_eri

get_eri

get_jk

get_mo_eri

get_naoaux

loop

prange

ao2mo(mo_coeffs, compact=True)[source]#
property auxbasis#
blockdim = 240#
build()[source]#
dump_flags(verbose=None)[source]#
get_ao_eri()#
get_eri()[source]#
get_jk(dm, hermi=1, with_j=True, with_k=True, direct_scf_tol=1e-13, omega=None)[source]#
get_mo_eri(mo_coeffs, compact=True)#
get_naoaux()[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.).

loop(blksize=None)[source]#
prange(start, end, step)[source]#
range_coulomb(omega)[source]#

Creates a temporary density fitting object for RSH-DF integrals. In this context, only LR or SR integrals for mol and auxmol are computed.

reset(mol=None)[source]#

Reset mol and clean up relevant attributes for scanner mode

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.

class fcdmft.df.df.DF4C(mol, auxbasis=None)[source]#

Bases: DF

Relativistic 4-component

Attributes:
auxbasis

Methods

__call__(*args, **kwargs)

Update the attributes of the current object.

apply(fn, *args, **kwargs)

Apply the fn to rest arguments: return fn(*args, **kwargs). The return value of method set is the object itself. This allows a series of functions/methods to be executed in pipe.

check_sanity()

Check input of class/object attributes, check whether a class method is overwritten.

copy()

Returns a shallow copy

kernel(*args, **kwargs)

Kernel function is the main driver of a method.

post_kernel(envs)

A hook to be run after the main body of the kernel function.

pre_kernel(envs)

A hook to be run before the main body of kernel function is executed.

range_coulomb(omega)

Creates a temporary density fitting object for RSH-DF integrals.

reset([mol])

Reset mol and clean up relevant attributes for scanner mode

run(*args, **kwargs)

Call the kernel function of current object.

set(*args, **kwargs)

Update the attributes of the current object.

to_gpu([out])

Convert a method to its corresponding GPU variant, and recursively converts all attributes of a method to cupy objects or gpu4pyscf objects.

view(cls)

New view of object with the same attributes.

ao2mo

build

dump_flags

get_ao_eri

get_eri

get_jk

get_mo_eri

get_naoaux

loop

prange

ao2mo(mo_coeffs)[source]#
build()[source]#
get_ao_eri()#
get_eri()[source]#
get_jk(dm, hermi=1, with_j=True, with_k=True, direct_scf_tol=1e-13, omega=None)[source]#
get_mo_eri(mo_coeffs)#
loop(blksize=None)[source]#
fcdmft.df.df.GDF#

alias of DF

fcdmft.df.df.GDF4C#

alias of DF4C