wavefunction_analysis.property package

Submodules

wavefunction_analysis.property.delta_scf module

class Delta_UKS(mol, xc='LDA,VWN')[source]

Bases: GKS

get_init_guess(mol=None, key='minao', **kwargs)[source]
get_occ(mo_energy=None, mo_coeff=None)
def get_jk(self, mol=None, dm=None, hermi=0, with_j=True, with_k=True,

omega=None):

if mol is None: mol = self.mol if dm is None: dm = self.make_rdm1() vj, vk = super().get_jk(mol, dm, hermi, with_j, with_k, omega)

ispin = self.spin_image if ispin:

nao = mol.nao kaa, kbb = np.copy(vk[:nao,:nao]), np.copy(vk[nao:,nao:]) print_matrix(‘jaa:’, vj[:nao,:nao], 10) print_matrix(‘kaa:’, kaa, 10) print_matrix(‘jbb:’, vj[nao:,nao:], 10) print_matrix(‘kbb:’, kbb, 10) vk[:nao,:nao] += ispin * kbb vk[nao:,nao:] += ispin * kaa

return vj, vk

get_veff(mol=None, dm=None, dm_last=0, vhf_last=0, hermi=1)[source]

Coulomb + XC functional

Note

This function will change the ks object.

Parameters:
  • ks – an instance of RKS XC functional are controlled by ks.xc attribute. Attribute ks.grids might be initialized.

  • dm – ndarray or list of ndarrays A density matrix or a list of density matrices

Kwargs:
dm_lastndarray or a list of ndarrays or 0

The density matrix baseline. If not 0, this function computes the increment of HF potential w.r.t. the reference HF potential matrix.

vhf_lastndarray or a list of ndarrays or 0

The reference Vxc potential matrix.

hermiint

Whether J, K matrix is hermitian

0 : no hermitian or symmetric
1 : hermitian
2 : anti-hermitian
Returns:

matrix Veff = J + Vxc. Veff can be a list matrices, if the input dm is a list of density matrices.

init_guess_by_aufbau(mol=None, **kwargs)[source]
require_spin_image()[source]
get_occ(mf, mo_energy=None, mo_coeff=None)[source]
pick_orbital_from_mom(mo0, ovlp, mo, imethod=0)[source]

wavefunction_analysis.property.energy_density_plot module

class EnergyDensity(atom, functional, basis, ecp=None, charge=0, max_memory=4000, efield=None, debug=False)[source]

Bases: object

ground-state energy density: j_only(), jk(), xc() excited-state energy density: coulomb_only(), coulomb_exchange(), functional()

becke_partition()[source]
cal_density_matrices(ie)[source]
cal_excitation_lambda_factor(estate)[source]
cal_excited_state(nstates)[source]
cal_overlap_detach_attach_density(estate)[source]
check_energy_core(dm)[source]
check_energy_coulomb_exchange(dm, hf_type)[source]
check_energy_functional()[source]
check_energy_jk(dm, hf_type)[source]
check_energy_xc()[source]
check_transtion_density()[source]
creat_mesh_grids(grid_type, nxyz)[source]
decompose_energy_density(directory, nstates=1, estate=0, plotnum=3, grid_type=1, nxyz=0.1, dohirshfeld=True, dobecke=True, withcharge=False, decompose_es=True, cal_another_attraction=False)[source]
decompose_energy_density_es(directory, hf_type, has_xc, ie, grid_type=1, dohirshfeld=True, dobecke=True)[source]
decompose_energy_density_gs(hf_type, has_xc)[source]
density_on_grids(dm, xctype='GGA')[source]
energy_density_core(dm, rho_value)[source]
energy_density_coulomb_exchange(dm1, dm2, dm3, dm4, rho_value1, rho_value2, hf_type)[source]

dm1, dm2: ground-state, difference, transition, transition_symmetric dm rho_value1, rho_value2: difference, transition rho_value

energy_density_coulomb_only(dm1, dm2, rho_value1, rho_value2)[source]

dm1, dm2: ground-state, transition_symmetric dm rho_value1, rho_value2: difference, transition rho_value

energy_density_exchange_rsh(dm1, dm2, dm3, omega, alpha, hyb)[source]

dm1, dm2, dm3: ground-state, difference, transition dm

energy_density_functional()[source]
energy_density_j_only(dm, rho_value)[source]

ground-state dm and rho_value

energy_density_jk(dm, rho_value, hf_type)[source]

ground-state dm and rho_value

energy_density_k_rsh(dm, omega, alpha, hyb)[source]
energy_density_xc()[source]
grab_es_density_on_grids(xctype='GGA')[source]
grab_gs_density_on_grids(xctype='GGA')[source]
group_hirshfeld_partition()[source]

density ratio of fragments on grid points

mayer_bond_order(bondatoms, nstates, estate)[source]
partition_energy_or_charge(ie, dohirshfeld=True, dobecke=True, withcharge=False)[source]
plot_es_energy_density(directory, ie)[source]
plot_gs_energy_density(directory, plotnum)[source]
relaxed_z_kernel(ie, singlet=True, atmlst=None, max_memory=2000)[source]
sum_energy_density_component()[source]
use_auxilary_basis(auxbasis)[source]

wavefunction_analysis.property.epr module

cal_epr(states, magnetic_transition)[source]
hamil_hyperfine_coupling(hyperfine, nuc_spin, sigma=None)[source]
hamil_nuclear_gyromagnetic(nuc_gyro, magnetic_field, nuc_spin)[source]
hamil_spin(gtensor, magnetic_field, nuc_gyro=None, hyperfine=None, ssc=None, sigma=None)[source]
hamil_spin_spin_coupling(ssc)[source]
hamil_zeeman(gensor, magnetic_field, sigma=None)[source]

wavefunction_analysis.property.gtensor module

wavefunction_analysis.property.orbital_property module

cal_orbital_property(mol, mf)[source]
cal_property_from_scratch(infile)[source]

wavefunction_analysis.property.rdm_analysis module

cal_dipoles(dip_mat, xys, coeff, scale=2.0, itype='trans')[source]
cal_rdm1(xys, coeff, scale=2.0, itype='trans')[source]
get_attach_dm(xy1, xy2, orbv1, orbv2=None, scale=2.0)[source]

xy is a tuple (x, y)

get_detach_dm(xy1, xy2, orbo1, orbo2=None, scale=2.0)[source]

xy is a tuple (x, y)

get_difference_dm(xy1, xy2, coeff1, coeff2=None, scale=2.0)[source]

xy is a tuple (x, y)

get_dipoles(dip_mat, rdm)[source]
get_transition_dm(xy, coeff1, coeff2=None, scale=2.0)[source]

xy is a tuple (x, y)

wavefunction_analysis.property.sapt_dispersion module

build_trans_density(mo_coeff, amps, itype='r', has_y=False)[source]
cal_sapt(mols, mo_coeffs, amps, energies, omega=None, itype='r')[source]
cal_sapt_r(mol, mo_coeffs, amps, nstates, omega=None)[source]

mol is the supermolecule

cal_sapt_u(mol, mo_coeffs, amps, nstates, omega=None)[source]

mol is the supermolecule

get_xys_in_ao(mo_coeff, xs, ys, has_y=False, scale=1)[source]
reshape_xys(xy, nstates=None, itype='r')[source]
run_tddft(symbols, coords, charge=1, spin=1, functional='hf', basis='sto-3g')[source]

Module contents