Methods Module
This module provides methods for solving integrals and other calculations.
Main.SchrödingerSolver.Methods.build_matrices
— Methodbuild_matrices(N, v, s, potential_gaussian_integral, potential_params)
Builds the Hamiltonian matrix H
and overlap matrix S
for the variational method.
Arguments
N
: Number of basis functions.v
: Width parameters of the Gaussian basis functions.s
: Centers of the Gaussian basis functions.potential_gaussian_integral
: Function to compute the potential energy integral.potential_params
: Additional parameters for the potential function.
Returns
(H, S)
: The Hamiltonian and overlap matrices.
Main.SchrödingerSolver.Methods.kinetic_integral
— Methodkinetic_integral(v1, s1, v2, s2)
Computes the kinetic energy integral between two Gaussian basis functions.
The kinetic energy integral is given by:
\[T_{ij} = \frac{v_1^{3/2} v_2^{3/2} \left( v_1 + v_2 - 2 v_1 v_2 (s_1 - s_2)^2 \right)}{\sqrt{\pi} (v_1 + v_2)^{5/2}} e^{- \frac{v_1 v_2 (s_1 - s_2)^2}{v_1 + v_2}}\]
Arguments
v1
: Width parameter of the first Gaussian basis function.s1
: Center of the first Gaussian basis function.v2
: Width parameter of the second Gaussian basis function.s2
: Center of the second Gaussian basis function.
Returns
T_ij
: The kinetic energy integral value.
Main.SchrödingerSolver.Methods.overlap_integral
— Methodoverlap_integral(v1, s1, v2, s2)
Computes the overlap integral between two Gaussian basis functions with parameters (v1, s1)
and (v2, s2)
.
The overlap integral is given by:
\[S_{ij} = \frac{\sqrt{v_1 v_2}}{\sqrt{\pi (v_1 + v_2)}} e^{- \frac{v_1 v_2 (s_1 - s_2)^2}{v_1 + v_2}}\]
Arguments
v1
: Width parameter of the first Gaussian basis function.s1
: Center of the first Gaussian basis function.v2
: Width parameter of the second Gaussian basis function.s2
: Center of the second Gaussian basis function.
Returns
S_ij
: The overlap integral value.
Main.SchrödingerSolver.Methods.potential_integral_xn
— Methodpotential_integral_xn(v1, s1, v2, s2, n)
Computes the potential energy integral for ( V(x) = x^n ) between two Gaussian basis functions.
Arguments
v1
,s1
: Parameters of the first Gaussian basis function.v2
,s2
: Parameters of the second Gaussian basis function.n
: The power of x in the potential function (integer from 0 to 4).
Returns
V_ij
: The potential energy integral value.
Main.SchrödingerSolver.Methods.solve_schrodinger
— Methodsolve_schrodinger(H, S, num_levels)
Solves the generalized eigenvalue problem for the Hamiltonian H
and overlap matrix S
.
Arguments
H
: Hamiltonian matrix.S
: Overlap matrix.num_levels
: Number of energy levels to compute.
Returns
(energies, states)
: The lowestnum_levels
eigenvalues and eigenvectors.