2.2.1. moha.hf package

2.2.1.1. Submodules

2.2.1.2. moha.hf.auxiliary module

moha.hf.auxiliary.C_matrix(F, X, Norb)[source]

orbital energies and Coefficients matrix

moha.hf.auxiliary.D_matrix(C, Norb, occ)[source]

Density matrix

moha.hf.auxiliary.F_matrix(Hcore, G, Norb)[source]

Fock matrix

moha.hf.auxiliary.F_transform(F, X, Norb)[source]
moha.hf.auxiliary.G_matrix(D, Eri, Norb)[source]

G matrix

moha.hf.auxiliary.deltap(D, OLDD, nspatial)[source]
moha.hf.auxiliary.eint(a, b, c, d)[source]
moha.hf.auxiliary.energy(D, Hcore, F, Norb)[source]
moha.hf.auxiliary.orthogonalization_matrix(S, type='symmetric')[source]

Diagonlize the overlap matrix Schmidt symmetric canonical

2.2.1.3. moha.hf.hf_wavefunction module

class moha.hf.hf_wavefunction.HFWaveFunction(nelec, nspatial, occ={}, basis_set=None, coefficients=None, density_matrix=None, orbital_energies=None)[source]

Bases: moha.system.wavefunction.base.BaseWaveFunction

Hatree Fock wavefunction class.

nelecint

Number of electrons.

occdict

Occupation number of the wavefunction.

nspatialint

Number of spatial orbitals.

basis_setBasis

Basis set of the wavefunction.

coefficientsnp.ndarray

Coefficients of the wavefunction.

density_matrixnp.ndarray

Density matrix of the wavefunction.

orbital_energiesnp.ndarray

Orbital energies of the wavefunction.

ncoefficientsint

Number of coefficients.

nspinint

Number of spin orbital

spinint

Spin of the wavefunction

seniorityint

Seniority of the wavefunction

__init__(self, nelec, nspatial, basis_set=None, coefficients=None)

Initialize the wavefunction.

assign_nelec(self, nelec)

Assign the number of electrons.

assign_nspatial(self, nspatial)

Assign the number of spatial orbitals.

assign_occ(self, occ)

Assign the occupation number of the wavefunction.

assign_basis_set(self, basis_set)

Assign basis set of the wavefunction.

assign_coefficients(self, coefficients)

Assign coefficients of the wavefunction.

assign_density_matrix(self, density_matrix)

Assign density matrix of the wavefunction.

assign_orbital_energies(self, orbital_energies)

Assign orbital energies of the wavefunction.

assign_basis_set(basis_set)[source]

Assign the basis_set of the wavefunction.

basis_set

Basis set of the wavefunction.

assign_coefficients(coefficients)[source]

Assign the coefficients of the wavefunction.

coefficientsnp.ndarray

Parameters of the wavefunction.

assign_density_matrix(density_matrix)[source]

Assign density matrix of the wavefunction.

density_matrixnp.ndarray

Density matrix of the wavefunction.

assign_orbital_energies(orbital_energies)[source]

Assign orbital energies of the wavefunction.

orbital_energiesnp.ndarray

Orbital energies of the wavefunction.

property configuration

Return the cofiguration of the wavefunction.

cdict

Configuration of the wavefunction.

property ncoefficients

Return the number of wavefunction coefficients.

ncoefficientsint

Number of coefficients.

TypeError

If coefficients is not a np.ndarray instance.

property seniority

Return the seniority of the wavefunction.

Seniority of a Slater determinant is its number of unpaired electrons. The seniority of the wavefunction is the expected number of unpaired electrons.

seniorityint

Seniority of the wavefunction.

None means that all possible seniority are allowed.

2.2.1.4. moha.hf.scf module

class moha.hf.scf.PlainSCFSolver(ham, wfn, maxiter=50, E_conv=1e-08, D_conv=0.001)[source]

Bases: object

Plain self-consistent mean field method solver.

ham

Chemical Hamiltonian.

wfn

Hartree Fock wavefunction.

maxiterint

Maximum numer of iteration.

