fcdmft.rpa.mp2.pbc.kmp2qp module#

k-point spin-restricted MP2 quasiparticle energies

class fcdmft.rpa.mp2.pbc.kmp2qp.KMP2QP(mf, frozen=None, mo_coeff=None, mo_occ=None)[source]#

Bases: KMP2

Attributes:
e_tot
e_tot_scs
emp2
emp2_scs
nmo
nocc

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.

as_scanner()

Generating a scanner/solver for MP2 PES.

check_sanity()

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

copy()

Returns a shallow copy

energy(t2, eris)

MP2 energy

get_frozen_mask()

Boolean mask for orbitals in k-point post-HF method.

get_nmo([per_kpoint])

Number of orbitals for k-point calculations.

get_nocc([per_kpoint])

Number of occupied orbitals for k-point calculations.

kernel([mo_energy, mo_coeff, orbs, kptlist])

Args:

make_fno([thresh, pct_occ, nvir_act, t2])

Frozen natural orbitals

make_rdm1([t2, kind])

Spin-traced one-particle density matrix in the MO basis representation.

make_rdm2([t2, kind])

Spin-traced two-particle density matrix in MO basis

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.

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.

update_amps(t2, eris)

Update non-canonical MP2 amplitudes

view(cls)

New view of object with the same attributes.

ao2mo

density_fit

dump_flags

get_e_hf

init_amps

nuc_grad_method

reset

set_frozen

dump_flags()[source]#
get_frozen_mask()#

Boolean mask for orbitals in k-point post-HF method.

Creates a boolean mask to remove frozen orbitals and keep other orbitals for post-HF calculations.

Args:

mp (MP2): An instantiation of an SCF or post-Hartree-Fock object.

Returns:

moidx (list of ndarray of bool): Boolean mask of orbitals to include.

get_nmo(per_kpoint=False)#

Number of orbitals for k-point calculations.

Number of orbitals for use in a calculation with k-points, taking into account frozen orbitals.

Note:

If per_kpoint is False, then the number of orbitals here is equal to max(nocc) + max(nvir), where each max is done over all k-points. Otherwise the number of orbitals is returned as a list of number of orbitals at each k-point.

Args:

mp (MP2): An instantiation of an SCF or post-Hartree-Fock object. per_kpoint (bool, optional): True returns the number of orbitals at each k-point.

For a description of False, see Note.

Returns:
nmo (int, list of int): Number of orbitals. For return type, see description of arg

per_kpoint.

get_nocc(per_kpoint=False)#

Number of occupied orbitals for k-point calculations.

Number of occupied orbitals for use in a calculation with k-points, taking into account frozen orbitals.

Args:

mp (MP2): An instantiation of an SCF or post-Hartree-Fock object. per_kpoint (bool, optional): True returns the number of occupied

orbitals at each k-point. False gives the max of this list.

Returns:
nocc (int, list of int): Number of occupied orbitals. For return type, see description of arg

per_kpoint.

kernel(mo_energy=None, mo_coeff=None, orbs=None, kptlist=None)[source]#
Args:

mo_energy : 2D array (nkpts, nmo), mean-field mo energy mo_coeff : 3D array (nkpts, nmo, nmo), mean-field mo coefficient orbs: list, orbital indices kptlist: list, k-point indices

Returns:

self.mo_energy : MP2 quasiparticle energy

property nmo#
property nocc#
fcdmft.rpa.mp2.pbc.kmp2qp.get_sigma_mp2(mp2, kp, p, ep)[source]#

Compute KMP2 self-energy in MO basis on real axis

fcdmft.rpa.mp2.pbc.kmp2qp.get_sigma_mp2_metal(mp2, kp, p, ep, delta=1e-06)[source]#

Compute KMP2 self-energy in MO basis on real axis

fcdmft.rpa.mp2.pbc.kmp2qp.kernel(mp2, mo_energy, mo_coeff, orbs=None, kptlist=None, verbose=3)[source]#

MP2-corrected quasiparticle orbital energies

Parameters:
mp2KMP2QP object
mo_energydouble array

molecular orbital energies

mo_coeffdouble ndarray

molecular orbital coefficients

orbslist, optional

a list of orbital indices, by default range(nmo)

kptlistlist, optional

a list of k-point indices, by default range(nkpts)

Returns:
convbool

whether the quasiparticle equation is converged

mo_energydouble array

MP2-corrected quasiparticle orbital energies