API reference
TwoBody.Basis
TwoBody.BasisSet
TwoBody.ConstantPotential
TwoBody.ContractedBasis
TwoBody.CoulombPotential
TwoBody.DeltaPotential
TwoBody.ExponentialPotential
TwoBody.FunctionPotential
TwoBody.GaussianBasis
TwoBody.GaussianPotential
TwoBody.Hamiltonian
TwoBody.LinearPotential
TwoBody.NonRelativisticKinetic
TwoBody.Operator
TwoBody.PowerLawPotential
TwoBody.RelativisticCorrection
TwoBody.RelativisticKinetic
TwoBody.RestEnergy
TwoBody.SimpleGaussianBasis
TwoBody.UniformGridPotential
TwoBody.YukawaPotential
TwoBody.element
TwoBody.element
TwoBody.element
TwoBody.element
TwoBody.element
TwoBody.element
TwoBody.solve
TwoBody.Basis
— TypeBasis
is an abstract type.
TwoBody.BasisSet
— TypeBasisSet(basis1, basis2, ...)
\[\{ \phi_1, \phi_2, \phi_3, \cdots \}\]
The basis set is the input for Rayleigh–Ritz method. You can define the basis set like this:
\[\begin{aligned} +
API reference
TwoBody.Basis
TwoBody.BasisSet
TwoBody.ConstantPotential
TwoBody.ContractedBasis
TwoBody.CoulombPotential
TwoBody.DeltaPotential
TwoBody.ExponentialPotential
TwoBody.FunctionPotential
TwoBody.GaussianBasis
TwoBody.GaussianPotential
TwoBody.Hamiltonian
TwoBody.LinearPotential
TwoBody.NonRelativisticKinetic
TwoBody.Operator
TwoBody.PowerLawPotential
TwoBody.RelativisticCorrection
TwoBody.RelativisticKinetic
TwoBody.RestEnergy
TwoBody.SimpleGaussianBasis
TwoBody.UniformGridPotential
TwoBody.YukawaPotential
TwoBody.element
TwoBody.element
TwoBody.element
TwoBody.element
TwoBody.element
TwoBody.element
TwoBody.solve
TwoBody.Basis
— TypeBasis
is an abstract type.
TwoBody.BasisSet
— TypeBasisSet(basis1, basis2, ...)
\[\{ \phi_1, \phi_2, \phi_3, \cdots \}\]
The basis set is the input for Rayleigh–Ritz method. You can define the basis set like this:
\[\begin{aligned} \phi_1(r) &= \exp(-13.00773 ~r^2), \\ \phi_2(r) &= \exp(-1.962079 ~r^2), \\ \phi_3(r) &= \exp(-0.444529 ~r^2), \\ @@ -9,12 +9,12 @@ SimpleGaussianBasis(1.962079), SimpleGaussianBasis(0.444529), SimpleGaussianBasis(0.1219492), -)
TwoBody.ConstantPotential
— TypeConstantPotential(constant=1)
\[+ \mathrm{const.}\]
TwoBody.ContractedBasis
— TypeContractedBasis([c1, c2, ...], [basis1, basis2, ...])
\[\phi' = \sum_i c_i \phi_i\]
TwoBody.CoulombPotential
— TypeCoulombPotential(coefficient=1)
\[+ \mathrm{coeff.} \times \frac{1}{r}\]
TwoBody.DeltaPotential
— TypeDeltaPotential(coefficient=1)
\[+ \mathrm{coeff.} \times δ(r)\]
TwoBody.ExponentialPotential
— TypeExponentialPotential(coefficient=1, exponent=1)
\[+ \mathrm{coeff.} \times \exp(- \mathrm{expon.} \times r)\]
TwoBody.FunctionPotential
— TypeFunctionPotential(f)
\[+ f(r)\]
TwoBody.GaussianBasis
— TypeGaussianBasis(a=1, l=0, m=0)
\[\phi_i(r, θ, φ) = N _{il} r^l \exp(-a_i r^2) Y_l^m(θ, φ)\]
TwoBody.GaussianPotential
— TypeGaussianPotential(coefficient=1, exponent=1)
\[+ \mathrm{coeff.} \times \exp(- \mathrm{expon.} \times r^2)\]
TwoBody.Hamiltonian
— TypeHamiltonian(operator1, operator2, ...)
\[\hat{H} = \sum_i \hat{o}_i\]
The Hamiltonian is the input for each solver. This is an example for the non-relativistic Hamiltonian of hydrogen atom in atomic units:
\[\hat{H} = +)
TwoBody.ConstantPotential
— TypeConstantPotential(constant=1)
\[+ \mathrm{const.}\]
TwoBody.ContractedBasis
— TypeContractedBasis([c1, c2, ...], [basis1, basis2, ...])
\[\phi' = \sum_i c_i \phi_i\]
TwoBody.CoulombPotential
— TypeCoulombPotential(coefficient=1)
\[+ \mathrm{coeff.} \times \frac{1}{r}\]
TwoBody.DeltaPotential
— TypeDeltaPotential(coefficient=1)
\[+ \mathrm{coeff.} \times δ(r)\]
TwoBody.ExponentialPotential
— TypeExponentialPotential(coefficient=1, exponent=1)
\[+ \mathrm{coeff.} \times \exp(- \mathrm{expon.} \times r)\]
TwoBody.FunctionPotential
— TypeFunctionPotential(f)
\[+ f(r)\]
TwoBody.GaussianBasis
— TypeGaussianBasis(a=1, l=0, m=0)
\[\phi_i(r, θ, φ) = N _{il} r^l \exp(-a_i r^2) Y_l^m(θ, φ)\]
TwoBody.GaussianPotential
— TypeGaussianPotential(coefficient=1, exponent=1)
\[+ \mathrm{coeff.} \times \exp(- \mathrm{expon.} \times r^2)\]
TwoBody.Hamiltonian
— TypeHamiltonian(operator1, operator2, ...)
\[\hat{H} = \sum_i \hat{o}_i\]
The Hamiltonian is the input for each solver. This is an example for the non-relativistic Hamiltonian of hydrogen atom in atomic units:
\[\hat{H} = - \frac{1}{2} \nabla^2 - \frac{1}{r}\]
hamiltonian = Hamiltonian(
NonRelativisticKinetic(ℏ =1 , m = 1),
CoulombPotential(coefficient = -1),
-)
TwoBody.LinearPotential
— TypeLinearPotential(coefficient=1)
\[+ \mathrm{coeff.} \times r \]
TwoBody.NonRelativisticKinetic
— TypeNonRelativisticKinetic(ℏ=1, m=1)
\[-\frac{\hbar^2}{2m} \nabla^2\]
TwoBody.Operator
— TypeOperator
is an abstract type.
TwoBody.PowerLawPotential
— TypePowerLawPotential(coefficient=1, exponent=1)
\[+ \mathrm{coeff.} \times r^\mathrm{expon.}\]
TwoBody.RelativisticCorrection
— TypeRelativisticCorrection(c=1, m=1, n=2)
The p^{2n} term of the Taylor expansion:
\[\begin{aligned} +)
TwoBody.LinearPotential
— TypeLinearPotential(coefficient=1)
\[+ \mathrm{coeff.} \times r \]
TwoBody.NonRelativisticKinetic
— TypeNonRelativisticKinetic(ℏ=1, m=1)
\[-\frac{\hbar^2}{2m} \nabla^2\]
TwoBody.Operator
— TypeOperator
is an abstract type.
TwoBody.PowerLawPotential
— TypePowerLawPotential(coefficient=1, exponent=1)
\[+ \mathrm{coeff.} \times r^\mathrm{expon.}\]
TwoBody.RelativisticCorrection
— TypeRelativisticCorrection(c=1, m=1, n=2)
The p^{2n} term of the Taylor expansion:
\[\begin{aligned} \sqrt{p^2 c^2 + m^2 c^4} =& m \times c^2 \\ &+ 1 / 2 / m \times p^2 (n=1) \\ @@ -22,7 +22,7 @@ &+ 1 / 16 / m^5 / c^4 \times p^6 (n=3) \\ &- 5 / 128 / m^7 / c^6 \times p^8 (n=4) \\ &+ \cdots -\end{aligned}\]
Use c = 137.035999177
(from 2022 CODATA) in the atomic units.
TwoBody.RelativisticKinetic
— TypeRelativisticKinetic(c=1, m=1)
\[\sqrt{p^2 c^2 + m^2 c^4} - m c^2\]
Use c = 137.035999177
(from 2022 CODATA) in the atomic units.
TwoBody.RestEnergy
— TypeTwoBody.SimpleGaussianBasis
— TypeSimpleGaussianBasis(a=1)
\[\phi_i(r) = \exp(-a_i r^2)\]
Note: This basis is not normalized. This is only for s-wave.
TwoBody.UniformGridPotential
— TypeUniformGridPotential(R, V)
TwoBody.YukawaPotential
— TypeYukawaPotential(coefficient=1, exponent=1)
\[+ \mathrm{coeff.} \times \exp(- \mathrm{expon.} \times r) / r\]
TwoBody.element
— Methodelement(o::CoulombPotential, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} +\end{aligned}\]
Use c = 137.035999177
(from 2022 CODATA) in the atomic units.
TwoBody.RelativisticKinetic
— TypeRelativisticKinetic(c=1, m=1)
\[\sqrt{p^2 c^2 + m^2 c^4} - m c^2\]
Use c = 137.035999177
(from 2022 CODATA) in the atomic units.
TwoBody.RestEnergy
— TypeTwoBody.SimpleGaussianBasis
— TypeSimpleGaussianBasis(a=1)
\[\phi_i(r) = \exp(-a_i r^2)\]
Note: This basis is not normalized. This is only for s-wave.
TwoBody.UniformGridPotential
— TypeUniformGridPotential(R, V)
TwoBody.YukawaPotential
— TypeYukawaPotential(coefficient=1, exponent=1)
\[+ \mathrm{coeff.} \times \exp(- \mathrm{expon.} \times r) / r\]
TwoBody.element
— Methodelement(o::CoulombPotential, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} \langle \phi_{i} | \frac{1}{r} | \phi_{j} \rangle &= \iiint \phi_{i}^*(r) @@ -36,13 +36,13 @@ &= \underline{\frac{2\pi}{\alpha_i + \alpha_j}} \end{aligned}\]
Integral Formula:
\[\begin{aligned} \int_0^{\infty} r^{2n+1} \exp \left(-a r^2\right) ~\mathrm{d}r = \frac{n!}{2 a^{n+1}} -\end{aligned}\]
TwoBody.element
— Methodelement(o::Hamiltonian, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} +\end{aligned}\]
TwoBody.element
— Methodelement(o::Hamiltonian, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} H_{ij} &= \langle \phi_{i} | \hat{H} | \phi_{j} \rangle \\ &= \langle \phi_{i} | \hat{T} + \hat{V} | \phi_{j} \rangle \\ &= \langle \phi_{i} | \hat{T} | \phi_{j} \rangle + \langle \phi_{i} | \hat{V} | \phi_{j} \rangle \\ &= T_{ij} + V_{ij} -\end{aligned}\]
TwoBody.element
— Methodelement(o::LinearPotential, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} +\end{aligned}\]
TwoBody.element
— Methodelement(o::LinearPotential, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} \langle \phi_{i} | r | \phi_{j} \rangle &= \iiint \phi_{i}^*(r) @@ -56,7 +56,7 @@ &= \underline{\frac{2\pi}{(\alpha_i + \alpha_j)^2}} \end{aligned}\]
Integral Formula:
\[\begin{aligned} \int_0^{\infty} r^{2n+1} \exp \left(-a r^2\right) ~\mathrm{d}r = \frac{n!}{2 a^{n+1}} -\end{aligned}\]
TwoBody.element
— Methodelement(o::NonRelativisticKinetic, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} +\end{aligned}\]
TwoBody.element
— Methodelement(o::NonRelativisticKinetic, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} T_{ij} = \langle \phi_{i} | \hat{T} | \phi_{j} \rangle &= \iiint \mathrm{e}^{-\alpha_i r^2} @@ -159,7 +159,7 @@ \cdot 6 \cdot \frac{\alpha_i \alpha_j \pi^{\frac{3}{2}}}{(\alpha_i + \alpha_j)^{\frac{5}{2}}} } -\end{aligned}\]
TwoBody.element
— Methodelement(o::PowerLawPotential, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} +\end{aligned}\]
TwoBody.element
— Methodelement(o::PowerLawPotential, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} \langle \phi_{i} | r^n | \phi_{j} \rangle &= \iiint \phi_{i}^*(r) @@ -171,7 +171,7 @@ \int_0^\infty r^{n+2} \mathrm{e}^{-(\alpha_i + \alpha_j) r^2} ~\mathrm{d}r \\ &= 2\pi \times 2 \times \frac{\Gamma\left( \frac{n+3}{2} \right)}{2 (\alpha_i + \alpha_j)^{\frac{n+3}{2}}} \\ &= \underline{2\pi\frac{\Gamma\left( \frac{n+3}{2} \right)}{(\alpha_i + \alpha_j)^{\frac{n+3}{2}}}} -\end{aligned}\]
Integral Formula:
\[\int_0^{\infty} r^{n} \exp \left(-a r^2\right) ~\mathrm{d}r = \frac{\Gamma\left( \frac{n+1}{2} \right)}{2 a^{\frac{n+1}{2}}}\]
TwoBody.element
— Methodelement(SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} +\end{aligned}\]
Integral Formula:
\[\int_0^{\infty} r^{n} \exp \left(-a r^2\right) ~\mathrm{d}r = \frac{\Gamma\left( \frac{n+1}{2} \right)}{2 a^{\frac{n+1}{2}}}\]
TwoBody.element
— Methodelement(SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
\[\begin{aligned} S_{ij} = \langle \phi_{i} | \phi_{j} \rangle &= \iiint @@ -183,4 +183,4 @@ \int_0^\infty r^{2} \mathrm{e}^{-(\alpha_i + \alpha_j) r^2} ~\mathrm{d}r \\ &= 2\pi \times 2 \times \frac{1!!}{2^{2}} \sqrt{\frac{\pi}{a^{3}}} \\ &= \underline{\left( \frac{\pi}{\alpha_i + \alpha_j} \right)^{3/2}} -\end{aligned}\]
Integral Formula:
\[\int_0^{\infty} r^{2n} \exp \left(-a r^2\right) ~\mathrm{d}r = \frac{(2n-1)!!}{2^{n+1}} \sqrt{\frac{\pi}{a^{2n+1}}}\]
TwoBody.solve
— Methodsolve(hamiltonian::Hamiltonian, basisset::BasisSet)
This function returns the eigenvalues $E$ and eigenvectors $\pmb{c}$ for
\[\pmb{H} \pmb{c} = E \pmb{S} \pmb{c}.\]
The Hamiltonian matrix is defined as $H_{ij} = \langle \phi_{i} | \hat{H} | \phi_{j} \rangle$. The overlap matrix is defined as $S_{ij} = \langle \phi_{i} | \phi_{j} \rangle$.
Settings
This document was generated with Documenter.jl version 1.7.0 on Saturday 9 November 2024. Using Julia version 1.11.1.
Integral Formula:
\[\int_0^{\infty} r^{2n} \exp \left(-a r^2\right) ~\mathrm{d}r = \frac{(2n-1)!!}{2^{n+1}} \sqrt{\frac{\pi}{a^{2n+1}}}\]
TwoBody.solve
— Methodsolve(hamiltonian::Hamiltonian, basisset::BasisSet)
This function returns the eigenvalues $E$ and eigenvectors $\pmb{c}$ for
\[\pmb{H} \pmb{c} = E \pmb{S} \pmb{c}.\]
The Hamiltonian matrix is defined as $H_{ij} = \langle \phi_{i} | \hat{H} | \phi_{j} \rangle$. The overlap matrix is defined as $S_{ij} = \langle \phi_{i} | \phi_{j} \rangle$.