E_convfloat

Energy for convergence.

D_convfloat

Density for convergence.

__init__(self,ham,wfn,maxiter=50,E_conv=1.0E-8,D_conv=1.0E-3)

Initialize the solver.

kernel(self)

Kernel of the solver.

assign_hamiltonian(self,ham)

Assign the chemical Hamiltonian to the solver.

assign_wavefunction(self,wfn)

Assign the Hartree Fock wavefunction to the solver.

assign_maximum_iteration(self,maxiter)

Assign the maximum number of iteration to the solver.

assign_energy_convergence(self,E_conv)

Assign the energy for convergence to the solver.

assign_dentsity_convergence(self,D_conv)

Assign the density for convergence to the solver.

assign_density_convergence(D_conv)[source]

Assign the density for convergence to the solver.

D_convfloat

Density for convergence.

TypeError

If Density for convergence is not an integer.

ValueError

If Density for convergence is not a positive number.

assign_energy_convergence(E_conv)[source]

Assign the energy for convergence to the solver.

E_convfloat

Energy for convergence.

TypeError

If Energy for convergence is not an integer.

ValueError

If Energy for convergence is not a positive number.

assign_hamiltonian(ham)[source]

Assign the chemical Hamiltonian to the solver.

ham

Chemical Hamiltonian.

assign_maximum_iteration(maxiter)[source]

Assign the maximum number of iteration to the solver.

maxiterint

Maximum numer of iteration.

TypeError

If maximum number of iteration is not an integer.

ValueError

If maximum number of iteration is not a positive number.

assign_wavefunction(wfn)[source]

Assign the Hartree Fock wavefunction to the solver.

wfn

Hartree Fock wavefunction.

kernel()[source]

Kernel of the solver.

resultsdict

Hartree Fock calculation results.

2.2.1.5. moha.hf.scf_diis module

class moha.hf.scf_diis.DIISSCFSolver(ham, wfn, maxiter=50, E_conv=1e-08, D_conv=0.001)[source]

Bases: object

Direct Inversion in the Iterative Subspace (DIIS)” approach self-consistent mean field method solver.

ham

Chemical Hamiltonian.

wfn

Hartree Fock wavefunction.

maxiterint

Maximum numer of iteration.

E_convfloat

Energy for convergence.

D_convfloat

Density for convergence.

__init__(self,ham,wfn,maxiter=50,E_conv=1.0E-8,D_conv=1.0E-3)

Initialize the solver.

kernel(self)

Kernel of the solver.

assign_hamiltonian(self,ham)

Assign the chemical Hamiltonian to the solver.

assign_wavefunction(self,wfn)

Assign the Hartree Fock wavefunction to the solver.

assign_maximum_iteration(self,maxiter)

Assign the maximum number of iteration to the solver.

assign_energy_convergence(self,E_conv)

Assign the energy for convergence to the solver.

assign_dentsity_convergence(self,D_conv)

Assign the density for convergence to the solver.

assign_density_convergence(D_conv)[source]

Assign the density for convergence to the solver.

D_convfloat

Density for convergence.

TypeError

If Density for convergence is not an integer.

ValueError

If Density for convergence is not a positive number.

assign_energy_convergence(E_conv)[source]

Assign the energy for convergence to the solver.

E_convfloat

Energy for convergence.

TypeError

If Energy for convergence is not an integer.

ValueError

If Energy for convergence is not a positive number.

assign_hamiltonian(ham)[source]

Assign the chemical Hamiltonian to the solver.

ham

Chemical Hamiltonian.

assign_maximum_iteration(maxiter)[source]

Assign the maximum number of iteration to the solver.

maxiterint

Maximum numer of iteration.

TypeError

If maximum number of iteration is not an integer.

ValueError

If maximum number of iteration is not a positive number.

assign_wavefunction(wfn)[source]

Assign the Hartree Fock wavefunction to the solver.

wfn

Hartree Fock wavefunction.

kernel()[source]

Kernel of the solver.

resultsdict

Hartree Fock calculation results.

2.2.1.6. Module contents