-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RHF with H2 errors #119
Comments
Hi Matt, It is a problem with DIIS not dealing well with small systems. It does need fixing, but I have been procrastinating on it. You can simply disable DIIS if the system is small (~5 electrons or so)
|
Ok, thanks. Glad to know it's not just me doing something silly. Unfortunately that doesn't seem to help. When I run: using Fermi
@molecule {
H 0.0 0.0 0.0
H 0.76 0.0 0.0
}
@set basis sto-3g
@set diis false
wfn = @energy rhf I get what looks like the same error. |
Oh, interesting. If you use a larger basis such as |
Looks like |
Can you try |
Ok, that's seems to work: using Fermi
@molecule {
H 0.0 0.0 0.0
H 0.76 0.0 0.0
}
@set basis sto-3g
@set diis false
@set oda false
wfn = @energy rhf outputs: ================================================================================
| Hartree-Fock |
| Module by |
| G.J.R Aroeira and M.M. Davis |
================================================================================
Collecting necessary integrals...
Done in 0.00009 s
Using GWH Guess
Molecule:
H 0.000000000000 0.000000000000 0.000000000000
H 0.760000000000 0.000000000000 0.000000000000
Charge: 0 Multiplicity: 1
Nuclear repulsion: 0.6962858038
Number of AOs: 2
Number of Doubly Occupied Orbitals: 1
Number of Virtual Spatial Orbitals: 1
Guess Energy -1.81166646326759
Iter. E[RHF] ΔE Dᵣₘₛ t DIIS damp
--------------------------------------------------------------------------------
1 -1.1153806594 -1.115e+00 0.000e+00 0.00 false 0.00
2 -1.1153806594 0.000e+00 0.000e+00 0.00 false 0.00
3 -1.1153806594 0.000e+00 0.000e+00 0.00 false 0.00
4 -1.1153806594 0.000e+00 0.000e+00 0.00 false 0.00
5 -1.1153806594 0.000e+00 0.000e+00 0.00 false 0.00
--------------------------------------------------------------------------------
RHF done in 0.00s
@Final RHF Energy -1.115380659448 Eₕ
• Orbitals Summary
Orbital Energy Occupancy
1 -0.5703627667 ↿⇂
2 0.6508750828
✔ SCF Equations converged 😄
--------------------------------------------------------------------------------
⇒ Fermi Restricted Hartree--Fock Wave function
⋅ Basis: sto-3g
⋅ Energy: -1.1153806594478526
⋅ Occ. Spatial Orbitals: 1
⋅ Vir. Spatial Orbitals: 1
Convergence: ΔE => 0.00e+00 Dᵣₘₛ => 0.00e+00 With ================================================================================
| Hartree-Fock |
| Module by |
| G.J.R Aroeira and M.M. Davis |
================================================================================
Collecting necessary integrals...
Done in 0.00009 s
Using GWH Guess
Molecule:
H 0.000000000000 0.000000000000 0.000000000000
H 0.760000000000 0.000000000000 0.000000000000
Charge: 0 Multiplicity: 1
Nuclear repulsion: 0.6962858038
Number of AOs: 2
Number of Doubly Occupied Orbitals: 1
Number of Virtual Spatial Orbitals: 1
Guess Energy -1.81166646326759
Iter. E[RHF] ΔE Dᵣₘₛ t DIIS damp
--------------------------------------------------------------------------------
1 -1.1153806594 -1.115e+00 0.000e+00 0.00 false 0.00
2 -1.1153806594 0.000e+00 0.000e+00 0.00 false 0.00
3 -1.1153806594 0.000e+00 0.000e+00 0.00 false 0.00
ERROR: LoadError: LinearAlgebra.SingularException(2)
Stacktrace:
[1] checknonsingular
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/factorization.jl:19 [inlined]
[2] checknonsingular
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/factorization.jl:21 [inlined]
[3] #lu!#146
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:82 [inlined]
[4] #lu#153
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:279 [inlined]
[5] lu (repeats 2 times)
@ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:278 [inlined]
[6] \(A::Matrix{Float64}, B::Vector{Float64})
@ LinearAlgebra /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.7/LinearAlgebra/src/generic.jl:1142
[7] extrapolate(M::Fermi.DIIS.DIISManager{Float64, Float64}; add_res::Bool)
@ Fermi.DIIS ~/.julia/packages/Fermi/phTqJ/src/Core/DIIS.jl:83
[8] extrapolate
@ ~/.julia/packages/Fermi/phTqJ/src/Core/DIIS.jl:61 [inlined]
[9] macro expansion
@ ~/.julia/packages/Fermi/phTqJ/src/Methods/HartreeFock/RHF/RHFa.jl:182 [inlined]
[10] macro expansion
@ ./timing.jl:299 [inlined]
[11] macro expansion
@ ~/.julia/packages/Fermi/phTqJ/src/Methods/HartreeFock/RHF/RHFa.jl:133 [inlined]
[12] macro expansion
@ ./timing.jl:299 [inlined]
[13] Fermi.HartreeFock.RHF(ints::Fermi.Integrals.IntegralHelper{Float64, Fermi.Integrals.SparseERI, Fermi.Orbitals.AtomicOrbitals}, C::FermiMDArray{Float64, 2}, Λ::FermiMDArray{Float64, 2}, Alg::Fermi.HartreeFock.RHFa)
@ Fermi.HartreeFock ~/.julia/packages/Fermi/phTqJ/src/Methods/HartreeFock/RHF/RHFa.jl:132
[14] Fermi.HartreeFock.RHF(ints::Fermi.Integrals.IntegralHelper{Float64, Fermi.Integrals.SparseERI, Fermi.Orbitals.AtomicOrbitals}, Alg::Fermi.HartreeFock.RHFa)
@ Fermi.HartreeFock ~/.julia/packages/Fermi/phTqJ/src/Methods/HartreeFock/RHF/RHFa.jl:32
[15] Fermi.HartreeFock.RHF(Alg::Fermi.HartreeFock.RHFa)
@ Fermi.HartreeFock ~/.julia/packages/Fermi/phTqJ/src/Methods/HartreeFock/RHF/RHFa.jl:5
[16] Fermi.HartreeFock.RHF()
@ Fermi.HartreeFock ~/.julia/packages/Fermi/phTqJ/src/Methods/HartreeFock/RHF/RHF.jl:81
[17] top-level scope
@ ~/Dropbox (Simons Foundation)/workdir/Fermi.jl/hartree_fock_H2.jl:10
[18] include(fname::String)
@ Base.MainInclude ./client.jl:451
[19] top-level scope
@ REPL[6]:1
in expression starting at /home/mfishman/Dropbox (Simons Foundation)/workdir/Fermi.jl/hartree_fock_H2.jl:10 |
Okay, great. It's a good reminder to add numerical checks for these extrapolations schemes. They should be well behaved for larger systems though. |
Hi @gustavojra,
I'm finding the RHF on H2 fails:
with the output:
My setup is:
Maybe I'm running it wrong.
Thanks,
Matt
The text was updated successfully, but these errors were encountered: