ROHF

class psi4.core.ROHF

Bases: psi4.core.HF

docstring

Attributes Summary

MOM_excited_

Are we to do excited-state MOM?

MOM_performed_

MOM performed current iteration?

attempt_number_

Current macroiteration (1-indexed) for stability analysis

diis_enabled_

docstring

diis_manager_

The DIIS object.

diis_start_

docstring

frac_performed_

Frac performed current iteration?

initialized_diis_manager_

Has the DIIS object been initialized?

iteration_

Internal iterator for SCF cycles.

reset_occ_

Do reset the occupation after the guess to the inital occupation.

sad_

Do assume a non-idempotent density matrix and no orbitals after the guess.

Methods Summary

Ca(self)

Returns the Alpha Orbitals.

Ca_subset(self, arg0, arg1)

Returns the requested Alpha orbital subset.

Cb(self)

Returns the Beta Orbitals.

Cb_subset(self, arg0, arg1)

Returns the requested Beta orbital subset.

Ct(self)

MO coefficients in the orthogonalized MO basis.

Da(self)

Returns the Alpha Density Matrix.

Da_subset(self, arg0)

Returns the requested Alpha Density subset.

Db(self)

Returns the Beta Density Matrix.

Db_subset(self, arg0)

Returns the requested Beta Density subset.

Fa(self)

Returns the Alpha Fock Matrix.

Fa_subset(self, arg0)

Returns the Alpha Fock Matrix in the requested basis (AO,SO).

Fb(self)

Returns the Beta Fock Matrix.

Fb_subset(self, arg0)

Returns the Beta Fock Matrix in the requested basis (AO,SO).

H(self)

Returns the 'Core' Matrix (Potential + Kinetic) Integrals.

PCM_enabled(self)

Whether running a PCM calculation

S(self)

Returns the One-electron Overlap Matrix.

V_potential(self)

Returns the internal DFT V object.

Va(self)

Returns the Alpha Kohn-Sham Potential Matrix.

Vb(self)

Returns the Beta Kohn-Sham Potential Matrix.

X()

alpha_orbital_space(self, id, basis, subset)

Creates OrbitalSpace with information about the requested alpha orbital space.

aotoso(self)

Returns the Atomic Orbital to Symmetry Orbital transformer.

array_variable(self, arg0)

Returns copy of the requested (case-insensitive) Matrix QC variable.

array_variables(self)

Returns the dictionary of all Matrix QC variables.

arrays()

Deprecated since version 1.4.

atomic_point_charges(self)

Returns the set atomic point charges.

basis_projection(self, arg0, arg1, arg2, arg3)

Projects a orbital matrix from one basis to another.

basisset(self)

Returns the current orbital basis.

beta_orbital_space(self, arg0, arg1, arg2)

docstring

build(mol[, basis, quiet])

c1_deep_copy(self, basis)

Returns a new wavefunction with internal data converted to C_1 symmetry, using pre-c1-constructed BasisSet basis

check_phases(self)

docstring

clear_external_cpscf_perturbations(self)

Clear private external_cpscf_perturbations map

clear_external_potentials(self)

Clear private external_potentials list

compute_E(self)

docstring

compute_energy()

Base class Wavefunction requires this function.

compute_fvpi(self)

Update number of frozen virtuals

compute_gradient(self)

Computes the gradient of the Wavefunction

compute_hessian(self)

Computes the Hessian of the Wavefunction.

compute_initial_E(self)

docstring

compute_orbital_gradient(save_fock, ...)

docstring

compute_spin_contamination(self)

docstring

cphf_Hx(self, arg0)

CPHF Hessian-vector prodcuts (4 * J - K - K.T).

cphf_converged(self)

Adds occupied guess alpha orbitals.

cphf_solve(self, x_vec, conv_tol, max_iter)

Solves the CPHF equations for a given set of x vectors.

damping_update(self, arg0)

docstring

deep_copy(self, arg0)

Deep copies the internal data.

del_array_variable(self, arg0)

Removes the requested (case-insensitive) Matrix QC variable.

del_potential_variable(self, arg0)

Removes the requested (case-insensitive) ExternalPotential QC variable.

del_scalar_variable(self, arg0)

Removes the requested (case-insensitive) double QC variable.

del_variable(key)

Removes scalar or array QCVariable key from cls if present.

density_fitted(self)

Returns whether this wavefunction was obtained using density fitting or not.

diis(self, arg0)

docstring

doccpi(self)

Returns the number of doubly occupied orbitals per irrep.

efzc(self)

Returns the frozen-core energy

energy(self)

Returns the Wavefunction's energy.

epsilon_a(self)

Returns the Alpha Eigenvalues.

epsilon_a_subset(self, basis, subset)

Returns the requested Alpha orbital energies subset.

epsilon_b(self)

Returns the Beta Eigenvalues.

epsilon_b_subset(self, basis, subset)

Returns the requested Beta orbital energies subset.

esp_at_nuclei(self)

returns electrostatic potentials at nuclei

external_pot(self)

Gets the requested external potential.

finalize(self)

Cleans up the the Wavefunction's temporary data.

finalize_energy()

Performs stability analysis and calls back SCF with new guess if needed, Returns the SCF energy.

