forte2.ci.ci_utils#
Module Contents#
- forte2.ci.ci_utils.pretty_print_gas_info(ci_strings: forte2.CIStrings)#
- forte2.ci.ci_utils.pretty_print_ci_summary(sa_info: forte2.state.StateAverageInfo, eigvals_per_solver: list[list[float]], header='\nCI energy summary')#
Pretty print the CI energy summary for the given CI states and eigenvalues.
- Parameters:
- sa_infoStateAverageInfo
An instance of StateAverageInfo that holds information about the states and their properties.
- eigvals_per_solverlist[list[float]]
A list of lists containing the eigenvalues (energies) for each CI solver.
- headerstr, optional, default=”CI energy summary”
A header string to display at the top of the summary.
- forte2.ci.ci_utils.pretty_print_ci_nat_occ_numbers(sa_info: forte2.state.StateAverageInfo, mo_space: forte2.state.MOSpace, nat_occs: numpy.ndarray)#
Pretty print the natural occupation numbers for the CI states. Roots are rows, orbitals are columns.
- Parameters:
- sa_infoStateAverageInfo
An instance of StateAverageInfo that holds information about the states and their properties.
- mo_spaceMOSpace
An instance of MOSpace that holds information about the partitioning of the molecular orbitals.
- nat_occsnp.ndarray
A 2D numpy array containing the natural occupation numbers for each root and orbital. This should be calculated from CISolver.compute_natural_occupation_numbers.
- forte2.ci.ci_utils.pretty_print_ci_dets(sa_info: forte2.state.StateAverageInfo, mo_space: forte2.state.MOSpace, top_dets: list[list[list[tuple]]])#
Pretty print the top determinants for each root of the CI states.
- Parameters:
- sa_infoStateAverageInfo
An instance of StateAverageInfo that holds information about the states and their properties.
- mo_spaceMOSpace
An instance of MOSpace that holds information about the partitioning of the molecular orbitals.
- top_detslist[list[list[tuple]]]
A list of lists containing the top determinants and their coefficients for each root. This should be obtained from CISolver.get_top_determinants.
- forte2.ci.ci_utils.pretty_print_ci_transition_props(sa_info: forte2.state.StateAverageInfo, transition_dipoles: collections.OrderedDict, oscillator_strengths: collections.OrderedDict, eigvals_per_solver: list[list[float]], thres=0.0001)#
Pretty print the dipole moments of CI states, as well as the bright transitions between them, including the oscillator strengths and vertical transition energies (VTE).
- Parameters:
- sa_infoStateAverageInfo
An instance of StateAverageInfo that holds information about the states and their properties.
- transition_dipolesOrderedDict
A dictionary with keys as tuples (i, j) representing the initial and final states, and values as the transition dipole moments for each component (x, y, z).
- oscillator_strengthsOrderedDict
A dictionary with keys as tuples (i, j) representing the initial and final states, and values as the oscillator strengths for each transition.
- eigvals_per_solverlist[list[float]]
A list of lists containing the eigenvalues (energies) for each CI solver.
- forte2.ci.ci_utils.make_2cumulant_so(gamma1, gamma2)#
Compute the 2-cumulant from the spinorbital 1- and 2-RDMs.
This can be useful for computing averaged cumulants, since one cannot simply average the 2-cumulants directly, as the relation between RDMs and cumulants is nonlinear. See text around eq. 7 om J. Chem. Phys. 148, 124106 (2018) for more details.
- Parameters:
- gamma1np.ndarray
The one-particle reduced density matrix (1-RDM).
- gamma2np.ndarray
The two-particle reduced density matrix (2-RDM).
- Returns:
- np.ndarray
The two-particle cumulant (2-cumulant).
- forte2.ci.ci_utils.make_3cumulant_so(gamma1, gamma2, gamma3)#
Compute the 3-cumulant from the spinorbital 1-, 2-, and 3-RDMs.
This can be useful for computing averaged cumulants, since one cannot simply average the 3-cumulants directly, as the relation between RDMs and cumulants is nonlinear. See text around eq. 7 om J. Chem. Phys. 148, 124106 (2018) for more details.
- Parameters:
- gamma1np.ndarray
The one-particle reduced density matrix (1-RDM).
- lambda2np.ndarray
The two-particle reduced density cumulant.
- gamma3np.ndarray
The three-particle reduced density matrix (3-RDM).
- Returns:
- np.ndarray
The three-particle cumulant (3-cumulant).
- forte2.ci.ci_utils.make_2cumulant_sf(gamma1, gamma2)#
Compute the spin-free 2-cumulant from the 1- and 2- spin-free RDMs.
This can be useful for computing averaged cumulants, since one cannot simply average the 2-cumulants directly, as the relation between RDMs and cumulants is nonlinear.
- Parameters:
- gamma1np.ndarray
The one-particle spin-free reduced density matrix (sf-1-RDM).
- gamma2np.ndarray
The two-particle spin-free reduced density matrix (sf-2-RDM).
- Returns:
- np.ndarray
The two-particle spin-free cumulant (sf-2-cumulant).
- forte2.ci.ci_utils.make_3cumulant_sf(gamma1, gamma2, gamma3)#
Compute the spin-free 3-cumulant from the 1-, 2-, and 3- spin-free RDMs.
This can be useful for computing averaged cumulants, since one cannot simply average the 3-cumulants directly, as the relation between RDMs and cumulants is nonlinear. See text around eq. 7 om J. Chem. Phys. 148, 124106 (2018) for more details.
- Parameters:
- gamma1np.ndarray
The one-particle spin-free reduced density matrix (sf-1-RDM).
- gamma2np.ndarray
The two-particle spin-free reduced density matrix (sf-2-RDM).
- gamma3np.ndarray
The three-particle spin-free reduced density matrix (sf-3-RDM).
- Returns:
- np.ndarray
The three-particle spin-free cumulant (sf-3-cumulant).