qstack.fields.excited¶
Excited state density and property analysis.
- qstack.fields.excited.exciton_properties(mol, hole, part)[source]¶
Compute the ab initio or decomposed/predicted hole-particle distance, the hole size, and the particle size.
Distance is defined as |<r>_hole - <r>_part|, and size as sqrt(<r^2> - <r>^2).
- Parameters:
mol (pyscf Mole) – pyscf Mole object.
hole (numpy ndarray) – Hole density matrix in AO basis (2D) or decomposition coefficients (1D).
part (numpy ndarray) – Particle density matrix in AO basis (2D) or decomposition coefficients (1D).
- Returns:
hole-particle distance,
hole size,
particle size.
- Return type:
Tuple of floats
- Raises:
RuntimeError – If the dimensions of hole and part do not match or are not 1D or 2D.
- qstack.fields.excited.exciton_properties_c(mol, hole, part)[source]¶
Compute the decomposed/predicted hole-particle distance, the hole size, and the particle size.
- Parameters:
mol (pyscf Mole) – pyscf Mole object.
hole (numpy ndarray) – Hole AO density decomposition coefficiants.
part (numpy ndarray) – Particle density decomposition coefficiants.
- Returns:
hole-particle distance,
hole size,
particle size.
- Return type:
Tuple of floats
- qstack.fields.excited.exciton_properties_dm(mol, hole, part)[source]¶
Compute the ab initio hole-particle distance, the hole size, and the particle size.
- Parameters:
mol (pyscf Mole) – pyscf Mole object.
hole (numpy ndarray) – Hole density matrix.
part (numpy ndarray) – Particle density matrix.
- Returns:
hole-particle distance,
hole size,
particle size.
- Return type:
Tuple of floats
- qstack.fields.excited.get_cis(mf, nstates)[source]¶
Run a CIS (Configuration interaction singles) / TDA (Tamm-Dancoff approximation) computation.
- Parameters:
mf – Pyscf mean-field object.
nstates (int) – Number of excited states to compute.
- Returns:
Converged TDA/CIS computation object with excited state information.
- Return type:
TDA object
- qstack.fields.excited.get_cis_tdm(td)[source]¶
Extract transition density matrices from TDA/CIS calculation.
- Parameters:
td – TDA/CIS calculation object containing excitation amplitudes.
- Returns:
Array of transition density matrices for all computed states.
- Return type:
numpy ndarray
- qstack.fields.excited.get_holepart(mol, x, coeff)[source]¶
Compute the hole and particle density matrices (in AO basis) for a selected state.
- Parameters:
mol (pyscf Mole) – pyscf Mole object.
x (numpy ndarray) – Response vector (occ×virt) normalized to 1.
coeff (numpy ndarray) – Ground-state molecular orbital vectors.
- Returns:
Two numpy ndarrays containing the hole density matrices and the particle density matrices respectively.
- qstack.fields.excited.get_transition_dm(mol, x_mo, coeff)[source]¶
Compute the transition density matrix for a selected state.
- Parameters:
mol (pyscf Mole) – pyscf Mole object.
x_mo (numpy ndarray) – Response vector (occ×virt) normalized to 1.
coeff (numpy ndarray) – Ground-state molecular orbital vectors.
- Returns:
transition density matrix.
- Return type:
numpy ndarray