fcdmft.rpa.mp2.mol.qsmp2 module#

Spin-restricted Quasiparticle Self-consistent MP2

class fcdmft.rpa.mp2.mol.qsmp2.QSMP2(mf, frozen=None, ncore=None, ecut=None)[source]#

Bases: MP2

Attributes:
diis_file
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()

Get boolean mask for the restricted reference orbitals.

kernel([mo_energy, mo_coeff])

Args:

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

Frozen natural orbitals

make_rdm1([t2, eris, ao_repr, with_frozen])

Spin-traced one-particle density matrix.

make_rdm2([t2, eris, ao_repr])

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()

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

get_nmo

get_nocc

init_amps

nuc_grad_method

reset

run_diis

set_frozen

ao2mo(mo_coeff=None)[source]#
diis_file = None#
diis_space = 10#
diis_start_cycle = 1#
dump_flags()[source]#
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()#
kernel(mo_energy=None, mo_coeff=None)[source]#
Args:

mo_energy : 1D array (nmo), mean-field mo energy mo_coeff : 2D array (nmo, nmo), mean-field mo coefficient

Returns:

self.mo_energy : QSMP2 quasiparticle energy self.mo_coeff : QSMP2 MO coefficients (new orbitals)

property nmo#
property nocc#
run_diis(ham, istep, adiis)[source]#
fcdmft.rpa.mp2.mol.qsmp2.get_sigma_mp2(mp2, eris, p, q, freq, eia)[source]#

Compute MP2 self-energy in MO basis on real axis

Parameters:
mp2QSMP2 object
erisdouble ndarray

ERI in MO basis, nmo**4

pint

row index of the self-energy matrix

qint

column index of the self-energy matrix

freqcomplex

frequency point

eiadouble ndarray

occupied and virtual orbital energy difference

Returns:
sigmadouble

self-energy matrix element

fcdmft.rpa.mp2.mol.qsmp2.kernel(mp2, mo_energy, mo_coeff)[source]#

QSMP2-corrected quasiparticle orbital energies

Parameters:
mp2MP2 object
mo_energydouble array

molecular orbital energies

mo_coeffdouble ndarray

molecular orbital coefficients

Returns:
convbool

whether the quasiparticle equation is converged

mo_energydouble array

MP2-corrected quasiparticle orbital energies

mo_coeffdouble ndarray

MP2-corrected quasiparticle orbital coefficients