find_occupation(self)

docstring

force_doccpi(self, arg0)

Specialized expert use only.

force_soccpi(self, arg0)

Specialized expert use only.

form_C(self[, shift])

Forms the Orbital Matrices from the current Fock Matrices.

form_D(self)

Forms the Density Matrices from the current Orbitals Matrices

form_F(self)

Forms the F matrix.

form_FDSmSDF(self, arg0, arg1)

Forms the residual of SCF theory

form_G(self)

Forms the G matrix.

form_H(self)

Forms the core Hamiltonian

form_Shalf(self)

Forms the S^1/2 matrix

form_V(self)

Form the Kohn-Sham Potential Matrices from the current Density Matrices

form_initial_C(self)

Forms the initial Orbital Matrices from the current Fock Matrices.

form_initial_F(self)

Forms the initial F matrix.

frac_renormalize(self)

docstring

frequencies()

from_file(wfn_data)

Build Wavefunction from data.

frzcpi(self)

Returns the number of frozen core orbitals per irrep.

frzvpi(self)

Returns the number of frozen virtual orbitals per irrep.

functional(self)

Returns the internal DFT Superfunctional.

get_array(key)

Deprecated since version 1.4.

get_basisset(self, arg0)

Returns the requested auxiliary basis.

get_density(self, arg0)

Experimental!

get_dipole_field_strength(self)

Returns a vector of length 3, containing the x, y, and z dipole field strengths.

get_energies(self, arg0)

docstring

get_print(self)

Get the print level of the Wavefunction.

get_scratch_filename(filenumber)

Given a wavefunction and a scratch file number, canonicalizes the name so that files can be consistently written and read

get_variable(key)

Deprecated since version 1.4.

gradient(self)

Returns the Wavefunction's gradient.

guess(self)

Forms the guess (guarantees C, D, and E)

guess_Ca(self, arg0)

Sets the guess Alpha Orbital Matrix

guess_Cb(self, arg0)

Sets the guess Beta Orbital Matrix

has_array_variable(self, arg0)

Is the Matrix QC variable (case-insensitive) set?

has_potential_variable(self, arg0)

Is the ExternalPotential QC variable (case-insensitive) set? (This function is provisional and might be removed in the future.)

has_scalar_variable(self, arg0)

Is the double QC variable (case-insensitive) set?

has_variable(key)

Whether scalar or array QCVariable key has been set on self psi4.core.Wavefunction.

hessian(self)

Returns the Wavefunction's Hessian.

initialize()

Specialized initialization, compute integrals and does everything to prepare for iterations

initialize_gtfock_jk(self)

Sets up a GTFock JK object

initialize_jk(memory[, jk])

iterations([e_conv, d_conv])

jk(self)

Returns the internal JK object.

lagrangian(self)

Returns the Lagrangian Matrix.

legacy_frequencies()

Deprecated since version 1.4.

mintshelper(self)

The MintsHelper object

moFa(self)

docstring

moFb(self)

docstring

moFeff(self)

docstring

mo_extents(self)

returns the wavefunction's electronic orbital extents.

module(self)

Name of the last/highest level of theory module (internal or external) touching the wavefunction.

molecule(self)

Returns the Wavefunction's molecule.

nalpha(self)

Number of Alpha electrons.

nalphapi(self)

Returns the number of alpha orbitals per irrep.

name(self)

The level of theory this wavefunction corresponds to.

nbeta(self)

Number of Beta electrons.

nbetapi(self)

Returns the number of beta orbitals per irrep.

nfrzc(self)

Number of frozen core electrons.

nirrep(self)

Number of irreps in the system.

nmo(self)

Number of molecule orbitals.

nmopi(self)

Returns the number of molecular orbitals per irrep.

no_occupations(self)

returns the natural orbital occupations on the wavefunction.

nso(self)

Number of symmetry orbitals.

nsopi(self)

Returns the number of symmetry orbitals per irrep.

occupation_a(self)

Returns the Alpha occupation numbers.

occupation_b(self)

Returns the Beta occupation numbers.

onel_Hx(self, arg0)

One-electron Hessian-vector products.

options(self)

Returns the Wavefunction's options object

potential_variable(self, key)

Returns copy of the requested (case-insensitive) ExternalPotential QC variable key.

potential_variables(self)

Returns the dictionary of all ExternalPotential QC variables.

print_energies()

print_header(self)

docstring

print_orbitals(self)

docstring

print_preiterations([small])

push_back_external_potential(self, V)

Add an external potential to the private external_potentials list

reference_wavefunction(self)

Returns the reference wavefunction.

reset_occupation(self)

docstring

rotate_orbitals(self, arg0, arg1)

docstring

same_a_b_dens(self)

Returns true if the alpha and beta densities are the same.

same_a_b_orbs(self)

Returns true if the alpha and beta orbitals are the same.

save_density_and_energy(self)

docstring

scalar_variable(self, arg0)

Returns the requested (case-insensitive) double QC variable.

scalar_variables(self)

Returns the dictionary of all double QC variables.

scf_type(self)

Return the value of scf_type used in the SCF computation.

semicanonicalize(self)

Semicanonicalizes the orbitals for ROHF.

set_array(key, val)

Deprecated since version 1.4.

