wavefunction_analysis.embedding package
Submodules
wavefunction_analysis.embedding.fci_thermal module
wavefunction_analysis.embedding.fragment_entangle module
- fragment_localization(mf, frgm_list, extra_orb=0)[source]
get the localized orbitals and density matrix for fragment analysis
- get_embedding_energy(mf, coeff_eo_in_ao, dm_eo_in_ao, neo_imp, extra_orb=0)[source]
electronic energy of the impurity in the embedding basis
- get_embedding_orbital(dm_lo_in_ao, coeff_lo_in_ao, ovlp_ao, imp_lo_idx, env_lo_idx, method=0, threshold=1e-12)[source]
embedding orbital construction from the density matrix in local orbital basis method=0: singular value vectors of off-diagonal block of the dm in lo method=1: eigenvectors of environment diagonal block of the dm in lo ———————————————————————- returns: coeff_eo_in_ao: embedding orbital coefficients in ao basis dm_eo_in_ao: density matrix in embedding orbital basis
- get_embedding_system(mf, frgm_idx, ifrgm=0, extra_orb=0)[source]
embedding energy calculation for a given fragment mf: pyscf mean-field object frgm_idx: list of list of atomic indices for each fragment ifrgm: index of the fragment to be treated as impurity; if -1, loop over all fragments extra_orb: number of extra orbitals to include in the density matrix (can be negative) ————————————————————————– returns: energy: embedded energy of the impurity fragment
wavefunction_analysis.embedding.mol_lo_tools module
- lo_weight_on_ao(mol: Mole = None, coeff_ao_lo: ndarray = None, ovlp_ao: ndarray = None)[source]
A function to calculate the weight of local orbitals on atomic orbitals.
- Parameters:
mol – pyscf.gto.Mole The molecule object.
coeff_ao_lo – numpy.ndarray The coefficient matrix to transform atomic orbitals to local orbitals.
ovlp_ao – numpy.ndarray The overlap matrix of atomic orbitals.
- Returns:
- numpy.ndarray
The weight of local orbitals on atomic orbitals.
- Return type:
w2_ao_lo
- lo_weight_on_atom(mol: Mole, coeff_ao_lo: ndarray = None, ovlp_ao: ndarray = None)[source]
A function to calculate the weight of local orbitals on atomic orbitals.
- Parameters:
mol – pyscf.gto.Mole The molecule object.
coeff_ao_lo – numpy.ndarray The coefficient matrix to transform atomic orbitals to local orbitals.
ovlp_ao – numpy.ndarray The overlap matrix of atomic orbitals.
- Returns:
- numpy.ndarray
The weight of local orbitals on each atom.
- Return type:
w2_atm_lo
- lo_weight_on_frag(frag_atms_list: list, mol: Mole, coeff_ao_lo: ndarray = None, ovlp_ao: ndarray = None)[source]
A function to calculate the weight of local orbitals on fragments.
- Parameters:
frag_atms_list – list A list of atoms in each fragment.
mol – pyscf.gto.Mole The molecule object.
coeff_ao_lo – numpy.ndarray The coefficient matrix to transform atomic orbitals to local orbitals.
ovlp_ao – numpy.ndarray The overlap matrix of atomic orbitals.
- Returns:
- numpy.ndarray
The weight of local orbitals on each fragment.
- Return type:
w2_frag_lo
- partition_lo_to_atms(mol: Mole = None, coeff_ao_lo: ndarray = None, w2_atm_lo: ndarray = None, min_weight: float = 0.9)[source]
A function to partition local orbitals to atoms.
- Parameters:
mol – pyscf.gto.Mole The molecule object.
coeff_ao_lo – numpy.ndarray The coefficient matrix to transform atomic orbitals to local orbitals.
w2_atm_lo – numpy.ndarray The weight of local orbitals on each atom.
min_weight – float The minimum weight of local orbitals on each atom. If the max weight is smaller than min_weight, the local orbital will not be assigned to the atom.
- Returns:
- list
The list of local orbital indices on each atom.
- Return type:
lo_idx_on_atm_list
- partition_lo_to_frags(frag_atms_list: list, mol: Mole = None, coeff_ao_lo: ndarray = None, w2_frag_lo: ndarray = None, min_weight: float = 0.9)[source]
A function to partition local orbitals to fragments.
- Parameters:
frag_atms_list – list The list of atoms in each fragment.
mol – pyscf.gto.Mole The molecule object.
coeff_ao_lo – numpy.ndarray The coefficient matrix to transform atomic orbitals to local orbitals.
w2_frag_lo – numpy.ndarray The weight of local orbitals on each atom.
min_weight – float The minimum weight of local orbitals on each atom. If the max weight is smaller than min_weight, the local orbital will not be assigned to the atom.
- Returns:
- list
The list of local orbital indices on each fragment.
- Return type:
lo_idx_on_frag_list
- partition_lo_to_imps(frag_atms_list: list, mol: Mole = None, coeff_ao_lo: ndarray = None, w2_frag_lo: ndarray = None, min_weight: float = 0.9)
A function to partition local orbitals to fragments.
- Parameters:
frag_atms_list – list The list of atoms in each fragment.
mol – pyscf.gto.Mole The molecule object.
coeff_ao_lo – numpy.ndarray The coefficient matrix to transform atomic orbitals to local orbitals.
w2_frag_lo – numpy.ndarray The weight of local orbitals on each atom.
min_weight – float The minimum weight of local orbitals on each atom. If the max weight is smaller than min_weight, the local orbital will not be assigned to the atom.
- Returns:
- list
The list of local orbital indices on each fragment.
- Return type:
lo_idx_on_frag_list