initial_guess

Module for generating initial guesses for the electronic structure.

dumb_guess(sample: OFData, mol: Mole) Tensor[source]

Generate a dumb initial guess for the electronic structure calculation.

The dumb guess sets the coefficients of the atomic basis functions to 1 for functions with a positive normalization constant (norm > 0). The coefficients are then scaled to ensure the correct number of electrons. This currently only works for the density basis and is only intended for testing purposes.

Parameters:
  • sample – OFData object containing the basis_integrals.

  • mol – Molecule object containing information about the atomic structure and basis set.

Returns:

Initial guess for the coefficients of the density.

Return type:

np.ndarray

hueckel_guess(sample: OFData, mol: Mole, ks_basis: str = '6-31G(2df,p)', transform: bool = True, normalize: bool = True) Tensor[source]

Return the Hückel initial guess.

The Hückel initial guess is performed for the density matrix in the orbital basis. This is then transformed into the density basis using density fitting. Finally, the coefficients are rescaled to ensure the correct number of electrons.

Parameters:
  • sample – OFData object containing transformed basis_integrals and coeffs.

  • mol – Molecule object containing information on the density (OF) basis.

  • ks_basis – Orbital (KS) basis in which the Hückel guess is performed.

  • normalize – Whether to rescale the coefficients to ensure the correct number of electrons.

Returns:

Initial guess of the coefficients in the transformed density basis.

hueckel_guess_np(mol: Mole, ks_basis: str = '6-31G(2df,p)') ndarray[source]

Return the Hückel initial guess.

The Hückel initial guess is performed for the density matrix in the orbital basis. This is then transformed into the density basis using density fitting.

Parameters:
  • mol – Molecule object in the density (OF) basis.

  • ks_basis – Orbital (KS) basis in which the Hückel guess is performed.

Returns:

Initial guess of the coefficients in the density basis.

label_guess(sample: OFData) Tensor[source]

Return the ground truth label of the ground state as the initial guess.

Parameters:

sample – OFData object containing the ground state coeffs.

Returns:

Ground state coefficients.

Return type:

Tensor

minao_guess(sample: OFData, mol: Mole, ks_basis: str = '6-31G(2df,p)', transform: bool = True, normalize: bool = True) Tensor[source]

Return the optionally transformed and normalized MINAO initial guess.

The MINAO initial guess is performed for the density matrix in the orbital basis. It is transformed into the density basis using density fitting. Finally, the coefficients can optionally be transformed according to the samples

Parameters:
  • sample – OFData object containing transformed basis_integrals and coeffs

  • mol – Molecule object containing information on the density (OF) basis.

  • ks_basis – Orbital (KS) basis in which the MINAO guess is performed.

  • transform – Whether to transform the coefficients into the density basis.

  • normalize – Whether to rescale the coefficients to ensure the correct number of electrons.

Returns:

Initial guess of the coefficients in the transformed density basis.

minao_guess_np(mol: Mole, ks_basis: str = '6-31G(2df,p)') ndarray[source]

Return the MINAO initial guess.

The MINAO initial guess is performed for the density matrix in the orbital basis. This is then transformed into the density basis using density fitting.

Parameters:
  • mol – Molecule object containing information on the density (OF) basis.

  • ks_basis – Orbital (KS) basis in which the MINAO guess is performed.

Returns:

Initial guess of the coefficients in the density basis.

perturbed_label_guess(sample: OFData, scale: float) Tensor[source]

Return the perturbed ground truth label of the ground state as the initial guess.

Parameters:
  • sample – OFData object containing the ground state coeffs.

  • scale – Perturbation to apply to the ground state coefficients.

Returns:

Perturbed ground state coefficients.

Return type:

Tensor

proj_minao_guess(sample: OFData, mol: Mole, module: Module, ks_basis: str = '6-31G(2df,p)', normalize: bool = True) Tensor[source]

Return the “projected” MINAO initial guess.

First, the py:meth:minao_guess is performed for the density matrix in the orbital basis. This is then transformed into the density basis using density fitting. Finally, the coefficients are rescaled to ensure the correct number of electrons.

Parameters:
  • sample – OFData object containing transformed basis_integrals and coeffs.

  • mol – Molecule object containing information on the density (OF) basis.

  • module – Module used to predict the correction to / projection of the initial guess.

  • ks_basis – Orbital (KS) basis in which the MINAO guess is performed.

  • normalize – Whether to rescale the coefficients to ensure the correct number of electrons.

Returns:

Initial guess of the coefficients in the transformed density basis.