Hello developers,
I have been using OpenFermion (OF), which is a package for quantum computing. OF calls PSI4 for the ab initio calculation and parse the output to give a second-quantized Hamiltonian.
OF failed in many cases for the H3 neutral molecule ground state energy, in the sense that when you dissociate H3 as an equilateral triangle gradually, the HF energy would change abruptly after certain dissociation distance. I suspect it likely has something to do with the fact that PSI4 gives very unstable ground state energy at these distances. Below is the minimal input to reproduce the error.
I will show input 1, input 2, and then their outputs. I truncated output due to the length. But they should be easily reproduced using psi4 input
.
The observation is that, they have very different ROHF energy but the same FCI energy.
I don’t know how to explain that, and I don’t know which ROHF number to trust.
I want the energy to be consistent (meaning roughly the same) for H3 with near-identical geometry so that the H3 equilateral dissociation curve is smooth. And I hope there is a way to obtain the correct ROHF energy reliably.
Input 1
molecule mol {
H 0.0 3.1000000000000014 0.0
H 0.0 0.0 0.0
H 2.6846787517317607 1.5500000000000012 0.0
symmetry c1
}
set reference rohf
# Set global parameters of calculation.
set globals {
print_MOs true
basis sto-3g
freeze_core false
fail_on_maxiter False
df_scf_guess false
opdm true
tpdm true
soscf false
scf_type pk
maxiter 100
num_amps_print 1e6
r_convergence 1e-6
d_convergence 1e-6
e_convergence 1e-6
ints_tolerance EQUALITY_TOLERANCE
damping_percentage 0
}
set qc_module detci
hf_energy= energy('scf')
fci_energy = energy('fci')
Input 2
molecule mol {
H 0.0 3.1000000000000001 0.0
H 0.0 0.0 0.0
H 2.6846787517317598 1.5500000000000005 0.0
symmetry c1
}
set reference rohf
# Set global parameters of calculation.
set globals {
print_MOs true
basis sto-3g
freeze_core false
fail_on_maxiter False
df_scf_guess false
opdm true
tpdm true
soscf false
scf_type pk
maxiter 100
num_amps_print 1e6
r_convergence 1e-6
d_convergence 1e-6
e_convergence 1e-6
ints_tolerance EQUALITY_TOLERANCE
damping_percentage 0
}
set qc_module detci
hf_energy= energy('scf')
fci_energy = energy('fci')
Output 1
-----------------------------------------------------------------------
Psi4: An Open-Source Ab Initio Electronic Structure Package
Psi4 1.4a2.dev1055
Git: Rev {loriab-patch-1-hokru-soln} 921c1d2
---------------------------------------------------------
SCF
by Justin Turney, Rob Parrish, Andy Simmonett
and Daniel G. A. Smith
ROHF Reference
1 Threads, 500 MiB Core
---------------------------------------------------------
==> Geometry <==
Molecular point group: c1
Full point group: D3h
Geometry (in Angstrom), charge = 0, multiplicity = 2:
Center X Y Z Mass
------------ ----------------- ----------------- ----------------- -----------------
H -0.000000000000 0.000000000000 1.789785834488 1.007825032230
H -1.550000000000 0.000000000000 -0.894892917244 1.007825032230
H 1.550000000000 0.000000000000 -0.894892917244 1.007825032230
Running in c1 symmetry.
==> Pre-Iterations <==
SCF Guess: Superposition of Atomic Densities via on-the-fly atomic UHF (no occupation information).
-------------------------
Irrep Nso Nmo
-------------------------
A 3 3
-------------------------
Total 3 3
-------------------------
==> Iterations <==
Total Energy Delta E RMS |[F,P]|
@ROHF iter SAD: -0.81895913300920 -8.18959e-01 0.00000e+00
@ROHF iter 1: -1.02462826495174 -2.05669e-01 4.67186e-02 DIIS
@ROHF iter 2: -0.81904807260243 2.05580e-01 1.78670e-02 DIIS
@ROHF iter 3: -0.82429905280403 -5.25098e-03 2.72163e-02 DIIS
@ROHF iter 4: -0.81733207095513 6.96698e-03 2.29653e-02 DIIS
@ROHF iter 5: -0.81900780327629 -1.67573e-03 1.79226e-02 DIIS
@ROHF iter 6: -0.81948849457445 -4.80691e-04 1.81392e-02 DIIS
@ROHF iter 7: -0.81825999019787 1.22850e-03 1.77550e-02 DIIS
@ROHF iter 8: -0.82558019562478 -7.32021e-03 2.34476e-02 DIIS
@ROHF iter 9: -0.80773370032587 1.78465e-02 1.34632e-02 DIIS
@ROHF iter 10: -0.81507682881535 -7.34313e-03 1.50698e-02 DIIS
@ROHF iter 11: -1.09347817715635 -2.78401e-01 2.70754e-02 DIIS
@ROHF iter 12: -0.80333433494676 2.90144e-01 8.18897e-03 DIIS
@ROHF iter 13: -0.88110669412968 -7.77724e-02 4.43919e-02 DIIS
@ROHF iter 14: -1.10680822410247 -2.25702e-01 1.68274e-02 DIIS
@ROHF iter 15: -1.10089321361413 5.91501e-03 2.13647e-02 DIIS
@ROHF iter 16: -0.87413876923508 2.26754e-01 4.22718e-02 DIIS
@ROHF iter 17: -0.80291475256590 7.12240e-02 6.42437e-03 DIIS
@ROHF iter 18: -0.82040461366209 -1.74899e-02 2.12211e-02 DIIS
@ROHF iter 19: -0.81069052393353 9.71409e-03 1.16020e-02 DIIS
@ROHF iter 20: -0.80978189471290 9.08629e-04 1.01562e-02 DIIS
@ROHF iter 21: -0.80863392256624 1.14797e-03 8.51342e-03 DIIS
@ROHF iter 22: -0.80468403971157 3.94988e-03 1.07202e-02 DIIS
@ROHF iter 23: -1.10131664166576 -2.96633e-01 2.19974e-02 DIIS
@ROHF iter 24: -0.81146017154109 2.89856e-01 1.18683e-02 DIIS
@ROHF iter 25: -0.81284187287457 -1.38170e-03 1.33734e-02 DIIS
@ROHF iter 26: -1.08474128934510 -2.71899e-01 3.09169e-02 DIIS
@ROHF iter 27: -1.10658531285378 -2.18440e-02 1.70679e-02 DIIS
@ROHF iter 28: -1.10614793125730 4.37382e-04 1.77240e-02 DIIS
@ROHF iter 29: -1.10236290839220 3.78502e-03 2.07016e-02 DIIS
@ROHF iter 30: -1.10618344981553 -3.82054e-03 1.72371e-02 DIIS
@ROHF iter 31: -0.80394958725847 3.02234e-01 9.27080e-03 DIIS
@ROHF iter 32: -0.80291228980406 1.03730e-03 8.42285e-03 DIIS
@ROHF iter 33: -0.80875165935548 -5.83937e-03 1.60142e-02 DIIS
@ROHF iter 34: -0.80840037415664 3.51285e-04 1.55749e-02 DIIS
@ROHF iter 35: -0.80888287423803 -4.82500e-04 1.60143e-02 DIIS
@ROHF iter 36: -0.80819081935446 6.92055e-04 1.52825e-02 DIIS
@ROHF iter 37: -0.80856912378300 -3.78304e-04 1.56786e-02 DIIS
@ROHF iter 38: -0.80830050475233 2.68619e-04 1.53962e-02 DIIS
@ROHF iter 39: -0.80847243960933 -1.71935e-04 1.55771e-02 DIIS
@ROHF iter 40: -0.80835710334830 1.15336e-04 1.54559e-02 DIIS
@ROHF iter 41: -0.80843254264875 -7.54393e-05 1.55352e-02 DIIS
@ROHF iter 42: -0.80838245862410 5.00840e-05 1.54826e-02 DIIS
@ROHF iter 43: -0.80841540071944 -3.29421e-05 1.55172e-02 DIIS
@ROHF iter 44: -0.80839360255846 2.17982e-05 1.54943e-02 DIIS
@ROHF iter 45: -0.80840797016406 -1.43676e-05 1.55094e-02 DIIS
@ROHF iter 46: -0.80839847568326 9.49448e-06 1.54994e-02 DIIS
@ROHF iter 47: -0.80840473922804 -6.26354e-06 1.55060e-02 DIIS
@ROHF iter 48: -0.80840060250417 4.13672e-06 1.55016e-02 DIIS
@ROHF iter 49: -0.80840333256071 -2.73006e-06 1.55045e-02 DIIS
@ROHF iter 50: -0.80840152996258 1.80260e-06 1.55026e-02 DIIS
@ROHF iter 51: -0.80840271979607 -1.18983e-06 1.55039e-02 DIIS
@ROHF iter 52: -0.80840193426060 7.85535e-07 1.55030e-02 DIIS
@ROHF iter 53: -0.80840245280273 -5.18542e-07 1.55036e-02 DIIS
@ROHF iter 54: -0.80840211047506 3.42328e-07 1.55032e-02 DIIS
@ROHF iter 55: -0.80840233645692 -2.25982e-07 1.55035e-02 DIIS
@ROHF iter 56: -0.80840218727221 1.49185e-07 1.55033e-02 DIIS
@ROHF iter 57: -0.80840228575545 -9.84832e-08 1.55034e-02 DIIS
@ROHF iter 58: -0.80840222074147 6.50140e-08 1.55033e-02 DIIS
@ROHF iter 59: -0.80840226366015 -4.29187e-08 1.55034e-02 DIIS
@ROHF iter 60: -0.80840223532716 2.83330e-08 1.55034e-02 DIIS
@ROHF iter 61: -0.80840225403157 -1.87044e-08 1.55034e-02 DIIS
@ROHF iter 62: -0.80840224168383 1.23477e-08 1.55034e-02 DIIS
@ROHF iter 63: -0.80840224983506 -8.15123e-09 1.55034e-02 DIIS
@ROHF iter 64: -0.80840224445432 5.38074e-09 1.55034e-02 DIIS
@ROHF iter 65: -0.80840224800552 -3.55120e-09 1.55034e-02 DIIS
@ROHF iter 66: -0.80840224566177 2.34375e-09 1.55034e-02 DIIS
@ROHF iter 67: -0.80840224720874 -1.54696e-09 1.55034e-02 DIIS
@ROHF iter 68: -0.80840224618751 1.02123e-09 1.55034e-02 DIIS
@ROHF iter 69: -0.80840224686208 -6.74571e-10 1.55034e-02 DIIS
@ROHF iter 70: -0.80840224641602 4.46056e-10 1.55034e-02 DIIS
@ROHF iter 71: -0.80840224671100 -2.94981e-10 1.55034e-02 DIIS
@ROHF iter 72: -0.80840224651689 1.94111e-10 1.55034e-02 DIIS
@ROHF iter 73: -0.80840224664395 -1.27062e-10 1.55034e-02 DIIS
@ROHF iter 74: -0.80840224656024 8.37121e-11 1.55034e-02 DIIS
@ROHF iter 75: -0.80840224661622 -5.59777e-11 1.55034e-02 DIIS
@ROHF iter 76: -0.80840224657924 3.69769e-11 1.55034e-02 DIIS
@ROHF iter 77: -0.80840224660323 -2.39884e-11 1.55034e-02 DIIS
@ROHF iter 78: -0.80840224658712 1.61122e-11 1.55034e-02 DIIS
@ROHF iter 79: -0.80840224659835 -1.12268e-11 1.55034e-02 DIIS
@ROHF iter 80: -0.80840224659048 7.86970e-12 1.55034e-02 DIIS
@ROHF iter 81: -0.80840224659568 -5.20939e-12 1.55034e-02 DIIS
@ROHF iter 82: -0.80840224659236 3.32090e-12 1.55034e-02 DIIS
@ROHF iter 83: -0.80840224659425 -1.88227e-12 1.55034e-02 DIIS
@ROHF iter 84: -0.80840224659324 1.00431e-12 1.55034e-02 DIIS
@ROHF iter 85: -0.80840224659458 -1.33982e-12 1.55034e-02 DIIS
@ROHF iter 86: -0.80840224659274 1.84541e-12 1.55034e-02 DIIS
@ROHF iter 87: -0.80840224659452 -1.78635e-12 1.55034e-02 DIIS
@ROHF iter 88: -0.80840224659361 9.13714e-13 1.55034e-02 DIIS
@ROHF iter 89: -0.80840224659377 -1.59872e-13 1.55034e-02 DIIS
@ROHF iter 90: -0.80840224659331 4.61853e-13 1.55034e-02 DIIS
@ROHF iter 91: -0.80840224659378 -4.69846e-13 1.55034e-02 DIIS
@ROHF iter 92: -0.80840224659415 -3.72813e-13 1.55034e-02 DIIS
@ROHF iter 93: -0.80840224659355 6.03739e-13 1.55034e-02 DIIS
@ROHF iter 94: -0.80840224659341 1.37668e-13 1.55034e-02 DIIS
@ROHF iter 95: -0.80840224659392 -5.12479e-13 1.55034e-02 DIIS
@ROHF iter 96: -0.80840224659348 4.36096e-13 1.55034e-02 DIIS
@ROHF iter 97: -0.80840224659358 -9.90319e-14 1.55034e-02 DIIS
@ROHF iter 98: -0.80840224659367 -8.57092e-14 1.55034e-02 DIIS
@ROHF iter 99: -0.80840224659347 1.95843e-13 1.55034e-02 DIIS
@ROHF iter 100: -0.80840224659401 -5.37570e-13 1.55034e-02 DIIS
PsiException: Could not converge SCF iterations in 100 iterations.
Energy and/or wave function did not converge, but proceeding anyway.
==> Post-Iterations <==
Orbital Energies [Eh]
---------------------
Doubly Occupied:
1A -0.207067
Singly Occupied:
2A -0.042712
Virtual:
3A 0.011580
Final Occupation by Irrep:
A
DOCC [ 1 ]
SOCC [ 1 ]
@ROHF Final Energy: -0.80840224659401
=> Energetics <=
Nuclear Repulsion Energy = 0.5121069780677417
One-Electron Energy = -2.4329519292604904
Two-Electron Energy = 1.1124427045987375
Total Energy = -0.8084022465940113
---------------------------------------------------------
Configuration Interaction
(a 'D E T C I' module)
C. David Sherrill, Daniel G. A. Smith, and
Matt L. Leininger
---------------------------------------------------------
H0 Block Eigenvalue = -1.39998699
Simultaneous Expansion Method (Block Davidson Method)
Using 1 initial trial vectors
Iter Root Total Energy Delta E C RMS
@CI 0: 0 -1.399986986556 -1.9121E+00 1.4676E-15
Warning: Norm of correction (root 0) is < 1.0E-13
@CI 1: 0 -1.399986986556 0.0000E+00 1.3714E-15 c
==> Energetics <==
SCF energy = -0.808402246594011
Total CI energy = -1.399986986555535
==> FCI root 0 information <==
FCI Root 0 energy = -1.399986986555535
The 9 most important determinants:
* 1 -0.619973 ( 2, 0) 1AB 2AA 3AA
* 2 0.459916 ( 0, 1) 1AA 2AX
* 3 -0.435287 ( 1, 2) 1AA 3AX
* 4 -0.382980 ( 1, 1) 1AA 2AB 3AA
* 5 0.236993 ( 0, 2) 1AA 2AA 3AB
* 6 -0.094055 ( 1, 0) 1AX 3AA
* 7 0.051133 ( 2, 1) 2AX 3AA
* 8 0.018365 ( 0, 0) 1AX 2AA
Output 2
-----------------------------------------------------------------------
Psi4: An Open-Source Ab Initio Electronic Structure Package
Psi4 1.4a2.dev1055
Git: Rev {loriab-patch-1-hokru-soln} 921c1d2
---------------------------------------------------------
SCF
by Justin Turney, Rob Parrish, Andy Simmonett
and Daniel G. A. Smith
ROHF Reference
1 Threads, 500 MiB Core
---------------------------------------------------------
==> Geometry <==
Molecular point group: c1
Full point group: D3h
Geometry (in Angstrom), charge = 0, multiplicity = 2:
Center X Y Z Mass
------------ ----------------- ----------------- ----------------- -----------------
H 0.000000000000 0.000000000000 1.789785834488 1.007825032230
H -1.550000000000 0.000000000000 -0.894892917244 1.007825032230
H 1.550000000000 0.000000000000 -0.894892917244 1.007825032230
Running in c1 symmetry.
==> Pre-Iterations <==
SCF Guess: Superposition of Atomic Densities via on-the-fly atomic UHF (no occupation information).
-------------------------
Irrep Nso Nmo
-------------------------
A 3 3
-------------------------
Total 3 3
-------------------------
==> Iterations <==
Total Energy Delta E RMS |[F,P]|
@ROHF iter SAD: -0.81895913300919 -8.18959e-01 0.00000e+00
@ROHF iter 1: -1.02462826495174 -2.05669e-01 2.47354e-02 DIIS
@ROHF iter 2: -0.95016024840700 7.44680e-02 5.02761e-02 DIIS
@ROHF iter 3: -0.99605770375080 -4.58975e-02 4.35380e-02 DIIS
@ROHF iter 4: -1.04967524373170 -5.36175e-02 8.35149e-03 DIIS
@ROHF iter 5: -1.05474365190057 -5.06841e-03 1.85273e-02 DIIS
@ROHF iter 6: -1.04863546782488 6.10818e-03 8.70364e-04 DIIS
@ROHF iter 7: -1.04865114053343 -1.56727e-05 4.15913e-04 DIIS
@ROHF iter 8: -1.04864685121106 4.28932e-06 1.92684e-04 DIIS
@ROHF iter 9: -1.04864709143170 -2.40221e-07 2.37095e-05 DIIS
@ROHF iter 10: -1.04864710193089 -1.04992e-08 1.38084e-07 DIIS
Energy and wave function converged.
==> Post-Iterations <==
Orbital Energies [Eh]
---------------------
Doubly Occupied:
1A -0.185028
Singly Occupied:
2A -0.068033
Virtual:
3A 0.011745
Final Occupation by Irrep:
A
DOCC [ 1 ]
SOCC [ 1 ]
@ROHF Final Energy: -1.04864710193089
=> Energetics <=
Nuclear Repulsion Energy = 0.5121069780677421
One-Electron Energy = -2.4452074588905082
Two-Electron Energy = 0.8844533788918788
Total Energy = -1.0486471019308872
Computation Completed
Properties will be evaluated at 0.000000, 0.000000, 0.000000 [a0]
Properties computed using the SCF density matrix
Nuclear Dipole Moment: [e a0]
X: 0.0000 Y: 0.0000 Z: 0.0000
Electronic Dipole Moment: [e a0]
X: 0.0000 Y: 0.0000 Z: 0.0809
Dipole Moment: [e a0]
X: 0.0000 Y: 0.0000 Z: 0.0809 Total: 0.0809
Dipole Moment: [D]
X: 0.0000 Y: 0.0000 Z: 0.2057 Total: 0.2057
==> Molecular Orbitals <==
1 2 3
1 H1 s0 0.6941755 -0.0000000 0.7201039
2 H2 s0 0.4952751 0.7123810 -0.4976394
3 H3 s0 0.4952751 -0.7123810 -0.4976394
Ene -0.1850277 -0.0680326 0.0117453
Sym A A A
Occ 2 1 0
*** tstop() called on wireless-10-104-132-196.umd.edu at Mon Apr 18 12:20:00 2022
Module time:
user time = 0.22 seconds = 0.00 minutes
system time = 0.01 seconds = 0.00 minutes
total time = 1 seconds = 0.02 minutes
Total time:
user time = 0.45 seconds = 0.01 minutes
system time = 0.03 seconds = 0.00 minutes
total time = 1 seconds = 0.02 minutes
MINTS: Wrapper to libmints.
by Justin Turney
Calculation information:
Number of threads: 1
Number of atoms: 3
Number of AO shells: 3
Number of SO shells: 3
Number of primitives: 9
Number of atomic orbitals: 3
Number of basis functions: 3
Number of irreps: 1
Integral cutoff 0.00e+00
Number of functions per irrep: [ 3 ]
OEINTS: Overlap, kinetic, potential, dipole, and quadrupole integrals
stored in file 35.
Computing two-electron integrals...done
Computed 21 non-zero two-electron integrals.
Stored in file 33.
---------------------------------------------------------
Configuration Interaction
(a 'D E T C I' module)
C. David Sherrill, Daniel G. A. Smith, and
Matt L. Leininger
---------------------------------------------------------
Warning: iopen=0,opentype!=closed. Making iopen=1
==> CI Orbital and Space information <==
------------------------------------
Space Total A
------------------------------------
Nso 3 3
Nmo 3 3
Ndocc 1 1
Nsocc 1 1
------------------------------------
CI Spaces
------------------------------------
Dropped DOCC 0 0
Active 3 3
Dropped UOCC 0 0
------------------------------------
==> Setting up CI strings <==
There are 3 alpha and 3 beta strings
The CI space requires 9 (9.00E+00) determinants and 1 blocks
==> Transforming CI integrals <==
Presorting SO-basis two-electron integrals.
Sorting File: SO Ints (nn|nn) nbuckets = 1
Constructing frozen core operators
Starting first half-transformation.
Sorting half-transformed integrals.
First half integral transformation complete.
Starting second half-transformation.
Two-electron integral transformation complete.
==> Starting CI iterations <==
H0 Block Eigenvalue = -1.39998699
Simultaneous Expansion Method (Block Davidson Method)
Using 1 initial trial vectors
Iter Root Total Energy Delta E C RMS
@CI 0: 0 -1.399986986556 -1.9121E+00 1.3629E-15
Warning: Norm of correction (root 0) is < 1.0E-13
@CI 1: 0 -1.399986986556 0.0000E+00 2.7565E-15 c
==> Energetics <==
SCF energy = -1.048647101930887
Total CI energy = -1.399986986555534
==> FCI root 0 information <==
FCI Root 0 energy = -1.399986986555534
The 9 most important determinants:
* 1 0.512161 ( 1, 0) 1AX 3AA
* 2 -0.482488 ( 1, 2) 1AA 3AX
* 3 0.474268 ( 0, 1) 1AA 2AX
* 4 -0.461834 ( 2, 1) 2AX 3AA
* 5 0.164880 ( 0, 0) 1AX 2AA
* 6 0.151250 ( 2, 2) 2AA 3AX
* 7 0.105207 ( 1, 1) 1AA 2AB 3AA
* 8 0.055040 ( 0, 2) 1AA 2AA 3AB
* 9 0.050167 ( 2, 0) 1AB 2AA 3AA