momentGW.uhf.tda

Construct TDA moments with unrestricted references.

Module Contents

class momentGW.uhf.tda.dTDA(gw, nmom_max, integrals, mo_energy=None, mo_occ=None)

Bases: momentGW.tda.dTDA

Compute the self-energy moments using dTDA with unrestricted references.

Parameters:
  • gw (BaseUGW) – GW object.

  • nmom_max (int) – Maximum moment number to calculate.

  • integrals (UIntegrals) – Integrals object.

  • mo_energy (dict, optional) – Molecular orbital energies for each spin. Keys are “g” and “w” for the Green’s function and screened Coulomb interaction, respectively. If None, use gw.mo_energy for both. Default value is None.

  • mo_occ (dict, optional) – Molecular orbital occupancies for each spin. Keys are “g” and “w” for the Green’s function and screened Coulomb interaction, respectively. If None, use gw.mo_occ for both. Default value is None.

property nov

Get the number of ov states in the screened Coulomb interaction.

property nmo

Get the number of MOs.

property naux

Get the number of auxiliaries.

build_dd_moments()

Build the moments of the density-density response.

Returns:

moments – Moments of the density-density response for each spin channel.

Return type:

tuple of numpy.ndarray

kernel(exact=False)

Run the polarizability calculation to compute moments of the self-energy.

Parameters:

exact (bool, optional) – Has no effect and is only present for compatibility with dRPA. Default value is False.

Returns:

  • moments_occ (numpy.ndarray) – Moments of the occupied self-energy for each spin channel.

  • moments_vir (numpy.ndarray) – Moments of the virtual self-energy for each spin channel.

convolve(eta, eta_orders=None, mo_energy_g=None, mo_occ_g=None)

Handle the convolution of the moments of the Green’s function and screened Coulomb interaction.

Parameters:
  • eta (numpy.ndarray) – Moments of the density-density response partly transformed into moments of the screened Coulomb interaction, for each spin channel.

  • mo_energy_g (numpy.ndarray, optional) – Energies of the Green’s function for each spin channel. If None, use self.mo_energy_g. Default value is None.

  • eta_orders (list, optional) – List of orders for the rotated density-density moments in eta. If None, assume it spans all required orders. Default value is None.

  • mo_occ_g (numpy.ndarray, optional) – Occupancies of the Green’s function for each spin channel. If None, use self.mo_occ_g. Default value is None.

Returns:

  • moments_occ (numpy.ndarray) – Moments of the occupied self-energy for each spin channel.

  • moments_vir (numpy.ndarray) – Moments of the virtual self-energy for each spin channel.

build_se_moments(moments_dd)

Build the moments of the self-energy via convolution.

Parameters:

moments_dd (numpy.ndarray) – Moments of the density-density response for each spin channel.

Returns:

  • moments_occ (numpy.ndarray) – Moments of the occupied self-energy for each spin channel.

  • moments_vir (numpy.ndarray) – Moments of the virtual self-energy for each spin channel.

abstract build_dp_moments()

Build the moments of the dynamic polarizability for optical spectra calculations.

Notes

Placeholder for future implementation.

abstract build_dd_moment_inv()

Build the first inverse (n=-1) moment of the density-density response.

Notes

Placeholder for future implementation.

mpi_slice(n)

Return the start and end index for the current process for total size n.

Parameters:

n (int) – Total size.

Returns:

  • p0 (int) – Start index for current process.

  • p1 (int) – End index for current process.

mpi_size(n)

Return the number of states in the current process for total size n.

Parameters:

n (int) – Total size.

Returns:

size – Number of states in current process.

Return type:

int