pyscf.gw package

Submodules

pyscf.gw.gw module

G0W0 approximation

class pyscf.gw.gw.GW(mf, tdmf, frozen=None)

Bases: pyscf.lib.misc.StreamObject

non-relativistic restricted GW

Saved results

mo_energy :

Orbital energies

mo_coeff

Orbital coefficients

ao2mo(mo_coeff=None)
dump_flags(verbose=None)
eta = 0.001
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 corresonds to the frozen orbital.

get_g(omega, eta=None)
get_g0(omega, eta=None)
get_nmo()
get_nocc()
kernel(mo_energy=None, mo_coeff=None, td_e=None, td_xy=None, eris=None, orbs=None)

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

linearized = False
property nmo
property nocc
reset(mol=None)
pyscf.gw.gw.get_g(omega, mo_energy, mo_occ, eta)
pyscf.gw.gw.get_sigma_element(gw, omega, tdm_p, tdm_q, td_e, eta=None, vir_sgn=1)
pyscf.gw.gw.kernel(gw, mo_energy, mo_coeff, td_e, td_xy, eris=None, orbs=None, verbose=3)

GW-corrected quasiparticle orbital energies

Returns:

A list : converged, mo_energy, mo_coeff

pyscf.gw.gw_slow module

This module implements the G0W0 approximation on top of pyscf.tdscf.rhf_slow and pyscf.tdscf.proxy TD implementations. Unlike gw.py, all integrals are stored in memory. Several variants of GW are available:

  • (this module) pyscf.gw_slow: the molecular implementation;

  • pyscf.pbc.gw.gw_slow: single-kpoint PBC (periodic boundary condition) implementation;

  • pyscf.pbc.gw.kgw_slow_supercell: a supercell approach to PBC implementation with multiple k-points. Runs the molecular code for a model with several k-points for the cost of discarding momentum conservation and using dense instead of sparse matrixes;

  • pyscf.pbc.gw.kgw_slow: a PBC implementation with multiple k-points;

class pyscf.gw.gw_slow.AbstractIMDS(td, eri=None)

Bases: object

entire_space()

The entire orbital space. Returns:

An iterable of the entire orbital space.

get_rhs(p)

The right-hand side of the quasiparticle equation. Args:

p (int, tuple): the orbital;

Returns:

Right-hand sides of the quasiparticle equation

get_sigma_element(omega, p, **kwargs)

The diagonal matrix element of the self-energy matrix. Args:

omega (float): the energy value; p (int, tuple): the orbital;

Returns:

The diagonal matrix element.

initial_guess(p)

Retrieves the initial guess for the quasiparticle energy for orbital p. Args:

p (int, tuple): the orbital;

Returns:

The value of initial guess (float).

orb_dims = 1
quasiparticle_eq(p, **kwargs)

The quasiparticle equation f(omega) = 0. Args:

p (int, tuple): the orbital; **kwargs: keyword arguments to get_sigma_element;

Returns:

A callable function of one parameter.

class pyscf.gw.gw_slow.GW(td, eri=None)

Bases: object

base_imds

alias of pyscf.gw.gw_slow.IMDS

kernel()

Calculates GW roots.

Returns:

GW roots.

class pyscf.gw.gw_slow.IMDS(td, eri=None)

Bases: pyscf.gw.gw_slow.AbstractIMDS

construct_tdm()
property entire_space

The entire orbital space. Returns:

An iterable of the entire orbital space.

get_rhs(p)

The right-hand side of the quasiparticle equation. Args:

p (int, tuple): the orbital;

Returns:

Right-hand sides of the quasiparticle equation

get_sigma_element(omega, p, eta, vir_sgn=1)

The diagonal matrix element of the self-energy matrix. Args:

omega (float): the energy value; p (int, tuple): the orbital;

Returns:

The diagonal matrix element.

initial_guess(p)

Retrieves the initial guess for the quasiparticle energy for orbital p. Args:

p (int, tuple): the orbital;

Returns:

The value of initial guess (float).

class pyscf.gw.gw_slow.LoggingFunction(m)

Bases: object

plot_call_history(title='')

Plots calls to this function. Args:

title (str): plot title;

property x
property y
pyscf.gw.gw_slow.corrected_moe(eri, p)

Calculates the corrected orbital energy. Args:

eri (PhysERI): a container with electron repulsion integrals; p (int): orbital;

Returns:

The corrected orbital energy.

pyscf.gw.gw_slow.kernel(imds, orbs=None, linearized=False, eta=0.001, tol=1e-09, method='fallback')

Calculates GW energies. Args:

imds (AbstractIMDS): GW intermediates; orbs (Iterable): indexes of MO orbitals to correct; linearized (bool): whether to apply a single-step linearized correction to energies instead of iterative procedure; eta (float): imaginary energy for the Green’s function; tol (float): tolerance for the search of zero; method (str): ‘bisect’ finds roots no matter what but, potentially, wrong ones, ‘newton’ finding roots close to the correct one but, potentially, failing during iterations, or ‘fallback’ using ‘newton’ and proceeding to ‘bisect’ in case of failure;

Returns:

Corrected orbital energies.

Module contents