set_array_variable(self, arg0, arg1)

Sets the requested (case-insensitive) Matrix QC variable.

set_basisset(self, arg0, arg1)

Sets the requested auxiliary basis.

set_energies(self, arg0, arg1)

docstring

set_energy(self, arg0)

Sets the Wavefunction's energy.

set_external_cpscf_perturbation(self, name, ...)

Add an external potential/perturbation to the private external_cpscf_perturbations map for CPSCF

set_external_potential(self, arg0)

Sets the requested external potential.

set_frequencies(val)

Deprecated since version 1.4.

set_gradient(self, arg0)

Sets the Wavefunction's gradient.

set_hessian(self, arg0)

Sets the Wavefunction's Hessian.

set_jk(self, arg0)

Sets the internal JK object !expert.

set_lagrangian(self, arg0)

Sets the orbital Lagrangian matrix.

set_legacy_frequencies(self, arg0)

Sets the frequencies of the Hessian.

set_module(self, module)

Sets name of the last/highest level of theory module (internal or external) touching the wavefunction.

set_name(self, arg0)

Sets the level of theory this wavefunction corresponds to.

set_potential_variable(self, arg0, arg1)

Sets the requested (case-insensitive) ExternalPotential QC variable.

set_print(self, arg0)

Sets the print level of the Wavefunction.

set_reference_wavefunction(self, arg0)

docstring

set_sad_basissets(self, arg0)

Sets the Superposition of Atomic Densities basisset.

set_sad_fitting_basissets(self, arg0)

Sets the Superposition of Atomic Densities density-fitted basisset.

set_scalar_variable(self, arg0, arg1)

Sets the requested (case-insensitive) double QC variable.

set_variable(key, val)

Sets scalar or array QCVariable key to val on cls.

shallow_copy(self, arg0)

Copies the pointers to the internal data.

soFeff(self)

Returns the effective Fock matrix in the orthogonalized SO basis.

sobasisset(self)

Returns the symmetry orbitals basis.

soccpi(self)

Returns the number of singly occupied orbitals per irrep.

soscf_update(self, arg0, arg1, arg2, arg3)

Computes a second-order SCF update.

stability_analysis(self)

Assess wfn stability and correct if requested

to_file([filename])

Converts a Wavefunction object to a base class

twoel_Hx(self, arg0, arg1, arg2)

Two-electron Hessian-vector products

validate_diis()

Sanity-checks DIIS control options

variable(key)

Return copy of scalar or array QCVariable key from self psi4.core.Wavefunction.

variables([include_deprecated_keys])

Return all scalar or array QCVariables from cls.

write_molden([filename, do_virtual, use_natural])

Function to write wavefunction information in wfn to filename in molden format.

write_nbo(name)

Attributes Documentation

MOM_excited_

Are we to do excited-state MOM?

MOM_performed_

MOM performed current iteration?

attempt_number_

Current macroiteration (1-indexed) for stability analysis

diis_enabled_

docstring

diis_manager_

The DIIS object.

diis_start_

docstring

frac_performed_

Frac performed current iteration?

initialized_diis_manager_

Has the DIIS object been initialized?

iteration_

Internal iterator for SCF cycles. After completion, this equals the number of iterations taken to converge the SCF equations.

reset_occ_

Do reset the occupation after the guess to the inital occupation.

sad_

Do assume a non-idempotent density matrix and no orbitals after the guess.

Methods Documentation

