17.1.1.25. pysisyphus.wavefunction package
17.1.1.25.1. Subpackages
- 17.1.1.25.1.1. pysisyphus.wavefunction.ints package
- 17.1.1.25.1.1.1. Submodules
- 17.1.1.25.1.1.2. pysisyphus.wavefunction.ints.boys module
- 17.1.1.25.1.1.3. pysisyphus.wavefunction.ints.cart_gto3d module
- 17.1.1.25.1.1.4. pysisyphus.wavefunction.ints.coulomb3d module
coulomb3d_00()coulomb3d_01()coulomb3d_02()coulomb3d_03()coulomb3d_04()coulomb3d_10()coulomb3d_11()coulomb3d_12()coulomb3d_13()coulomb3d_14()coulomb3d_20()coulomb3d_21()coulomb3d_22()coulomb3d_23()coulomb3d_24()coulomb3d_30()coulomb3d_31()coulomb3d_32()coulomb3d_33()coulomb3d_34()coulomb3d_40()coulomb3d_41()coulomb3d_42()coulomb3d_43()coulomb3d_44()
- 17.1.1.25.1.1.5. pysisyphus.wavefunction.ints.diag_quadrupole3d module
diag_quadrupole3d_00()diag_quadrupole3d_01()diag_quadrupole3d_02()diag_quadrupole3d_03()diag_quadrupole3d_04()diag_quadrupole3d_10()diag_quadrupole3d_11()diag_quadrupole3d_12()diag_quadrupole3d_13()diag_quadrupole3d_14()diag_quadrupole3d_20()diag_quadrupole3d_21()diag_quadrupole3d_22()diag_quadrupole3d_23()diag_quadrupole3d_24()diag_quadrupole3d_30()diag_quadrupole3d_31()diag_quadrupole3d_32()diag_quadrupole3d_33()diag_quadrupole3d_34()diag_quadrupole3d_40()diag_quadrupole3d_41()diag_quadrupole3d_42()diag_quadrupole3d_43()diag_quadrupole3d_44()
- 17.1.1.25.1.1.6. pysisyphus.wavefunction.ints.dipole3d module
dipole3d_00()dipole3d_01()dipole3d_02()dipole3d_03()dipole3d_04()dipole3d_10()dipole3d_11()dipole3d_12()dipole3d_13()dipole3d_14()dipole3d_20()dipole3d_21()dipole3d_22()dipole3d_23()dipole3d_24()dipole3d_30()dipole3d_31()dipole3d_32()dipole3d_33()dipole3d_34()dipole3d_40()dipole3d_41()dipole3d_42()dipole3d_43()dipole3d_44()
- 17.1.1.25.1.1.7. pysisyphus.wavefunction.ints.int2c2e3d module
int2c2e3d_00()int2c2e3d_01()int2c2e3d_02()int2c2e3d_03()int2c2e3d_04()int2c2e3d_10()int2c2e3d_11()int2c2e3d_12()int2c2e3d_13()int2c2e3d_14()int2c2e3d_20()int2c2e3d_21()int2c2e3d_22()int2c2e3d_23()int2c2e3d_24()int2c2e3d_30()int2c2e3d_31()int2c2e3d_32()int2c2e3d_33()int2c2e3d_34()int2c2e3d_40()int2c2e3d_41()int2c2e3d_42()int2c2e3d_43()int2c2e3d_44()
- 17.1.1.25.1.1.8. pysisyphus.wavefunction.ints.int3c2e3d_sph module
int3c2e3d_sph_000()int3c2e3d_sph_001()int3c2e3d_sph_002()int3c2e3d_sph_003()int3c2e3d_sph_004()int3c2e3d_sph_010()int3c2e3d_sph_011()int3c2e3d_sph_012()int3c2e3d_sph_013()int3c2e3d_sph_014()int3c2e3d_sph_020()int3c2e3d_sph_021()int3c2e3d_sph_022()int3c2e3d_sph_023()int3c2e3d_sph_024()int3c2e3d_sph_030()int3c2e3d_sph_031()int3c2e3d_sph_032()int3c2e3d_sph_033()int3c2e3d_sph_034()int3c2e3d_sph_100()int3c2e3d_sph_101()int3c2e3d_sph_102()int3c2e3d_sph_103()int3c2e3d_sph_104()int3c2e3d_sph_110()int3c2e3d_sph_111()int3c2e3d_sph_112()int3c2e3d_sph_113()int3c2e3d_sph_114()int3c2e3d_sph_120()int3c2e3d_sph_121()int3c2e3d_sph_122()int3c2e3d_sph_123()int3c2e3d_sph_124()int3c2e3d_sph_130()int3c2e3d_sph_131()int3c2e3d_sph_132()int3c2e3d_sph_133()int3c2e3d_sph_134()int3c2e3d_sph_200()int3c2e3d_sph_201()int3c2e3d_sph_202()int3c2e3d_sph_203()int3c2e3d_sph_204()int3c2e3d_sph_210()int3c2e3d_sph_211()int3c2e3d_sph_212()int3c2e3d_sph_213()int3c2e3d_sph_214()int3c2e3d_sph_220()int3c2e3d_sph_221()int3c2e3d_sph_222()int3c2e3d_sph_223()int3c2e3d_sph_224()int3c2e3d_sph_230()int3c2e3d_sph_231()int3c2e3d_sph_232()int3c2e3d_sph_233()int3c2e3d_sph_234()int3c2e3d_sph_300()int3c2e3d_sph_301()int3c2e3d_sph_302()int3c2e3d_sph_303()int3c2e3d_sph_304()int3c2e3d_sph_310()int3c2e3d_sph_311()int3c2e3d_sph_312()int3c2e3d_sph_313()int3c2e3d_sph_314()int3c2e3d_sph_320()int3c2e3d_sph_321()int3c2e3d_sph_322()int3c2e3d_sph_323()int3c2e3d_sph_324()int3c2e3d_sph_330()int3c2e3d_sph_331()int3c2e3d_sph_332()int3c2e3d_sph_333()int3c2e3d_sph_334()
- 17.1.1.25.1.1.9. pysisyphus.wavefunction.ints.kinetic3d module
kinetic3d_00()kinetic3d_01()kinetic3d_02()kinetic3d_03()kinetic3d_04()kinetic3d_10()kinetic3d_11()kinetic3d_12()kinetic3d_13()kinetic3d_14()kinetic3d_20()kinetic3d_21()kinetic3d_22()kinetic3d_23()kinetic3d_24()kinetic3d_30()kinetic3d_31()kinetic3d_32()kinetic3d_33()kinetic3d_34()kinetic3d_40()kinetic3d_41()kinetic3d_42()kinetic3d_43()kinetic3d_44()
- 17.1.1.25.1.1.10. pysisyphus.wavefunction.ints.multipole3d_sph module
multipole3d_sph_00()multipole3d_sph_01()multipole3d_sph_02()multipole3d_sph_03()multipole3d_sph_04()multipole3d_sph_10()multipole3d_sph_11()multipole3d_sph_12()multipole3d_sph_13()multipole3d_sph_14()multipole3d_sph_20()multipole3d_sph_21()multipole3d_sph_22()multipole3d_sph_23()multipole3d_sph_24()multipole3d_sph_30()multipole3d_sph_31()multipole3d_sph_32()multipole3d_sph_33()multipole3d_sph_34()multipole3d_sph_40()multipole3d_sph_41()multipole3d_sph_42()multipole3d_sph_43()multipole3d_sph_44()
- 17.1.1.25.1.1.11. pysisyphus.wavefunction.ints.ovlp3d module
- 17.1.1.25.1.1.12. pysisyphus.wavefunction.ints.quadrupole3d module
quadrupole3d_00()quadrupole3d_01()quadrupole3d_02()quadrupole3d_03()quadrupole3d_04()quadrupole3d_10()quadrupole3d_11()quadrupole3d_12()quadrupole3d_13()quadrupole3d_14()quadrupole3d_20()quadrupole3d_21()quadrupole3d_22()quadrupole3d_23()quadrupole3d_24()quadrupole3d_30()quadrupole3d_31()quadrupole3d_32()quadrupole3d_33()quadrupole3d_34()quadrupole3d_40()quadrupole3d_41()quadrupole3d_42()quadrupole3d_43()quadrupole3d_44()
- 17.1.1.25.1.1.13. Module contents
- 17.1.1.25.1.2. pysisyphus.wavefunction.ints_numba package
- 17.1.1.25.1.2.1. Submodules
- 17.1.1.25.1.2.2. pysisyphus.wavefunction.ints_numba.diag_quadrupole3d module
diag_quadrupole3d_00()diag_quadrupole3d_01()diag_quadrupole3d_02()diag_quadrupole3d_03()diag_quadrupole3d_04()diag_quadrupole3d_10()diag_quadrupole3d_11()diag_quadrupole3d_12()diag_quadrupole3d_13()diag_quadrupole3d_14()diag_quadrupole3d_20()diag_quadrupole3d_21()diag_quadrupole3d_22()diag_quadrupole3d_23()diag_quadrupole3d_24()diag_quadrupole3d_30()diag_quadrupole3d_31()diag_quadrupole3d_32()diag_quadrupole3d_33()diag_quadrupole3d_34()diag_quadrupole3d_40()diag_quadrupole3d_41()diag_quadrupole3d_42()diag_quadrupole3d_43()diag_quadrupole3d_44()get_func_dict()
- 17.1.1.25.1.2.3. pysisyphus.wavefunction.ints_numba.dipole3d module
dipole3d_00()dipole3d_01()dipole3d_02()dipole3d_03()dipole3d_04()dipole3d_10()dipole3d_11()dipole3d_12()dipole3d_13()dipole3d_14()dipole3d_20()dipole3d_21()dipole3d_22()dipole3d_23()dipole3d_24()dipole3d_30()dipole3d_31()dipole3d_32()dipole3d_33()dipole3d_34()dipole3d_40()dipole3d_41()dipole3d_42()dipole3d_43()dipole3d_44()get_func_dict()
- 17.1.1.25.1.2.4. pysisyphus.wavefunction.ints_numba.kinetic3d module
get_func_dict()kinetic3d_00()kinetic3d_01()kinetic3d_02()kinetic3d_03()kinetic3d_04()kinetic3d_10()kinetic3d_11()kinetic3d_12()kinetic3d_13()kinetic3d_14()kinetic3d_20()kinetic3d_21()kinetic3d_22()kinetic3d_23()kinetic3d_24()kinetic3d_30()kinetic3d_31()kinetic3d_32()kinetic3d_33()kinetic3d_34()kinetic3d_40()kinetic3d_41()kinetic3d_42()kinetic3d_43()kinetic3d_44()
- 17.1.1.25.1.2.5. pysisyphus.wavefunction.ints_numba.multipole3d_sph module
get_func_dict()multipole3d_sph_00()multipole3d_sph_01()multipole3d_sph_02()multipole3d_sph_03()multipole3d_sph_04()multipole3d_sph_10()multipole3d_sph_11()multipole3d_sph_12()multipole3d_sph_13()multipole3d_sph_14()multipole3d_sph_20()multipole3d_sph_21()multipole3d_sph_22()multipole3d_sph_23()multipole3d_sph_24()multipole3d_sph_30()multipole3d_sph_31()multipole3d_sph_32()multipole3d_sph_33()multipole3d_sph_34()multipole3d_sph_40()multipole3d_sph_41()multipole3d_sph_42()multipole3d_sph_43()multipole3d_sph_44()
- 17.1.1.25.1.2.6. pysisyphus.wavefunction.ints_numba.ovlp3d module
get_func_dict()ovlp3d_00()ovlp3d_01()ovlp3d_02()ovlp3d_03()ovlp3d_04()ovlp3d_10()ovlp3d_11()ovlp3d_12()ovlp3d_13()ovlp3d_14()ovlp3d_20()ovlp3d_21()ovlp3d_22()ovlp3d_23()ovlp3d_24()ovlp3d_30()ovlp3d_31()ovlp3d_32()ovlp3d_33()ovlp3d_34()ovlp3d_40()ovlp3d_41()ovlp3d_42()ovlp3d_43()ovlp3d_44()
- 17.1.1.25.1.2.7. pysisyphus.wavefunction.ints_numba.quadrupole3d module
get_func_dict()quadrupole3d_00()quadrupole3d_01()quadrupole3d_02()quadrupole3d_03()quadrupole3d_04()quadrupole3d_10()quadrupole3d_11()quadrupole3d_12()quadrupole3d_13()quadrupole3d_14()quadrupole3d_20()quadrupole3d_21()quadrupole3d_22()quadrupole3d_23()quadrupole3d_24()quadrupole3d_30()quadrupole3d_31()quadrupole3d_32()quadrupole3d_33()quadrupole3d_34()quadrupole3d_40()quadrupole3d_41()quadrupole3d_42()quadrupole3d_43()quadrupole3d_44()
- 17.1.1.25.1.2.8. Module contents
17.1.1.25.2. Submodules
17.1.1.25.3. pysisyphus.wavefunction.Basis module
- class pysisyphus.wavefunction.Basis.Basis[source]
Bases:
objectRead basis sets from files. Bring them in a suitable order. 1s2s2p3s3p4s3d etc.
NOT YET USED
- pysisyphus.wavefunction.Basis.basis_from_orca_str(basis_str)[source]
- %basis
newgto 1 s 2 1 0.7 0.5 1 0.8 0.6 p 2 1 0.7 0.5 1 0.8 0.6 d 2 1 0.7 0.5 1 0.8 0.6 d 3 1 0.7 0.5 1 0.8 0.6 1 0.6 0.4 end
end
17.1.1.25.4. pysisyphus.wavefunction.DIIS module
- class pysisyphus.wavefunction.DIIS.DIIS(arr_specs)[source]
Bases:
object- __init__(arr_specs)[source]
DIIS container.
- Parameters:
arr_specs (
Dict[str,ndarray]) -- Dict with string-keys and array-values. The key 'err_vecs' must always be present. Additional keys can be provided, depending on what must be stored next to the error vectors. The arrays should be at least 2d, with the first dimension having size 'nvecs'.
17.1.1.25.5. pysisyphus.wavefunction.backend_numba module
- class pysisyphus.wavefunction.backend_numba.NumbaShell(*args, **kwargs)[source]
Bases:
NumbaShell- class_type = jitclass.NumbaShell#7fdb36ab5fa0<L:int64,center:array(float64, 1d, A),coeffs:array(float64, 1d, A),exps:array(float64, 1d, A),index:int64,size:int64>
- class pysisyphus.wavefunction.backend_numba.ShellStruct(L, center, center_ind, coeffs, exps, index, size)[source]
Bases:
StructRefProxy
- class pysisyphus.wavefunction.backend_numba.ShellStructType(*args, **kwargs)[source]
Bases:
StructRef
- pysisyphus.wavefunction.backend_numba.get_1el_ints_cart(shells_a, func_dict, components, shells_b=None, R=array([0., 0., 0.]), **kwargs)[source]
- pysisyphus.wavefunction.backend_numba.get_2c_ints_cart(shells_a, shells_b, func_dict, components, symmetric=True, R=array([0., 0., 0.]))[source]
17.1.1.25.6. pysisyphus.wavefunction.backend_numba_multipole module
- pysisyphus.wavefunction.backend_numba_multipole.factorial2(n)[source]
Double factorial for positive integer arguments and 0 and -1.
- Return type:
int
- pysisyphus.wavefunction.backend_numba_multipole.get_1el_ints_cart(shells, func_dict, components, shells_b, **kwargs)[source]
- pysisyphus.wavefunction.backend_numba_multipole.get_multipole_ints_cart(Le, R, shellstructs_a, shellstructs_b=None)[source]
- pysisyphus.wavefunction.backend_numba_multipole.get_multipole_ints_cart_numba(Le, R, shells_a, shells_b, symmetric)[source]
- pysisyphus.wavefunction.backend_numba_multipole.get_multipole_ints_sph(Le, R, shells_a, shells_b=None)[source]
This function expects pysisyphus.Shells not Shellstructs
- pysisyphus.wavefunction.backend_numba_multipole.multipole1d(i, j, e, px, pa, pb, pr, base)[source]
1d-multipole integral.
17.1.1.25.7. pysisyphus.wavefunction.backend_python module
- pysisyphus.wavefunction.backend_python.get_1el_ints_cart(shells_a, func_dict, components, shells_b=None, screen=False, screen_func=None, **kwargs)[source]
- pysisyphus.wavefunction.backend_python.get_3c2el_ints_cart(shells_a, shells_aux)[source]
Cartesian 3-center-2-electron integrals.
DO NOT USE THESE INTEGRALS AS THEY ARE RETURNED FROM THIS METHOD. These integrals utilize recurrence relations that are only valid, when the resulting Cartesian integrals are transformed into spherical integrals.
Contrary to the general function 'get_1el_ints_cart', that supports different 'func_dict' arguments and cross-integrals between two different shells this function is less general. This function is restricted to '_3center2el_sph' and always uses only 1 set of shells and 1 set of auxiliary shells.
17.1.1.25.8. pysisyphus.wavefunction.bond_order module
- pysisyphus.wavefunction.bond_order.improved_mayer_bond_order(Pa, Pb, S, ao_centers, natoms)[source]
Improved Mayer bond-order.
Implements algorithm described in [1].
- Parameters:
Pa (
ndarray) -- Density matrix of alpha electrons of shape (nao, nao).Pb (
ndarray) -- Density matrix of beta electrons of shape (nao, nao).S (
ndarray) -- AO-overlap matrix of shape (nao, nao).ao_centers (
list) -- List of of length nao, denoting the atom center of each AO.natoms (
int) -- Number of atoms.
- Returns:
Bond-order matrix.
- Return type:
BOs
17.1.1.25.9. pysisyphus.wavefunction.cart2sph module
- pysisyphus.wavefunction.cart2sph.cart2sph_coeff(lx, ly, lz, m)[source]
Coefficient to convert Cartesian to spherical harmonics.
Eq. (15) in [1].
17.1.1.25. Paramters
- lx
Cartesian quantum number.
- ly
Cartesian quantum number.
- lz
Cartesian quantum number.
- m
Magnetic quantum number.
- returns:
Contribution of the given Cartesian basis function to the spherical harmonic Y^(lx + ly + lz)_m.
- rtype:
coeff
- pysisyphus.wavefunction.cart2sph.cart2sph_coeffs(l_max, **kwargs)[source]
- Return type:
Dict[int,ndarray]
- pysisyphus.wavefunction.cart2sph.cart2sph_coeffs_for(l, real=True, zero_small=True, zero_thresh=1e-14, use_mp=False)[source]
- Return type:
ndarray
- pysisyphus.wavefunction.cart2sph.cart2sph_nlms(l_max)[source]
- Return type:
Dict[int,Tuple[Tuple[int,int,int]]]
- pysisyphus.wavefunction.cart2sph.expand_sph_quantum_numbers(Lm, zero_thresh=1e-14, with_lmn_factors=False)[source]
Factors and Cart. angular momentum vectors for given sph. quantum numbers.
- Return type:
Tuple[ndarray,List[Tuple[int,int,int]]]
- pysisyphus.wavefunction.cart2sph.mp_cart2sph_coeff(lx, ly, lz, m)[source]
Higher precision Cartesian to Spherical transformation coefficients.
Eq. (15) in [1].
17.1.1.25. Paramters
- lx
Cartesian quantum number.
- ly
Cartesian quantum number.
- lz
Cartesian quantum number.
- m
Magnetic quantum number.
- returns:
Contribution of the given Cartesian basis function to the spherical harmonic Y^(lx + ly + lz)_m.
- rtype:
coeff
17.1.1.25.10. pysisyphus.wavefunction.density_numba module
- pysisyphus.wavefunction.density_numba.cart_gto3d_rel(La, axs, das, RA, RA2, result, cutoff=-36)[source]
- pysisyphus.wavefunction.density_numba.eval_density(shells, coords3d, P, precontr, rho, blk_size=100, thresh=1e-08, accumulate=False)[source]
Density evaluation on a grid using numba.
As (briefly) outlined in Section III C in [1].
17.1.1.25.11. pysisyphus.wavefunction.dma module
- pysisyphus.wavefunction.dma.closest_sites_and_weights(org_coords, sites, site_radii, thresh=1e-06)[source]
Determine closest expansion sites and associated weights.
Implements Stone's closest-neigbours-take-it-all-strategy. Alternatively, Vigne-Maeder could be implemented (eq. (78) in [4]).
- pysisyphus.wavefunction.dma.dma(wavefunction, sites, site_radii, exp_cutoff=-36.0, dens_thresh=1e-09, switch=4.0, addons=True)[source]
- pysisyphus.wavefunction.dma.get_C(lmax=4)[source]
Factors for complex->real transformation of multipoles.
Defined below A9 in [3].
- Return type:
dict[tuple[int,int],complex]
- pysisyphus.wavefunction.dma.get_W(xyz, lmkq, L_max=2)[source]
Multipole-shift matrix W.
See eq. (A11) in [3].
- Return type:
ndarray
- pysisyphus.wavefunction.dma.get_binom_lmkq(L_max=2)[source]
Bionmial-coefficient prefactor required for translating multipoles.
See eq. (2.7) in [1] and eq. (11) in [2]. Returns sqrt of the product of two binomial coefficients.
- Return type:
ndarray
- pysisyphus.wavefunction.dma.get_index_maps(L_max=2)[source]
Map between (l, m) keys and 1d indices in the multipole arrays.
The ordering here must match the ordering in the integral functions.
- Return type:
dict[tuple[int,int],int]
- pysisyphus.wavefunction.dma.get_radii(atoms)[source]
Default site radii from DMA. 0.325 Å for Hydrogen, 0.65 Å else.
- Return type:
ndarray
- pysisyphus.wavefunction.dma.get_redistribution_func(sites, site_radii, distributed_multipoles)[source]
- pysisyphus.wavefunction.dma.move_multipoles(L_max, lmkq, multipoles, P, S)[source]
Move multipoles from P to S using matrix multiplication.
Follows the approach outlined in [3].
- Return type:
ndarray
- pysisyphus.wavefunction.dma.move_multipoles_gen(L_max, lmkq, Q, P, S)[source]
Move multipoles from P to S using matrix multiplication.
Follows the approach outlined in [3]. The code below is generated with 'gen_m2m.py' in the 'scripts' subdirectory. It is basically the unrolled matrix multiplication.
The code below works up to quadrupoles.
- Return type:
ndarray
17.1.1.25.12. pysisyphus.wavefunction.excited_states module
- pysisyphus.wavefunction.excited_states.ct_numbers(C, occ, Ts, nfrags, frag_ao_map)[source]
Charge-transfer numbers.
This function is based on [1]; a different implementation is described in the SI of [3].
- Return type:
ndarray[Any,dtype[float]]
- pysisyphus.wavefunction.excited_states.ct_numbers_for_states(wf, frags, Ta, Tb=None)[source]
Charge-Transfer number for a given wavefunction and fragments.
- Parameters:
wf (
Wavefunction) -- Wavefunction object.frags (
List[List[int]]) -- List of lists of integers, containing the atom indices of the respective fragments.Ta (
ndarray[Any,dtype[float]]) -- Alpha-spin transition density matrices of shape (nstates, occ_a, virt_a).Tb (
Optional[ndarray[Any,dtype[float]]], default:None) -- Beta-spin transition density matrices of shape (nstates, occ_b, virt_b).
- Returns:
Array of shape (nstates, nfrags, nfrags), containing the charge-transfer numbers of every state.
- Return type:
omegas
- pysisyphus.wavefunction.excited_states.detachment_attachment_density(diff_dens, atol=1e-12, verbose=False)[source]
Calculation of detachment and attachment densities in the MO-basis.
Based on [4]. As described in the paper, both density-matrices are positive semidefinite.
- Parameters:
diff_dens (
ndarray) -- 2d array containing a difference density in the MO basis w/ shape (nmos, nmos).atol (default:
1e-12) -- Positive float; absolute tolerance used in the checks.
- Returns:
detach_dens -- 2d array containing the detachment density in the MO basis w/ shape (nmos, nmos).
attach_dens -- 2d array containing the attachment density in the MO basis w/ shape (nmos, nmos).
- pysisyphus.wavefunction.excited_states.get_state_to_state_transition_density(T_a, T_b)[source]
State-to-state transition density.
See eq. (17) in [5], which is a simplification of eq. (15) in [5]. For TD-DFT with a potentially non-vanishing Y vector this function can be called two times. First with X[a] and X[b], and then Y[a] and Y[b]. Finally both matrices can be added to yield the matrix on the RHS of eq. (17) in [5].
- Parameters:
T_a (
ndarray[Any,dtype[float]]) -- Transition density matrix for state A of shape (occ, virt).T_b (
ndarray[Any,dtype[float]]) -- Transition density matrix for state B of shape (occ, virt).
- Returns:
State-to-state transition density of shape (occ+virt, occ+virt).
- Return type:
T_ab
- pysisyphus.wavefunction.excited_states.make_density_matrices_for_root(rootm1, restricted, Xa, Ya, Xb, Yb, ov_corr_a=None, ov_corr_b=None, Ca=None, Cb=None, renorm=True)[source]
Create relaxed/unrelaxed alpha and beta density matrices for an ES.
- pysisyphus.wavefunction.excited_states.make_mo_density_matrix_for_root(X, Y, restricted, ov_corr=None)[source]
Construct (relaxed) density matrix from X, Y (and occ-virt. correction).
- Parameters:
X (
ndarray) -- 2d-array containing excitation CI-coefficients w/ shape (nocc, nvirt).Y (
ndarray) -- 2d-array containing deexcitation CI-coefficients w/ shape (nocc, nvirt).restricted (
bool) -- Whether the X and Y vectors were produced from a restricted calculation.ov_corr (
Optional[ndarray], default:None) -- occ-virt/virt-occ correction, as obtained from ES gradient calculations.
- Returns:
(Relaxed) density matrix in MO basis.
- Return type:
P
- pysisyphus.wavefunction.excited_states.mo_inds_from_tden(T, ci_thresh)[source]
Indices (from, to) for CI-coefficients above a threshold.
- Return type:
Tuple[ndarray[Any,dtype[int]],ndarray[Any,dtype[int]],ndarray[Any,dtype[float]]]
- pysisyphus.wavefunction.excited_states.norm_ci_coeffs(Xa, Ya, Xb=None, Yb=None, restricted_norm=0.5, unrestricted_norm=1.0)[source]
Normalize transition density matrices.
- Return type:
Tuple[ndarray[Any,dtype[float]],ndarray[Any,dtype[float]]]
- target_norm = (N*X)**2 - (N*Y)**2
= N**2 * (X**2 - Y**2)
N**2 = target_norm / (X**2 - Y**2) N = sqrt(target_norm / (X**2 - Y**2))
- pysisyphus.wavefunction.excited_states.nto_overlaps(ntos_1, lambdas_1, ntos_2, lambdas_2, ao_ovlp)[source]
NTOS are expected to be given in columns.
- pysisyphus.wavefunction.excited_states.ovlp(from_A, to_A, vecA, from_B, to_B, vecB, S_MO)[source]
Overlap between two transition orbital pairs.
According to Eq. (9)
- Return type:
ndarray[Any,dtype[float]]
- pysisyphus.wavefunction.excited_states.parse_tden(T, thresh)[source]
- Return type:
Tuple[List[frozenset],ndarray[Any,dtype[int]],ndarray[Any,dtype[int]],ndarray[Any,dtype[float]]]
- pysisyphus.wavefunction.excited_states.rAB(TXA, TYA, TXB, TYB, S_MO, exc_thresh=0.05, deexc_thresh=0.02)[source]
Transition-orbital-pair overlaps.
See 'Transition orbital projection approach for excited state tracking' in J. Chem. Phys. 156, 214104 (2022); https://doi.org/10.1063/5.0081207
- Parameters:
TXA (
ndarray[Any,dtype[float]]) -- Excitation coefficient (X) vector for 1 state at geometry A.TYA (
ndarray[Any,dtype[float]]) -- Deexcitation coefficient (Y) vector for 1 state at geometry A.TXB (
ndarray[Any,dtype[float]]) -- Excitation coefficient (X) vector for 1 state at geometry B.TYB (
ndarray[Any,dtype[float]]) -- Deexcitation coefficient (Y) vector for 1 state at geometry B.S_MO (
ndarray[Any,dtype[float]]) -- Matrix containing overlaps between the MOs at geometry A and B.exc_thresh (
float, default:0.05) -- Coefficient threshold up to which CI-coefficients from TXA and TXA are still considered.deexc_thresh (
float, default:0.02) -- Coefficient threshold up to which CI-coefficients from TYA and TYA are still considered.
- Return type:
float
- pysisyphus.wavefunction.excited_states.tden_overlaps(C_1, ci_coeffs1, C_2, ci_coeffs2, S_AO)[source]
Transition density overlaps.
- Parameters:
mo_coeffs1 (ndarray, shape (MOs, AOs)) -- MO coefficient matrix. MOs are expected to be in columns.
mo_coeffs2 (ndarray) -- See mo_coeffs1.
ci_coeffs1 (ndarray, shape(occ. MOs, MOs)) -- CI-coefficient matrix.
ci_coeffs2 (ndarray, shape(occ. MOs, MOs)) -- See ci_coeffs1.
S_AO (ndarray, shape(AOs1, AOs2)) -- Double molcule AO overlaps.
- pysisyphus.wavefunction.excited_states.to_pairs(arr_a, arr_b)[source]
Zip two iterables to a list of frozensets.
- Return type:
List[frozenset]
17.1.1.25.13. pysisyphus.wavefunction.gdma_int module
17.1.1.25.14. pysisyphus.wavefunction.gen_ints module
- class pysisyphus.wavefunction.gen_ints.CartGTO3d(i, j, k, a, Xa, Ya, Za)[source]
Bases:
Function3D Cartesian Gaussian function; not normalized.
- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(i, j, k, a, Xa, Ya, Za)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.CartGTOShell(La_tot, a, Xa, Ya, Za)[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La_tot, a, Xa, Ya, Za)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.Coulomb(a, A, b, B, C=None)[source]
Bases:
TwoCenter1dNucleus at C.
- default_assumptions: ClassVar[StdFactKB] = {}
- class pysisyphus.wavefunction.gen_ints.CoulombShell(La_tot, Lb_tot, a, b, A, B, C=(0.0, 0.0, 0.0))[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La_tot, Lb_tot, a, b, A, B, C=(0.0, 0.0, 0.0))[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.DiagQuadrupole3dShell(La_tot, Lb_tot, a, b, A, B, C=(0.0, 0.0, 0.0))[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La_tot, Lb_tot, a, b, A, B, C=(0.0, 0.0, 0.0))[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.ERI(ia, ja, ka, ib, jb, kb, ic, jc, kc, id_, jd, kd, N, a, b, c, d, A, B, C, D)[source]
Bases:
FunctionVariables named according to libreta paper [3].
- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(ia, ja, ka, ib, jb, kb, ic, jc, kc, id_, jd, kd, N, a, b, c, d, A, B, C, D)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.ERIShell(La_tot, Lb_tot, Lc_tot, Ld_tot, a, b, c, d, A, B, C, D)[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La_tot, Lb_tot, Lc_tot, Ld_tot, a, b, c, d, A, B, C, D)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.Kinetic1d(a, A, b, B, C=None)[source]
Bases:
TwoCenter1d- default_assumptions: ClassVar[StdFactKB] = {}
- class pysisyphus.wavefunction.gen_ints.Kinetic3d(La, Lb, a, b, A, B)[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La, Lb, a, b, A, B)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.Kinetic3dShell(La_tot, Lb_tot, a, b, A, B)[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La_tot, Lb_tot, a, b, A, B)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.Multipole1d(a, A, b, B, C=None)[source]
Bases:
TwoCenter1d1d multipole-moment integral of order 'e', between primitive 1d Gaussians Ga = G_i(a, r, A) and Gb = G_j(b, r, B) with Cartesian quantum number i and j, exponents a and b, centered at A (B). The origin of the multipole expansion is at C.
- default_assumptions: ClassVar[StdFactKB] = {}
- class pysisyphus.wavefunction.gen_ints.Multipole3d(La, Lb, a, b, A, B, Le, C)[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La, Lb, a, b, A, B, Le, C)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.Multipole3dShell(La_tot, Lb_tot, a, b, A, B, Le_tot=0, C=(0.0, 0.0, 0.0))[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La_tot, Lb_tot, a, b, A, B, Le_tot=0, C=(0.0, 0.0, 0.0))[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.Overlap1d(a, A, b, B, C=None)[source]
Bases:
TwoCenter1d- default_assumptions: ClassVar[StdFactKB] = {}
- class pysisyphus.wavefunction.gen_ints.Overlap3dShell(La_tot, Lb_tot, a, b, A, B)[source]
Bases:
FunctionWhole shell of 3d overlap integrals for a given L pair over primitive gaussians.
- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La_tot, Lb_tot, a, b, A, B)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.SpinOrbit(i, k, m, j, l, n, N, mu, a, b, A, B, C)[source]
Bases:
Function1-electron spin-orbit interaction integral for Cartesian direction μ.
- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(i, k, m, j, l, n, N, mu, a, b, A, B, C)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.SpinOrbitShell(La_tot, Lb_tot, a, b, A, B, C=(0.0, 0.0, 0.0))[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La_tot, Lb_tot, a, b, A, B, C=(0.0, 0.0, 0.0))[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.ThreeCenterTwoElectron(ia, ja, ka, ib, jb, kb, ic, jc, kc, N, a, b, c, A, B, C)[source]
Bases:
ThreeCenterTwoElectronBase- aux_vrr = 'cart'
- default_assumptions: ClassVar[StdFactKB] = {}
- class pysisyphus.wavefunction.gen_ints.ThreeCenterTwoElectronBase(ia, ja, ka, ib, jb, kb, ic, jc, kc, N, a, b, c, A, B, C)[source]
Bases:
Functionhttps://pubs.rsc.org/en/content/articlelanding/2004/CP/b413539c
There is an error in the base case (00|0). One must divide by sqrt(eta + gamma), not multiply.
- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(ia, ja, ka, ib, jb, kb, ic, jc, kc, N, a, b, c, A, B, C)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.ThreeCenterTwoElectronShell(La_tot, Lb_tot, Lc_tot, a, b, c, A, B, C)[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La_tot, Lb_tot, Lc_tot, a, b, c, A, B, C)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.ThreeCenterTwoElectronSph(ia, ja, ka, ib, jb, kb, ic, jc, kc, N, a, b, c, A, B, C)[source]
Bases:
ThreeCenterTwoElectronBase- aux_vrr = 'sph'
- default_assumptions: ClassVar[StdFactKB] = {}
- class pysisyphus.wavefunction.gen_ints.ThreeCenterTwoElectronSphShell(La_tot, Lb_tot, Lc_tot, a, b, c, A, B, C)[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La_tot, Lb_tot, Lc_tot, a, b, c, A, B, C)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.TwoCenter1d(a, A, b, B, C=None)[source]
Bases:
Expr- property AB
Relative coordinate/Gaussian separation X_AB.
- property K
- property P
Center-of-charge coordinate.
- property PA
Relative coordinate/Gaussian separation X_PA.
- property PB
Relative coordinate/Gaussian separation X_PB.
- property PC
Relative coordinate/Gaussian separation X_PC.
- default_assumptions: ClassVar[StdFactKB] = {}
- property mu
Reduced exponent mu.
- property p
Total exponent p.
- class pysisyphus.wavefunction.gen_ints.TwoCenterTwoElectron(ia, ja, ka, ib, jb, kb, N, a, b, A, B)[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(ia, ja, ka, ib, jb, kb, N, a, b, A, B)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.TwoCenterTwoElectronShell(La_tot, Lb_tot, a, b, A, B)[source]
Bases:
Function- default_assumptions: ClassVar[StdFactKB] = {}
- classmethod eval(La_tot, Lb_tot, a, b, A, B)[source]
Returns a canonical form of cls applied to arguments args.
17.1.1.25. Explanation
The
eval()method is called when the classclsis about to be instantiated and it should return either some simplified instance (possible of some other class), or if the classclsshould be unmodified, return None.Examples of
eval()for the function "sign"@classmethod def eval(cls, arg): if arg is S.NaN: return S.NaN if arg.is_zero: return S.Zero if arg.is_positive: return S.One if arg.is_negative: return S.NegativeOne if isinstance(arg, Mul): coeff, terms = arg.as_coeff_Mul(rational=True) if coeff is not S.One: return cls(coeff) * cls(terms)
- class pysisyphus.wavefunction.gen_ints.boys(*args)
Bases:
AppliedUndef- default_assumptions: ClassVar[StdFactKB] = {}
- name: str = 'boys'
- pysisyphus.wavefunction.gen_ints.gen_integral_exprs(int_func, L_maxs, kind, maps=None, sph=False)[source]
- pysisyphus.wavefunction.gen_ints.make_c_func(repls, reduced, args=None, name=None, doc_str='')[source]
- pysisyphus.wavefunction.gen_ints.make_py_func(repls, reduced, args=None, name=None, doc_str='', return_array=True)[source]
- pysisyphus.wavefunction.gen_ints.render_c_funcs(exprs_Ls, args, base_name, doc_func, add_imports=None, comment='')[source]
- pysisyphus.wavefunction.gen_ints.render_py_funcs(exprs_Ls, args, base_name, doc_func, add_imports=None, comment='')[source]
17.1.1.25.15. pysisyphus.wavefunction.helpers module
- class pysisyphus.wavefunction.helpers.BFType(value)[source]
Bases:
IntEnumAn enumeration.
- CARTESIAN = 1
- PURE_SPHERICAL = 2
- pysisyphus.wavefunction.helpers.get_l(l_inp)[source]
Convert shell label to angular moment quantum number l.
- Return type:
int
17.1.1.25.16. pysisyphus.wavefunction.localization module
- class pysisyphus.wavefunction.localization.JacobiSweepResult(is_converged, cur_cycle, C, P)[source]
Bases:
object-
C:
ndarray[Any,dtype[float]]
-
P:
float
-
cur_cycle:
int
-
is_converged:
bool
-
C:
- pysisyphus.wavefunction.localization.cholesky(C)[source]
Localization via pivoted Cholesky factorization.
See [2].
- Parameters:
C (
ndarray[Any,dtype[float]]) -- Matrix of molecular orbital coefficients to be localized. Shape is (naos, nmos).- Returns:
Localized molecular orbital coefficient matrix of shape (naos, nmos).
- Return type:
C_loc
- pysisyphus.wavefunction.localization.edmiston_ruedenberg(C, Lao, Sao, diis_cycles=5, max_cycles=100)[source]
Edmiston-Ruedenberg localization using DF integrals and DIIS.
This implementation follows [7].
The parameters given below are described for the case of MO localization, but this function can also be used for diabatization of electronic states. As the states obtained from TD-DFT and related methods are usually orthogonal, the overlap matrix 'Sao' must be the unit matrix. The tensor Lao should then be the contraction of the original density-fitting tensor w/ the densities of the different states or their transition densities. The shape will be (naux, nstates, nates). C has the shape (nstates, nstates) and can/should be chosen as a random rotation matrix, e.g.,
via scipy.stats.special_ortho_group.rvs(nstates)
Multiple runs may be required when a random matrix used to initiate the diabatization.
- Parameters:
C -- MO-coefficients of shape (naos, nmos); this means MOs must be organized in columns.
Lao -- Density fitting tensor obtained from contracting the 2e3c-matrix with 2c2e**-0.5 in the AO basis. Must have shape (naux, nao, nao).
Sao -- Overlap matrix of shape (nao, nao) in the AO basis.
diis_cycles (default:
5) -- Integer >= 0. If > 0, DIIS is employed to accelerate convergence.max_cycles (default:
100) -- Positive integer; maximum number of localization cycles.
- Returns:
Edmiston-Ruedenberg localized orbitals.
- Return type:
Crot
- pysisyphus.wavefunction.localization.edmiston_ruedenberg_cost_func(L)[source]
Edmiston-Ruedenberg cost function.
Eq. (2) in [7].
- pysisyphus.wavefunction.localization.edmiston_ruedenberg_grad(L)[source]
Edmiston-Ruedenberg gradient.
Eq. (5) in [7].
- pysisyphus.wavefunction.localization.foster_boys(C, dip_ints, **kwargs)[source]
Foster-Boys localization.
nMO nMO ___ ___ ╲ ╲ 2
╲ ╲ | | ╱ ╱ | <i|R|i> - <j|R|j> |
╱ ╱ | | ‾‾‾ ‾‾‾
i = 1 j = 1
or similarily (see eq. (6) in [4] or the appendix of [5])
- ╲ 2
╲ | | ╱ | <i|R|i> |
╱ | | ‾‾‾
i = 1
- Parameters:
dip_ints (
ndarray[Any,dtype[float]]) -- Dipole moment integral matrices with shape (3, naos, naos).C (
ndarray[Any,dtype[float]]) -- Matrix of molecular orbital coefficients to be localized. Shape is (naos, nmos).kwargs -- Additional keyword arguments that are passed jacobi_sweeps.
- Returns:
Localized molecular orbital coefficient matrix of shape (naos, nmos).
- Return type:
C_loc
- pysisyphus.wavefunction.localization.jacobi_sweeps(C, cost_func, ab_func, gamma_func=None, callback=None, max_cycles=100, dP_thresh=1e-08)[source]
Wrapper for 2x2 Jacobi-sweeps as used in localization/diabatization.
- Parameters:
C (
ndarray[Any,dtype[float]]) -- MO coefficient matrix (shape naos x nmos) or rotation matrix (nstates x nstates).cost_func (
Callable) -- Function to be maximized/minimized.ab_func (
Callable) -- Function that returns A & B values, used to calculate the angle for the 2x2 rotation.gamma_func (
Optional[Callable], default:None) -- Function that returns rotation angle in radius for given real numbers A and B.callback (
Optional[Callable], default:None) -- Function that is called after the 2x2 rotation took place. It takes three arguments: (gamma, j, k).max_cycles (
int, default:100) -- Maximum number of macro cycles.dP_thresh (
float, default:1e-08) -- Indicate convergence when change in cost function is equal or below this threshold.
- Returns:
Localized molecular orbital coefficient matrix of shape (naos, nmos).
- Return type:
C_loc
- pysisyphus.wavefunction.localization.pipek_mezey(C, S, ao_center_map, **kwargs)[source]
Pipek-Mezey localization using Mulliken population analysis.
Python adaption of code found in orbloc.f90 of Multiwfn 3.8. For now, only Mulliken population and localization exponent 2 is supported.
- Parameters:
C -- Matrix of molecular orbital coefficients to be localized. Shape is (naos, nmos).
S -- Overlap matrix of shape (naos x naos).
ao_center_map -- Mapping between atom indices and AOs, centered at the respective atom.
- Returns:
Localized molecular orbital coefficient matrix of shape (naos, nmos).
- Return type:
C_loc
17.1.1.25.17. pysisyphus.wavefunction.multipole module
- pysisyphus.wavefunction.multipole.get_multipole_moment(order, coords3d, origin, multipole_ints, nuc_charges, P)[source]
- Return type:
ndarray[Any,dtype[float]]
- order
Kind of requested multipoles: (1, dipole moment), (2, quadrupole moment).
- coords3d
Cartesian coordinates of shape (natoms, 3).
- origin
Origin of the multipole expansion. The supplied integrales must be calculated w.r.t. this origin.
- multipole_ints
Linear or quadratic multipole moment integrals.
- nuc_charges
Nuclear charges.
- P
Density matrix in the AO basis.
- pysisyphus.wavefunction.multipole.get_transition_multipole_moment(multipole_ints, C_a, C_b, T_a, T_b=None, occ_a=None, occ_b=None, full=False)[source]
Transition multipole moments from transition density matrices.
This functions relies on the following normalization
- closed shell: 0.5 = norm(X_a)**2 - norm(Y_a)**2
open shell: 1.0 = norm(X_a,X_b)**2 - norm(Y_a,Y_b)**2
with X_a,X_b indicating a vector formed by concatenating the elements of X_a and X_b for every state. See also Eq. (33) in [1].
- Parameters:
multipole_integrals -- Multipole integrals in the AO basis of the desired ordered, e.g., linear moment for transition dipole moments or quadratic moments for quadrupole transition moments.
C_a (
ndarray[Any,dtype[float]]) -- MO-coefficients for α-electrons.C_b (
ndarray[Any,dtype[float]]) -- MO-coefficients for β-electrons.T_a (
ndarray[Any,dtype[float]]) -- Numpy array containing transition density matrices of shape (nstates, occ, virt) or (occ, virt) in the α-electron space. The transition density must be given in the MO-basis!T_b (
Optional[ndarray[Any,dtype[float]]], default:None) -- See P_a. Optional. If not provided, P_b is derived from P_a.occ_a (
Optional[int], default:None) -- Number of α-electrons.occ_b (
Optional[int], default:None) -- Number of β-electrons.full (
bool, default:False) -- Use all MOs to transform multipole integrals. Needed for state-to-state transition denstiy matrices of shape (occ+virt, occ+virt).
- Returns:
Transition moments of the respective order for all provided states.
- Return type:
trans_moments
17.1.1.25.18. pysisyphus.wavefunction.normalization module
- pysisyphus.wavefunction.normalization.factorial2(n)[source]
Scipy 1.11 decided that (-1)!! is not 1 anymore!
Please see https://github.com/scipy/scipy/issues/18813.
17.1.1.25.19. pysisyphus.wavefunction.pop_analysis module
- class pysisyphus.wavefunction.pop_analysis.PopAnalysis(pop_a, pop_b, nuc_charges)[source]
Bases:
object- property alpha_spin_pop
- property beta_spin_pop
- property charges
-
nuc_charges:
ndarray
-
pop_a:
ndarray
-
pop_b:
ndarray
- property spin_pop
- property tot_charge
- pysisyphus.wavefunction.pop_analysis.make_iaos(C_occ, S_org, S_minao, S_cross)[source]
Intrinsic atomic orbitals.
[1] https://doi.org/10.1021/ct400687b
- Return type:
ndarray
17.1.1.25.20. pysisyphus.wavefunction.shells module
- class pysisyphus.wavefunction.shells.AOMixShells(shells, screen=False, ordering='native', backend=IntegralBackend.NUMBA_MULTIPOLE)[source]
Bases:
Shells- cart_order = (('',), ('x', 'y', 'z'), ('xx', 'yy', 'zz', 'xy', 'xz', 'yz'), ('xxx', 'yyy', 'zzz', 'xyy', 'xxy', 'xxz', 'xzz', 'yzz', 'yyz', 'xyz'), ('zzzz', 'yzzz', 'yyzz', 'yyyz', 'yyyy', 'xzzz', 'xyzz', 'xyyz', 'xyyy', 'xxzz', 'xxyz', 'xxyy', 'xxxz', 'xxxy', 'xxxx'))
- class pysisyphus.wavefunction.shells.FCHKShells(shells, screen=False, ordering='native', backend=IntegralBackend.NUMBA_MULTIPOLE)[source]
Bases:
Shells- cart_order = (('',), ('x', 'y', 'z'), ('xx', 'yy', 'zz', 'xy', 'xz', 'yz'), ('xxx', 'yyy', 'zzz', 'xyy', 'xxy', 'xxz', 'xzz', 'yzz', 'yyz', 'xyz'), ('zzzz', 'yzzz', 'yyzz', 'yyyz', 'yyyy', 'xzzz', 'xyzz', 'xyyz', 'xyyy', 'xxzz', 'xxyz', 'xxyy', 'xxxz', 'xxxy', 'xxxx'))
- sph_Ps = {0: [[1]], 1: [[1, 0, 0], [0, 0, 1], [0, 1, 0]], 2: [[0, 0, 1, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [1, 0, 0, 0, 0], [0, 0, 0, 0, 1]], 3: [[0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0], [1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1]], 4: [[0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1]]}
- class pysisyphus.wavefunction.shells.IntegralBackend(value)
Bases:
EnumAn enumeration.
- NUMBA = 2
- NUMBA_MULTIPOLE = 3
- PYTHON = 1
- class pysisyphus.wavefunction.shells.MoldenShells(shells, screen=False, ordering='native', backend=IntegralBackend.NUMBA_MULTIPOLE)[source]
Bases:
Shells- cart_order = (('',), ('x', 'y', 'z'), ('xx', 'yy', 'zz', 'xy', 'xz', 'yz'), ('xxx', 'yyy', 'zzz', 'xyy', 'xxy', 'xxz', 'xzz', 'yzz', 'yyz', 'xyz'), ('xxxx', 'yyyy', 'zzzz', 'xxxy', 'xxxz', 'yyyx', 'yyyz', 'zzzx', 'zzzy', 'xxyy', 'xxzz', 'yyzz', 'xxyz', 'yyxz', 'zzxy'))
- sph_Ps = {0: [[1]], 1: [[1, 0, 0], [0, 0, 1], [0, 1, 0]], 2: [[0, 0, 1, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [1, 0, 0, 0, 0], [0, 0, 0, 0, 1]], 3: [[0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0], [1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1]], 4: [[0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1]]}
- class pysisyphus.wavefunction.shells.ORCAMoldenShells(shells, screen=False, ordering='native', backend=IntegralBackend.NUMBA_MULTIPOLE)[source]
Bases:
Shells- sph_Ps = {0: [[1]], 1: [[1, 0, 0], [0, 0, 1], [0, 1, 0]], 2: [[0, 0, 1, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [1, 0, 0, 0, 0], [0, 0, 0, 0, 1]], 3: [[0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0], [-1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1]], 4: [[0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, -1, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -1]]}
- class pysisyphus.wavefunction.shells.ORCAShells(shells, screen=False, ordering='native', backend=IntegralBackend.NUMBA_MULTIPOLE)[source]
Bases:
Shells- sph_Ps = {0: [[1]], 1: [[0, 1, 0], [1, 0, 0], [0, 0, 1]], 2: [[0, 0, 1, 0, 0], [0, 1, 0, 0, 0], [0, 0, 0, 1, 0], [1, 0, 0, 0, 0], [0, 0, 0, 0, 1]], 3: [[0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0], [-1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, -1]], 4: [[0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0], [0, -1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, -1, 0], [-1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, -1]]}
- class pysisyphus.wavefunction.shells.Shell(L, center, coeffs, exps, center_ind, atomic_num=None, shell_index=None, index=None, sph_index=None)[source]
Bases:
object- property cart_powers
- property cart_size
Number of cartesian basis functions in the shell.
- property contr_depth
- property index: int
- property shell_index: int
- property size
Number of cartesian basis functions in the shell.
- property sph_size
Number of cartesian basis functions in the shell.
- property sph_slice
- class pysisyphus.wavefunction.shells.Shells(shells, screen=False, ordering='native', backend=IntegralBackend.NUMBA_MULTIPOLE)[source]
Bases:
object- property P_cart
Permutation matrix for Cartesian basis functions.
- property P_cart_native
- property P_sph
Permutation matrix for spherical basis functions.
- property P_sph_native
- property S_cart
- property S_sph
- property T_cart
- property T_sph
- property V_cart
- property V_sph
- property atoms_coords3d
- backend_module
'native' refers to the original ordering, as used in the QC program. The ordering will be reflected in the MO coefficient ordering. With 'native' the integrals calculated by pysisyphus must be reorderd, to match the native ordering of the MO coefficients.
- property cart2sph_coeffs
- property cart_ao_centers
- property cart_bf_num
- property cart_size
Number of cartesian basis functions.
- eval(xyz, spherical=True)[source]
Evaluate all basis functions at points xyz using generated code.
A possibly more efficient approach is discussed in III C of https://doi.org/10.1063/1.469408.
- static from_aomix(inp, *args, **kwargs)
- static from_fchk(inp, *args, **kwargs)
- static from_orca_json(inp, *args, **kwargs)
- get_1el_ints_sph(key=None, int_matrix=None, other=None, **kwargs)[source]
- Return type:
ndarray[Any,dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]
- get_S_cart(other=None)[source]
- Return type:
ndarray[Any,dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]
- get_S_sph(other=None)[source]
- Return type:
ndarray[Any,dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]
- get_T_cart()[source]
- Return type:
ndarray[Any,dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]
- get_T_sph()[source]
- Return type:
ndarray[Any,dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]
- get_V_cart(coords3d=None, charges=None, **kwargs)[source]
Nuclear attraction integrals.
Coordinates and charges must be either be omitted or given together. Alternatively, this function could also take one array that combines coords3c and charges (not yet implemented).
- get_V_sph(coords3d=None, charges=None)[source]
- Return type:
ndarray[Any,dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]
- get_dipole_ints_sph(origin)[source]
- Return type:
ndarray[Any,dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]
- get_quadrupole_ints_sph(origin)[source]
- Return type:
ndarray[Any,dtype[TypeVar(_ScalarType_co, bound=generic, covariant=True)]]
- property l_max
- property nprims
- property numba_shells
- property numba_shellstructs
- static screen_S(a, b, R, k=10)[source]
Returns False when distance R is below calculated threshold. Derived from the sympy code below.
from sympy import *
a, b, S, R = symbols("a b S R", real=True, positive=True) k = symbols("k", integer=True, positive=True) apb = a + b # 0 = S - 10**(-k) ovlp = (pi / apb)**Rational(3,2) * exp(-a*b / apb * R**2) - 10**(-k) print("ss-overlap:", ovlp) # Distance R, when ss-overlaps drops below 10**(-k) R = solve(ovlp, R)[0] print("R:", R)
- Parameters:
a -- Minimum exponent in shell a.
b -- Minimum exponent in shell b.
R -- Real space distance of shells a and b.
- sph_Ps = {0: array([[1.]]), 1: array([[1., 0., 0.], [0., 1., 0.], [0., 0., 1.]]), 2: array([[1., 0., 0., 0., 0.], [0., 1., 0., 0., 0.], [0., 0., 1., 0., 0.], [0., 0., 0., 1., 0.], [0., 0., 0., 0., 1.]]), 3: array([[1., 0., 0., 0., 0., 0., 0.], [0., 1., 0., 0., 0., 0., 0.], [0., 0., 1., 0., 0., 0., 0.], [0., 0., 0., 1., 0., 0., 0.], [0., 0., 0., 0., 1., 0., 0.], [0., 0., 0., 0., 0., 1., 0.], [0., 0., 0., 0., 0., 0., 1.]]), 4: array([[1., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 1., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 1., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 1., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 1., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 1., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 1., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 1., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 1.]]), 5: array([[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 1., 0., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 1., 0., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 1., 0., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 1., 0., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 1., 0., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 1., 0., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 1., 0., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 1., 0., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 1., 0.], [0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 1.]])}
- property sph_ao_centers
- property sph_size
Number of spherical basis.
17.1.1.25.21. pysisyphus.wavefunction.shells_molcas module
- class pysisyphus.wavefunction.shells_molcas.MolcasShells(shells, screen=False, ordering='native', backend=IntegralBackend.NUMBA_MULTIPOLE)[source]
Bases:
ShellsOverride some properties to accomodate the insane basis function ordering in OpenMolcas.
- property P_sph
Permutation matrix for mixed spherical/Cartesian basis functions.
Cartesian p-functions are assumed! Molcas stores the basis functions not per shell, but (more or less) per center and angular momentum. So for a given center the order would be something like this 1s, 2s, 3s, 1px, 2px, 1py, 2py, 1pz, 2pz, etc.
- property cart2sph_coeffs
Cartesian-to-spherical coefficients w/ Cartesian p-Orbitals.
17.1.1.25.22. pysisyphus.wavefunction.shells_pyscf module
- class pysisyphus.wavefunction.shells_pyscf.PySCFShells(shells, screen=False, ordering='native', backend=IntegralBackend.NUMBA_MULTIPOLE)[source]
Bases:
ShellsCartesian bfs >= d angular momentum are not normalized! S_ref = mol.intor("int1e_ovlp_cart") N = 1 / np.diag(S_ref)**0.5 ao *= N
- property P_cart
Permutation matrix for Cartesian basis functions.
- property P_sph
Permutation matrix for Spherical basis functions.
- cart_Ps = {0: array([[1]]), 1: array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]), 2: array([[1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1]]), 3: array([[1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1]]), 4: array([[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]])}
- sph_Ps = {0: [[1]], 1: [[1, 0, 0], [0, 0, 1], [0, 1, 0]], 2: [[0, 0, 0, 0, 1], [0, 0, 0, 1, 0], [0, 0, 1, 0, 0], [0, 1, 0, 0, 0], [1, 0, 0, 0, 0]], 3: [[0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0]], 4: [[0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0]]}
- pysisyphus.wavefunction.shells_pyscf.get_pyscf_P(shells, cartesian=True)[source]
Get Cartesian/spherical Pyscf-permutation matrix P.
--- PySCF ---> | |
- pysis P
v
- Parameters:
shells (
Shells) -- Pysisyphus Shells object.- Returns:
Permutation matrix. PySCF-order will be along columns, pysisyphus-order along the rows.
- Return type:
P.T
17.1.1.25.23. pysisyphus.wavefunction.shells_trexio module
- class pysisyphus.wavefunction.shells_trexio.TrexIOShells(shells, screen=False, ordering='native', backend=IntegralBackend.NUMBA_MULTIPOLE)[source]
Bases:
Shells- cart_order = (('',), ('x', 'y', 'z'), ('xx', 'xy', 'xz', 'yy', 'yz', 'zz'), ('xxx', 'xxy', 'xxz', 'xyy', 'xyz', 'xzz', 'yyy', 'yyz', 'yzz', 'zzz'), ('xxxx', 'xxxy', 'xxxz', 'xxyy', 'xxyz', 'xxzz', 'xyyy', 'xyyz', 'xyzz', 'xzzz', 'yyyy', 'yyyz', 'yyzz', 'yzzz', 'zzzz'))
- sph_Ps = {0: [[1]], 1: [[1, 0, 0], [0, 0, 1], [0, 1, 0]], 2: [[0, 0, 1, 0, 0], [0, 0, 0, 1, 0], [0, 1, 0, 0, 0], [0, 0, 0, 0, 1], [1, 0, 0, 0, 0]], 3: [[0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 0]], 4: [[0, 0, 0, 0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0], [0, 0, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 0, 0, 0]]}
17.1.1.25.24. pysisyphus.wavefunction.so_coupling module
- pysisyphus.wavefunction.so_coupling.Q(l)[source]
Maximum number of accumulated electrons for given angular momentum.
See A006331 in the On-Line Encyclopedia of Integer Sequences.
- Return type:
int
- pysisyphus.wavefunction.so_coupling.boettger_factors2d(Ls, Zs, bf_type)[source]
Boettger-factors to scale 1-electron SOC-integrals.
See eq. (18) in [4].
- Return type:
ndarray
- pysisyphus.wavefunction.so_coupling.get_cart_norms(mol)[source]
Get normalization matrix to ensure self-overlaps of 1.0.
In PySCF not all Cartesian basis functions have a self-overlap of 1.0. This can be fixed by this matrix.
- Parameters:
mol (gto.Mole) -- pyscf.gto.Mole object.
- Returns:
2d matrix of shape (nao, nao) containing normalization factors for 2-center integrals over Cartesian basis functions.
- Return type:
NN
- pysisyphus.wavefunction.so_coupling.get_effective_charge(atomic_num)[source]
Effective charge for SOC calculations as described in [1].
3d and 4d effective charges are disabled until I figure they are only useful for calculation w/ ECPs or w/o them ... this should be described in [2].
17.1.1.25. Parameter
- atomic_num
Atomic number, positive integer.
- returns:
Effective charge.
- rtype:
Zeff
- pysisyphus.wavefunction.so_coupling.run(wf, Xas, Yas, Xat, Yat, sing_ens, trip_ens, pysoc_norm=True, **kwargs)[source]
- pysisyphus.wavefunction.so_coupling.singlet_triplet_so_couplings(C, ints_ao, XpYs, XpYt)[source]
Singlet-triplet spin-orbit couplings from LR-TDDFT.
As described in [3].
- Parameters:
C (
ndarray) -- MO-coefficients, 2d array with shape (nao, nmo).ints_ao (
ndarray) -- Spin-orbit integrals in AO basis with shape (3, nao, nao).XpYs (
ndarray) -- X and Y vectors for singlet-singlet exictations from TD-DFT. 3d array with shape (nsings, nocc, nvirt).XpYs -- X and Y vectors for singlet-triplet exictations from TD-DFT. 3d array with shape (ntrips, nocc, nvirt).
- Returns:
2d array with shape ((nsings + 1) * ntrips, 3) containing the spin-orbit couplings in atomic units.
- Return type:
socs
17.1.1.25.25. pysisyphus.wavefunction.solid_harmonics module
17.1.1.25.26. pysisyphus.wavefunction.wavefunction module
- class pysisyphus.wavefunction.wavefunction.DensityType(value)
Bases:
EnumAn enumeration.
- RELAXED = 2
- UNRELAXED = 1
- class pysisyphus.wavefunction.wavefunction.Wavefunction(atoms, coords, charge, mult, unrestricted, occ, C, bf_type, shells=None, ecp_electrons=None, mo_ens=None, strict=True, warn_charge=4)[source]
Bases:
object- property C_occ
- property C_virt
- property P
- property P_tot
- property S
- property S_from_C
Reconstructed overlap-matrix from 1 = C.T @ S @ C.
It will have the same BFType as the underlying orbitals!
- property ao_center_map: Dict[int, List[int]]
- property ao_centers: List[int]
- property atom_num
- property coords3d
- property densities
- property dipole_moment: ndarray[Any, dtype[float]]
- static from_aomix(inp, *args, **kwargs)
- static from_fchk(inp, *args, **kwargs)
- static from_molden(inp, *args, **kwargs)
- static from_orca_bson(inp, *args, **kwargs)
- static from_orca_json(inp, *args, **kwargs)
- static from_orca_molden(inp, *args, **kwargs)
- get_quadrupole_moment(P=None, origin=None, kind='coc')[source]
- Return type:
ndarray[Any,dtype[float]]
- get_transition_multipole_moment(order, T_a, T_b=None, origin=None, kind='coc', full=False)[source]
- Return type:
ndarray[Any,dtype[float]]
- property has_shells
- property is_cartesian: bool
- property masses
- property mo_num
- property nuc_charges
- oscillator_strength(exc_ens, trans_moms)[source]
Oscillator strength from TDMs and excitation energies.
- Return type:
ndarray[Any,dtype[float]]
- property quadrupole_moment: ndarray[Any, dtype[float]]