fcdmft.rpa.mol.rpa module#
Spin-restricted random phase approximation (direct RPA/dRPA in chemistry) with N^4 scaling
- Method:
Main routines are based on GW-AC method described in: T. Zhu and G.K.-L. Chan, J. Chem. Theory. Comput. 17, 727-741 (2021) X. Ren et al., New J. Phys. 14, 053020 (2012)
- class fcdmft.rpa.mol.rpa.RPA(mf, frozen=None, auxbasis=None)[source]#
Bases:
StreamObject- Attributes:
- nmo
- nocc
Methods
__call__(*args, **kwargs)Update the attributes of the current object.
ao2mo([mo_coeff])Transform density-fitting integral from AO to MO.
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.
Generating a scanner/solver for RPA PES.
check_sanity()Check input of class/object attributes, check whether a class method is overwritten.
copy()Returns a shallow copy
get_ehf()Get Hartree-Fock energy.
Get boolean mask for the restricted reference orbitals.
get_grids([alg, nw, mo_energy])Generate grids for integration.
initialize_df([auxbasis])Initialize density fitting.
kernel([mo_energy, mo_coeff, Lpq, nw])RPA correlation and total energy
loop_ao2mo([mo_coeff, ijslice])Transform density-fitting integral from AO to MO by block.
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.
run(*args, **kwargs)Call the kernel function of current object.
set(*args, **kwargs)Update the attributes of the current object.
view(cls)New view of object with the same attributes.
dump_flags
get_nmo
get_nocc
- as_scanner()#
Generating a scanner/solver for RPA PES.
- get_frozen_mask()#
Get boolean mask for the restricted reference orbitals.
In the returned boolean (mask) array of frozen orbital indices, the element is False if it corresponds to the frozen orbital.
- get_nmo()#
- get_nocc()#
- initialize_df(auxbasis=None)[source]#
Initialize density fitting.
- Parameters:
- auxbasis
str, optional name of auxiliary basis set, by default None
- auxbasis
- kernel(mo_energy=None, mo_coeff=None, Lpq=None, nw=None)[source]#
RPA correlation and total energy
Calculated total energy, HF energy and RPA correlation energy are stored in self.e_tot, self.e_hf, self.e_corr
- Parameters:
- Returns:
- self.e_corr
float RPA correlation energy
- self.e_corr
- loop_ao2mo(mo_coeff=None, ijslice=None)[source]#
Transform density-fitting integral from AO to MO by block.
- property nmo#
- property nocc#
- fcdmft.rpa.mol.rpa.get_idx_metal(mo_occ, threshold=1e-06)[source]#
Get index of occupied/virtual/fractional orbitals of metals.
- Parameters:
- mo_occdouble 1d
array occupation number
- thresholddouble, optional
threshold to determine fractionally occupied orbitals, by default 1.0e-6
- mo_occdouble 1d
- Returns:
- fcdmft.rpa.mol.rpa.get_rho_response_metal(omega, mo_energy, Lpq, mo_occ, out=None)[source]#
Compute density response function in auxiliary basis at freq iw.
- Parameters:
- Returns:
- Pidouble 2d
array density-density response function in auxiliary basis at freq iw
- Pidouble 2d
- fcdmft.rpa.mol.rpa.get_rpa_ecorr_outcore(rpa, mo_coeff, freqs, wts)[source]#
Low-memory routine to compute RPA correlation energy.