Ca(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the Alpha Orbitals.

Ca_subset(self: psi4.core.Wavefunction, arg0: str, arg1: str) psi4.core.Matrix

Returns the requested Alpha orbital subset.

Parameters
  • basis (str) – {‘SO’, AO’} Should the subset be of symmetry orbitals or atomic orbitals?

  • subset (str) – {‘ALL’, ‘ACTIVE’, ‘FROZEN’, ‘OCC’, ‘VIR’, ‘FROZEN_OCC’, ‘ACTIVE_OCC’, ‘ACTIVE_VIR’, ‘FROZEN_VIR’} Which subspace of orbitals should be returned?

Returns

A Pitzer-ordered matrix of the orbitals, (# basis functions, # orbitals in the subset). Pitzer-ordering is with respect to c1 symmetry if basis is AO.

Return type

Matrix

Cb(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the Beta Orbitals.

Cb_subset(self: psi4.core.Wavefunction, arg0: str, arg1: str) psi4.core.Matrix

Returns the requested Beta orbital subset.

Parameters
  • basis (str) – {‘SO’, ‘AO’} Should the subset be of symmetry orbitals or atomic orbitals?

  • subset (str) – {‘ALL’, ‘ACTIVE’, ‘FROZEN’, ‘OCC’, ‘VIR’, ‘FROZEN_OCC’, ‘ACTIVE_OCC’, ‘ACTIVE_VIR’, ‘FROZEN_VIR’} Which subspace of orbitals should be returned?

Returns

A Pitzer-ordered matrix of the orbitals, (# basis functions, # orbitals in the subset). Pitzer-ordering is with respect to c1 symmetry if basis is AO.

Return type

Matrix

Ct(self: psi4.core.ROHF) psi4.core.Matrix

MO coefficients in the orthogonalized MO basis. Differs from the standard C matrix by an orthogonalizer matrix.

Da(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the Alpha Density Matrix.

Da_subset(self: psi4.core.Wavefunction, arg0: str) psi4.core.Matrix

Returns the requested Alpha Density subset.

Db(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the Beta Density Matrix.

Db_subset(self: psi4.core.Wavefunction, arg0: str) psi4.core.Matrix

Returns the requested Beta Density subset.

Fa(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the Alpha Fock Matrix.

Fa_subset(self: psi4.core.Wavefunction, arg0: str) psi4.core.Matrix

Returns the Alpha Fock Matrix in the requested basis (AO,SO).

Fb(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the Beta Fock Matrix.

Fb_subset(self: psi4.core.Wavefunction, arg0: str) psi4.core.Matrix

Returns the Beta Fock Matrix in the requested basis (AO,SO).

H(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the ‘Core’ Matrix (Potential + Kinetic) Integrals.

PCM_enabled(self: psi4.core.Wavefunction) bool

Whether running a PCM calculation

S(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the One-electron Overlap Matrix.

V_potential(self: psi4.core.HF) psi4.core.VBase

Returns the internal DFT V object.

Va(self: psi4.core.HF) psi4.core.Matrix

Returns the Alpha Kohn-Sham Potential Matrix.

Vb(self: psi4.core.HF) psi4.core.Matrix

Returns the Beta Kohn-Sham Potential Matrix.

X()
alpha_orbital_space(self: psi4.core.Wavefunction, id: str, basis: str, subset: str) psi4.core.OrbitalSpace

Creates OrbitalSpace with information about the requested alpha orbital space.

Parameters
  • id – Unique name for the orbital space.

  • basis – {‘SO’, ‘AO’} Should the subspace be of symmetry orbitals or atomic orbitals?

  • subset – {ALL, ACTIVE, FROZEN, OCC, VIR, FROZEN_OCC, ACTIVE_OCC, ACTIVE_VIR, FROZEN_VIR} Which subspace of orbitals should be returned?

Returns

Information on subset alpha orbitals.

Return type

OrbitalSpace

aotoso(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the Atomic Orbital to Symmetry Orbital transformer.

array_variable(self: psi4.core.Wavefunction, arg0: str) psi4.core.Matrix

Returns copy of the requested (case-insensitive) Matrix QC variable.

array_variables(self: psi4.core.Wavefunction) Dict[str, psi4.core.Matrix]

Returns the dictionary of all Matrix QC variables.

arrays()

Deprecated since version 1.4: Use psi4.core.Wavefunction.variables() instead.

atomic_point_charges(self: psi4.core.Wavefunction) psi4.core.Vector

Returns the set atomic point charges.

basis_projection(self: psi4.core.Wavefunction, arg0: psi4.core.Matrix, arg1: psi4.core.Dimension, arg2: psi4.core.BasisSet, arg3: psi4.core.BasisSet) psi4.core.Matrix

Projects a orbital matrix from one basis to another.

basisset(self: psi4.core.Wavefunction) psi4.core.BasisSet

Returns the current orbital basis.

beta_orbital_space(self: psi4.core.Wavefunction, arg0: str, arg1: str, arg2: str) psi4.core.OrbitalSpace

docstring

static build(mol, basis=None, *, quiet=False)
Parameters

quiet (bool) –

c1_deep_copy(self: psi4.core.ROHF, basis: psi4.core.BasisSet) psi4.core.ROHF

Returns a new wavefunction with internal data converted to C_1 symmetry, using pre-c1-constructed BasisSet basis

check_phases(self: psi4.core.HF) None

docstring

clear_external_cpscf_perturbations(self: psi4.core.HF) None

Clear private external_cpscf_perturbations map

clear_external_potentials(self: psi4.core.HF) None

Clear private external_potentials list

compute_E(self: psi4.core.HF) float

docstring

compute_energy()

Base class Wavefunction requires this function. Here it is simply a wrapper around initialize(), iterations(), finalize_energy(). It returns the SCF energy computed by finalize_energy().

compute_fvpi(self: psi4.core.HF) None

Update number of frozen virtuals

compute_gradient(self: psi4.core.Wavefunction) psi4.core.Matrix

Computes the gradient of the Wavefunction

compute_hessian(self: psi4.core.Wavefunction) psi4.core.Matrix

Computes the Hessian of the Wavefunction.

compute_initial_E(self: psi4.core.HF) float

docstring

compute_orbital_gradient(save_fock, max_diis_vectors)

docstring

Return type

float

Parameters
  • save_fock (bool) –

  • max_diis_vectors (int) –

compute_spin_contamination(self: psi4.core.HF) None

docstring

cphf_Hx(self: psi4.core.HF, arg0: List[psi4.core.Matrix]) List[psi4.core.Matrix]

CPHF Hessian-vector prodcuts (4 * J - K - K.T).

cphf_converged(self: psi4.core.HF) bool

Adds occupied guess alpha orbitals.

cphf_solve(self: psi4.core.HF, x_vec: List[psi4.core.Matrix], conv_tol: float, max_iter: int, print_lvl: int = 2) List[psi4.core.Matrix]

Solves the CPHF equations for a given set of x vectors.

damping_update(self: psi4.core.HF, arg0: float) None

docstring

deep_copy(self: psi4.core.Wavefunction, arg0: psi4.core.Wavefunction) None

Deep copies the internal data.

del_array_variable(self: psi4.core.Wavefunction, arg0: str) int

Removes the requested (case-insensitive) Matrix QC variable.

del_potential_variable(self: psi4.core.Wavefunction, arg0: str) int

Removes the requested (case-insensitive) ExternalPotential QC variable. (This function is provisional and might be removed in the future.)

del_scalar_variable(self: psi4.core.Wavefunction, arg0: str) int

Removes the requested (case-insensitive) double QC variable.

del_variable(key)

Removes scalar or array QCVariable key from cls if present.

Return type

None

Parameters
density_fitted(self: psi4.core.Wavefunction) bool

Returns whether this wavefunction was obtained using density fitting or not.

diis(self: psi4.core.HF, arg0: float) bool

docstring

doccpi(self: psi4.core.Wavefunction) psi4.core.Dimension

Returns the number of doubly occupied orbitals per irrep.

efzc(self: psi4.core.Wavefunction) float

Returns the frozen-core energy

energy(self: psi4.core.Wavefunction) float

Returns the Wavefunction’s energy.

epsilon_a(self: psi4.core.Wavefunction) psi4.core.Vector

Returns the Alpha Eigenvalues.

epsilon_a_subset(self: psi4.core.Wavefunction, basis: str, subset: str) psi4.core.Vector

Returns the requested Alpha orbital energies subset.

Parameters
  • basis – {‘AO’, ‘SO’, ‘MO’} MO or SO select for Pitzer-ordering the return vector in the full computational point group symmetry. AO selects for Pitzer-ordering the return vector without point group symmetry.

  • subset – {‘ALL’, ‘ACTIVE’, ‘FROZEN’, ‘OCC’, ‘VIR’, ‘FROZEN_OCC’, ‘ACTIVE_OCC’, ‘ACTIVE_VIR’, ‘FROZEN_VIR’} Which subspace of orbital energies should be returned?

Returns

A Pitzer-ordered vector of the orbitals.

Return type

Vector

epsilon_b(self: psi4.core.Wavefunction) psi4.core.Vector

Returns the Beta Eigenvalues.

epsilon_b_subset(self: psi4.core.Wavefunction, basis: str, subset: str) psi4.core.Vector

Returns the requested Beta orbital energies subset.

Parameters
  • basis – {‘AO’, ‘SO’, ‘MO’} MO or SO select for Pitzer-ordering the return vector in the full computational point group symmetry. AO selects for Pitzer-ordering the return vector without point group symmetry.

  • subset – {‘ALL’, ‘ACTIVE’, ‘FROZEN’, ‘OCC’, ‘VIR’, ‘FROZEN_OCC’, ‘ACTIVE_OCC’, ‘ACTIVE_VIR’, ‘FROZEN_VIR’} Which subspace of orbital energies should be returned?

Returns

A Pitzer-ordered vector of the orbitals.

Return type

Vector

esp_at_nuclei(self: psi4.core.Wavefunction) psi4.core.Vector

returns electrostatic potentials at nuclei

external_pot(self: psi4.core.Wavefunction) psi4.core.ExternalPotential

Gets the requested external potential.

finalize(self: psi4.core.HF) None

Cleans up the the Wavefunction’s temporary data.

finalize_energy()

Performs stability analysis and calls back SCF with new guess if needed, Returns the SCF energy. This function should be called once orbitals are ready for energy/property computations, usually after iterations() is called.

find_occupation(self: psi4.core.HF) None

docstring

force_doccpi(self: psi4.core.Wavefunction, arg0: psi4.core.Dimension) None

Specialized expert use only. Sets the number of doubly occupied oribtals per irrep. Note that this results in inconsistent Wavefunction objects for SCF, so caution is advised.

force_soccpi(self: psi4.core.Wavefunction, arg0: psi4.core.Dimension) None

Specialized expert use only. Sets the number of singly occupied oribtals per irrep. Note that this results in inconsistent Wavefunction objects for SCF, so caution is advised.

form_C(self: psi4.core.HF, shift: float = 0.0) None

Forms the Orbital Matrices from the current Fock Matrices.

form_D(self: psi4.core.HF) None

Forms the Density Matrices from the current Orbitals Matrices

form_F(self: psi4.core.HF) None

Forms the F matrix.

form_FDSmSDF(self: psi4.core.HF, arg0: psi4.core.Matrix, arg1: psi4.core.Matrix) psi4.core.Matrix

Forms the residual of SCF theory

form_G(self: psi4.core.HF) None

Forms the G matrix.

form_H(self: psi4.core.HF) None

Forms the core Hamiltonian

form_Shalf(self: psi4.core.HF) None

Forms the S^1/2 matrix

form_V(self: psi4.core.HF) None

Form the Kohn-Sham Potential Matrices from the current Density Matrices

form_initial_C(self: psi4.core.HF) None

Forms the initial Orbital Matrices from the current Fock Matrices.

form_initial_F(self: psi4.core.HF) None

Forms the initial F matrix.

frac_renormalize(self: psi4.core.HF) None

docstring

frequencies()
static from_file(wfn_data)

Build Wavefunction from data.

Parameters

wfn_data (Union[str, Dict, Path]) – If a dict, use data directly. Otherwise, path-like passed to numpy.load() to read from disk.

Returns

A deserialized Wavefunction object

Return type

Wavefunction

frzcpi(self: psi4.core.Wavefunction) psi4.core.Dimension

Returns the number of frozen core orbitals per irrep.

frzvpi(self: psi4.core.Wavefunction) psi4.core.Dimension

Returns the number of frozen virtual orbitals per irrep.

functional(self: psi4.core.HF) psi4.core.SuperFunctional

Returns the internal DFT Superfunctional.

get_array(key)

Deprecated since version 1.4: Use psi4.core.Wavefunction.variable() instead.

get_basisset(self: psi4.core.Wavefunction, arg0: str) psi4.core.BasisSet

Returns the requested auxiliary basis.

get_density(self: psi4.core.Wavefunction, arg0: str) psi4.core.Matrix

Experimental!

get_dipole_field_strength(self: psi4.core.Wavefunction) List[float[3]]

Returns a vector of length 3, containing the x, y, and z dipole field strengths.

get_energies(self: psi4.core.HF, arg0: str) float

docstring

get_print(self: psi4.core.Wavefunction) int

Get the print level of the Wavefunction.

get_scratch_filename(filenumber)

Given a wavefunction and a scratch file number, canonicalizes the name so that files can be consistently written and read

get_variable(key)

Deprecated since version 1.4: Use psi4.core.Wavefunction.variable() instead.

gradient(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the Wavefunction’s gradient.

guess(self: psi4.core.HF) None

Forms the guess (guarantees C, D, and E)

guess_Ca(self: psi4.core.HF, arg0: psi4.core.Matrix) None

Sets the guess Alpha Orbital Matrix

guess_Cb(self: psi4.core.HF, arg0: psi4.core.Matrix) None

Sets the guess Beta Orbital Matrix

has_array_variable(self: psi4.core.Wavefunction, arg0: str) bool

Is the Matrix QC variable (case-insensitive) set?

has_potential_variable(self: psi4.core.Wavefunction, arg0: str) bool

Is the ExternalPotential QC variable (case-insensitive) set? (This function is provisional and might be removed in the future.)

has_scalar_variable(self: psi4.core.Wavefunction, arg0: str) bool

Is the double QC variable (case-insensitive) set?

has_variable(key)

Whether scalar or array QCVariable key has been set on self psi4.core.Wavefunction.

Return type

bool

Parameters
hessian(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the Wavefunction’s Hessian.

initialize()

Specialized initialization, compute integrals and does everything to prepare for iterations

initialize_gtfock_jk(self: psi4.core.HF) None

Sets up a GTFock JK object

initialize_jk(memory, jk=None)
iterations(e_conv=None, d_conv=None)
jk(self: psi4.core.HF) psi4.core.JK

Returns the internal JK object.

lagrangian(self: psi4.core.Wavefunction) psi4.core.Matrix

Returns the Lagrangian Matrix.

legacy_frequencies()

Deprecated since version 1.4.

mintshelper(self: psi4.core.ROHF) psi4.core.MintsHelper

The MintsHelper object

moFa(self: psi4.core.ROHF) psi4.core.Matrix

docstring

moFb(self: psi4.core.ROHF) psi4.core.Matrix

docstring

moFeff(self: psi4.core.ROHF) psi4.core.Matrix

docstring

mo_extents(self: psi4.core.Wavefunction) List[psi4.core.Vector]

returns the wavefunction’s electronic orbital extents.

module(self: psi4.core.Wavefunction) str

Name of the last/highest level of theory module (internal or external) touching the wavefunction.

molecule(self: psi4.core.Wavefunction) psi4.core.Molecule

Returns the Wavefunction’s molecule.

nalpha(self: psi4.core.Wavefunction) int

Number of Alpha electrons.

nalphapi(self: psi4.core.Wavefunction) psi4.core.Dimension

Returns the number of alpha orbitals per irrep.

name(self: psi4.core.Wavefunction) str

The level of theory this wavefunction corresponds to.

nbeta(self: psi4.core.Wavefunction) int

Number of Beta electrons.

nbetapi(self: psi4.core.Wavefunction) psi4.core.Dimension

Returns the number of beta orbitals per irrep.

nfrzc(self: psi4.core.Wavefunction) int

Number of frozen core electrons.

nirrep(self: psi4.core.Wavefunction) int

Number of irreps in the system.

nmo(self: psi4.core.Wavefunction) int

Number of molecule orbitals.

nmopi(self: psi4.core.Wavefunction) psi4.core.Dimension

Returns the number of molecular orbitals per irrep.

no_occupations(self: psi4.core.Wavefunction) List[List[Tuple[float, int, int]]]

returns the natural orbital occupations on the wavefunction.

nso(self: psi4.core.Wavefunction) int

Number of symmetry orbitals.

nsopi(self: psi4.core.Wavefunction) psi4.core.Dimension

Returns the number of symmetry orbitals per irrep.

occupation_a(self: psi4.core.HF) psi4.core.Vector

Returns the Alpha occupation numbers.

occupation_b(self: psi4.core.HF) psi4.core.Vector

Returns the Beta occupation numbers.

onel_Hx(self: psi4.core.HF, arg0: List[psi4.core.Matrix]) List[psi4.core.Matrix]

One-electron Hessian-vector products.

options(self: psi4.core.Wavefunction) psi::Options

Returns the Wavefunction’s options object

potential_variable(self: psi4.core.Wavefunction, key: str) psi4.core.ExternalPotential

Returns copy of the requested (case-insensitive) ExternalPotential QC variable key. (This function is provisional and might be removed in the future.)

potential_variables(self: psi4.core.Wavefunction) Dict[str, psi4.core.ExternalPotential]

Returns the dictionary of all ExternalPotential QC variables. (This function is provisional and might be removed in the future.)

print_energies()
print_header(self: psi4.core.HF) None

docstring

print_orbitals(self: psi4.core.HF) None

docstring

print_preiterations(small=False)
push_back_external_potential(self: psi4.core.HF, V: psi4.core.Matrix) None

Add an external potential to the private external_potentials list

reference_wavefunction(self: psi4.core.Wavefunction) psi4.core.Wavefunction

Returns the reference wavefunction.

reset_occupation(self: psi4.core.HF) None

docstring

rotate_orbitals(self: psi4.core.HF, arg0: psi4.core.Matrix, arg1: psi4.core.Matrix) None

docstring

same_a_b_dens(self: psi4.core.Wavefunction) bool

Returns true if the alpha and beta densities are the same.

same_a_b_orbs(self: psi4.core.Wavefunction) bool

Returns true if the alpha and beta orbitals are the same.

save_density_and_energy(self: psi4.core.HF) None

docstring

scalar_variable(self: psi4.core.Wavefunction, arg0: str) float

Returns the requested (case-insensitive) double QC variable.

scalar_variables(self: psi4.core.Wavefunction) Dict[str, float]

Returns the dictionary of all double QC variables.

scf_type(self: psi4.core.HF) str

Return the value of scf_type used in the SCF computation.

semicanonicalize(self: psi4.core.HF) None

Semicanonicalizes the orbitals for ROHF.

set_array(key, val)

Deprecated since version 1.4: Use psi4.core.Wavefunction.set_variable() instead.

set_array_variable(self: psi4.core.Wavefunction, arg0: str, arg1: psi4.core.Matrix) None

Sets the requested (case-insensitive) Matrix QC variable. Syncs with Wavefunction.gradient_ or hessian_ if CURRENT GRADIENT or HESSIAN.

set_basisset(self: psi4.core.Wavefunction, arg0: str, arg1: psi4.core.BasisSet) None

Sets the requested auxiliary basis.

set_energies(self: psi4.core.HF, arg0: str, arg1: float) None

docstring

set_energy(self: psi4.core.Wavefunction, arg0: float) None

Sets the Wavefunction’s energy. Syncs with Wavefunction’s QC variable CURRENT ENERGY.

set_external_cpscf_perturbation(self: psi4.core.HF, name: str, function: Callable[[psi4.core.Matrix], psi4.core.Matrix]) None

Add an external potential/perturbation to the private external_cpscf_perturbations map for CPSCF

set_external_potential(self: psi4.core.Wavefunction, arg0: psi4.core.ExternalPotential) None

Sets the requested external potential.

set_frequencies(val)

Deprecated since version 1.4.

set_gradient(self: psi4.core.Wavefunction, arg0: psi4.core.Matrix) None

Sets the Wavefunction’s gradient. Syncs with Wavefunction’s QC variable CURRENT GRADIENT.

set_hessian(self: psi4.core.Wavefunction, arg0: psi4.core.Matrix) None

Sets the Wavefunction’s Hessian. Syncs with Wavefunction’s QC variable CURRENT HESSIAN.

set_jk(self: psi4.core.HF, arg0: psi4.core.JK) None

Sets the internal JK object !expert.

set_lagrangian(self: psi4.core.Wavefunction, arg0: psi4.core.Matrix) None

Sets the orbital Lagrangian matrix.

set_legacy_frequencies(self: psi4.core.Wavefunction, arg0: psi4.core.Vector) None

Sets the frequencies of the Hessian.

set_module(self: psi4.core.Wavefunction, module: str) None

Sets name of the last/highest level of theory module (internal or external) touching the wavefunction.

set_name(self: psi4.core.Wavefunction, arg0: str) None

Sets the level of theory this wavefunction corresponds to.

set_potential_variable(self: psi4.core.Wavefunction, arg0: str, arg1: psi4.core.ExternalPotential) None

Sets the requested (case-insensitive) ExternalPotential QC variable. (This function is provisional and might be removed in the future.)

set_print(self: psi4.core.Wavefunction, arg0: int) None

Sets the print level of the Wavefunction.

set_reference_wavefunction(self: psi4.core.Wavefunction, arg0: psi4.core.Wavefunction) None

docstring

set_sad_basissets(self: psi4.core.HF, arg0: List[psi4.core.BasisSet]) None

Sets the Superposition of Atomic Densities basisset.

set_sad_fitting_basissets(self: psi4.core.HF, arg0: List[psi4.core.BasisSet]) None

Sets the Superposition of Atomic Densities density-fitted basisset.

set_scalar_variable(self: psi4.core.Wavefunction, arg0: str, arg1: float) None

Sets the requested (case-insensitive) double QC variable. Syncs with Wavefunction.energy_ if CURRENT ENERGY.

set_variable(key, val)

Sets scalar or array QCVariable key to val on cls.

Return type

None

Parameters
shallow_copy(self: psi4.core.Wavefunction, arg0: psi4.core.Wavefunction) None

Copies the pointers to the internal data.

soFeff(self: psi4.core.ROHF) psi4.core.Matrix

Returns the effective Fock matrix in the orthogonalized SO basis. See libscf_solver/rohf.cc::form_Cfor technical definition.

sobasisset(self: psi4.core.Wavefunction) psi4.core.SOBasisSet

Returns the symmetry orbitals basis.

soccpi(self: psi4.core.Wavefunction) psi4.core.Dimension

Returns the number of singly occupied orbitals per irrep.

soscf_update(self: psi4.core.HF, arg0: float, arg1: int, arg2: int, arg3: int) int

Computes a second-order SCF update.

stability_analysis(self: psi4.core.HF) bool

Assess wfn stability and correct if requested

to_file(filename=None)

Converts a Wavefunction object to a base class

Parameters
  • wfn (Wavefunction) – A Wavefunction or inherited class

  • filename (Optional[str]) – An optional filename to write the data to

Returns

A dictionary and NumPy representation of the Wavefunction.

Return type

dict

twoel_Hx(self: psi4.core.HF, arg0: List[psi4.core.Matrix], arg1: bool, arg2: str) List[psi4.core.Matrix]

Two-electron Hessian-vector products

validate_diis()

Sanity-checks DIIS control options

Raises

psi4.driver.p4util.exceptions.ValidationError – If any of DIIS options don’t play well together.

Returns

Whether some form of DIIS is enabled during SCF.

Return type

bool

variable(key)

Return copy of scalar or array QCVariable key from self psi4.core.Wavefunction.

Returns

Scalar variables are returned as floats. Array variables not naturally 2D (like multipoles) are returned as numpy.ndarray of natural dimensionality. Other array variables are returned as Matrix and may have an extra dimension with symmetry information.

Return type

float or numpy.ndarray or Matrix

Parameters

Example

>>> g, wfn = psi4.gradient("hf/cc-pvdz", return_wfn=True)
>>> wfn.variable("CURRENT ENERGY")
-100.00985995185668
>>> wfn.variable("CURRENT DIPOLE")
array([ 0.        ,  0.        , -0.83217802])
>>> wfn.variable("CURRENT GRADIENT")
<psi4.core.Matrix object at 0x12d884fc0>
>>> wfn.variable("CURRENT GRADIENT").np
array([[ 6.16297582e-33,  6.16297582e-33, -9.41037138e-02],
       [-6.16297582e-33, -6.16297582e-33,  9.41037138e-02]])
variables(include_deprecated_keys=False)

Return all scalar or array QCVariables from cls.

Return type

Dict[str, Union[float, Matrix, ndarray]]

Parameters

include_deprecated_keys (bool) –

write_molden(filename=None, do_virtual=None, use_natural=False)

Function to write wavefunction information in wfn to filename in molden format. Will write natural orbitals from density (MO basis) if supplied. Warning! Most post-SCF Wavefunctions do not build the density as this is often much more costly than the energy. In addition, the Wavefunction density attributes (Da and Db) return the SO density and must be transformed to the MO basis to use with this function.

New in version 0.5: wfn parameter passed explicitly

Returns

None

Parameters
  • filename (string) – destination file name for MOLDEN file (optional)

  • do_virtual (bool) – do write all the MOs to the MOLDEN file (true) or discard the unoccupied MOs, not valid for NO’s (false) (optional)

  • use_natural (bool) – write natural orbitals determined from density on wavefunction

Examples

  1. Molden file with the Kohn-Sham orbitals of a DFT calculation.

    >>> E, wfn = energy('b3lyp', return_wfn=True)
    >>> wfn.molden('mycalc.molden')
    
  2. Molden file with the natural orbitals of a CCSD computation. For correlated methods, an energy call will not compute the density. “properties” or “gradient” must be called.

    >>> E, wfn = properties('ccsd', return_wfn=True)
    >>> wfn.molden('ccsd_no.molden', use_natural=True)
    
  3. To supply a custom density matrix, manually set the Da and Db of the wavefunction. This is used, for example, to write natural orbitals coming from a root computed by a CIWavefunction computation, e.g., detci, fci, casscf.` The first two arguments of get_opdm can be set to n, n where n => 0 selects the root to write out, provided these roots were computed, see NUM_ROOTS. The third argument controls the spin ("A", "B" or "SUM") and the final boolean option determines whether inactive orbitals are included.

    >>> E, wfn = energy('detci', return_wfn=True)
    >>> wfn.Da() = wfn.get_opdm(0, 0, "A", True)
    >>> wfn.Db() = wfn.get_opdm(0, 0, "B", True)
    >>> molden(wfn, 'no_root1.molden', use_natural=True)
    
write_nbo(name)