### post: The PySCF tests a Viv SCF is held to date: 2026-09-23 Generated by `tools/pyscf_suite.py --emit` from `tools/pyscf_suite.tsv`, the assertions harvested from PySCF v2.5.0's own unit tests (pyscf/scf/test and pyscf/gto/test). Each constant is named for the file and line it came from: PST_RHF_406 is the number test_rhf.py asserts on line 406, and PST_RHF_406_P the places it asserts it to. A number the test computes instead of writing down ("mf.e_tot", "eref") is given as PySCF 2.5.0 computed it here. The rows are grouped by what a Viv code needs before it can reproduce them: T1 needs s and p functions and RHF, T1x one more SCF-driver feature, T2 d functions, T3 UHF or ROHF, T2+T3 both. The Schwarz row (T1s) asserts an inequality, not a value. A row flagged `path` depends on how the SCF got there -- the guess, the DIIS variant, how many cycles -- and is scored apart. Do not edit this file. ### # ---- tier and file codes used by the row tables ---- PST_TIER_T1 = 1 PST_TIER_T1S = 2 PST_TIER_T1X = 3 PST_TIER_T2 = 4 PST_TIER_T3 = 5 PST_TIER_T2_T3 = 6 PST_N_T1 = 17 PST_N_T1S = 1 PST_N_T1X = 8 PST_N_T2 = 33 PST_N_T3 = 19 PST_N_T2_T3 = 30 PST_N_ROWS = 108 PST_N_PATH = 6 PST_FILE_H2O = 1 PST_FILE_H2O_VDZ = 2 PST_FILE_HE = 3 PST_FILE_RHF = 4 PST_FILE_UHF = 5 PST_FILE_DIIS = 6 PST_FILE_ADDONS = 7 PST_FILE_BZ = 8 PST_FILE_MOLE = 9 PST_FILE_MOLEINTOR = 10 # ---- T1: 17 rows ---- # test_h2o.py:55 test_nr_rhf: water 6-31G; RHF conv_tol=1e-11; asserted -75.98394849812 PST_H2O_55 = -75.98394849812 PST_H2O_55_P = 9 # test_h2o.py:118 test_nr_rhf_no_mem: water 6-31G; RHF conv_tol=1e-11 max_memory=0 (direct J/K); asserted -75.98394849812 PST_H2O_118 = -75.98394849812 PST_H2O_118_P = 9 # test_h2o.py:131 test_nr_rhf_no_direct: water 6-31G; RHF conv_tol=1e-11 max_memory=0 direct_scf=False; asserted -75.98394849812 PST_H2O_131 = -75.98394849812 PST_H2O_131_P = 9 # test_h2o.py:156 test_energy_nuc: water; mol.energy_nuc(); asserted 9.18825841775 PST_H2O_156 = 9.18825841775 PST_H2O_156_P = 10 # test_h2o.py:164 test_nr_rhf_symm: water 6-31G symmetry=1; RHF conv_tol=1e-11; asserted -75.98394849812 PST_H2O_164 = -75.98394849812 PST_H2O_164_P = 9 # test_h2o.py:255 test_init_guess_1e: water 6-31G; norm(init_guess_by_1e) = |D| of the Hcore-guess density; asserted 5.3700828975288122 PST_H2O_255 = 5.370082897528812 PST_H2O_255_P = 9 # test_he.py:47 test_fock_1e: He cc-pVDZ; lowest eigenvalue of Hcore C = S C e; asserted -1.9936233377269388 PST_HE_47 = -1.9936233377269388 PST_HE_47_P = 12 # test_he.py:52 test_nr_rhf: He cc-pVDZ; RHF conv_tol=1e-10; asserted -2.8551604772427379 PST_HE_52 = -2.855160477242738 PST_HE_52_P = 10 # test_rhf.py:264 test_1e: H atom STO-3G spin=1; scf.RHF dispatches to ROHF HF1e: one electron, E = lowest Hcore eigenvalue; asserted -0.46658184955727555 PST_RHF_264 = -0.46658184955727555 PST_RHF_264_P = 9 # test_rhf.py:636 test_get_occ_extreme_case: He STO-3G; RHF; asserted -2.8077839575399737 PST_RHF_636 = -2.8077839575399737 PST_RHF_636_P = 12 # test_rhf.py:640 test_get_occ_extreme_case: He2+ STO-3G; RHF with zero electrons; asserted 0 PST_RHF_640 = 0.0 PST_RHF_640_P = 12 # test_rhf.py:757 test_natm_eq_0: model: no atoms, h=diag(0,1,2), S=I, (ii|ii)=0.2, 2 electrons; RHF on injected h, S and ERIs; asserted 0.2 PST_RHF_757 = 0.2 PST_RHF_757_P = 9 # test_diis.py:89 test_diis_restart: stretched water 6-31G; RHF default settings; asserted -75.44606939063496 PST_DIIS_89 = -75.44606939063496 PST_DIIS_89_P = 9 # test_mole.py:942 test_ao2mo: He STO-3G; (11|11) via mol.ao2mo(eye); asserted 1.0557129427350722 PST_MOLE_942 = 1.0557129427350722 PST_MOLE_942_P = 12 # test_mole.py:980 test_frac_particles: water-like STO-3G, O charge 2.5; max|V_nuc + sum_A Z_A rinv_A|; asserted 0 PST_MOLE_980 = 0.0 PST_MOLE_980_P = 12 # test_mole.py:520 test_c2s: -; max|cart2sph(0,'sp')*0.282094791773878143 - cart2sph(0,eye)|; asserted 0 PST_MOLE_520 = 0.0 PST_MOLE_520_P = 12 # test_mole.py:529 test_c2s: -; max|cart2sph(1,'sp')*0.488602511902919921 - cart2sph(1,eye)|; asserted 0 PST_MOLE_529 = 0.0 PST_MOLE_529_P = 12 # ---- T1s: 1 rows ---- # test_rhf.py:944 test_schwarz_condition: H2 at 4 Bohr, s basis [2.7],[1e2]; assertTrue((0 2|3 3) < Q_02 Q_33); measured = the integral, target = the bound; asserted True PST_RHF_944 = 1.9034224672478643e-09 PST_RHF_944_P = 0 # ---- T1x: 8 rows ---- # test_diis.py:54 test_input_diis: water 6-31G; RHF with DIIS=EDIIS, max_cycle=4; asserted -75.983875341696987 [path] PST_DIIS_54 = -75.98387534169699 PST_DIIS_54_P = 9 # test_diis.py:72 test_roll_back: stretched water 6-31G; RHF diis_space=4 diis_space_rollback=1 max_cycle=10; asserted -75.44751684382042 [path] PST_DIIS_72 = -75.44751684382042 PST_DIIS_72_P = 9 # test_diis.py:95 test_diis_restart: stretched water 6-31G; RHF with DIIS restored from the first run's file, max_cycle=3; asserted eref [path] PST_DIIS_95 = -75.44606939063586 PST_DIIS_95_P = 9 # test_addons.py:217 test_follow_state: water 6-31G; follow_state(mf) with no reference orbitals; asserted mf.e_tot PST_ADDONS_217 = -75.98394849810538 PST_ADDONS_217_P = 9 # test_addons.py:221 test_follow_state: water 6-31G; follow_state(mf, C[:,[0,1,2,3,5]]): occupation follows orbital overlap; asserted -75.178145727548511 PST_ADDONS_221 = -75.17814572754851 PST_ADDONS_221_P = 9 # test_addons.py:271 test_dynamic_level_shift: water 6-31G; RHF dynamic_level_shift, hcore guess, no DIIS, max_cycle=4; asserted -75.91511679613092 [path] PST_ADDONS_271 = -75.91511679613092 PST_ADDONS_271_P = 9 # test_addons.py:414 test_remove_lindep: H4 chain 0.5 A, STO-3G + s(0.002); RHF after remove_linear_dep_(threshold=1e-8, lindep=1e-9); asserted -1.6291001503057689 PST_ADDONS_414 = -1.629100150305769 PST_ADDONS_414_P = 7 # test_rhf.py:469 test_get_veff: water 6-31G cart; lib.fp(get_veff) on a seed(1) complex dm of shape (2,3,n,n), hermi=0, direct; asserted 4.9026999849223287 PST_RHF_469 = 4.902699984922329 PST_RHF_469_P = 12 # ---- T2: 33 rows ---- # test_h2o_vdz.py:45 test_nr_rhf: water cc-pVDZ sph; RHF conv_tol=1e-11; asserted -76.026765673119627 PST_H2O_VDZ_45 = -76.02676567311963 PST_H2O_VDZ_45_P = 9 # test_h2o_vdz.py:98 test_nr_rhf_no_mem: water cc-pVDZ sph; RHF conv_tol=1e-11 max_memory=0; asserted -76.026765673120565 PST_H2O_VDZ_98 = -76.02676567312056 PST_H2O_VDZ_98_P = 9 # test_h2o_vdz.py:111 test_nr_rhf_no_direct: water cc-pVDZ sph; RHF conv_tol=1e-11 max_memory=0 direct_scf=False; asserted -76.02676567311957 PST_H2O_VDZ_111 = -76.02676567311957 PST_H2O_VDZ_111_P = 9 # test_h2o_vdz.py:141 test_nr_rhf_symm: water cc-pVDZ sph symmetry=1; RHF conv_tol=1e-11; asserted -76.026765673119655 PST_H2O_VDZ_141 = -76.02676567311966 PST_H2O_VDZ_141_P = 9 # test_rhf.py:261 test_1e: water cc-pVDZ sph; ROHF HF1e: E = lowest Hcore eigenvalue + E_nuc; asserted -23.867818585778764 PST_RHF_261 = -23.867818585778764 PST_RHF_261_P = 9 # test_rhf.py:276 test_1e_symm: water cc-pVDZ sph symmetry=1; hf_symm HF1e; asserted -23.867818585778764 PST_RHF_276 = -23.867818585778764 PST_RHF_276_P = 9 # test_rhf.py:280 test_get_grad: water cc-pVDZ sph; max|orbital gradient| of the module mf (conv_tol=1e-10); asserted 0 PST_RHF_280 = 0.0 PST_RHF_280_P = 6 # test_rhf.py:301 test_energy_tot: N2 1 A cc-pVDZ symmetry=1; energy_tot(make_rdm1()) against e_tot; asserted n2mf.e_tot PST_RHF_301 = -108.92983838560946 PST_RHF_301_P = 9 # test_rhf.py:307 test_energy_tot: water cc-pVDZ sph; energy_elec of a seed(1) random nonsymmetric dm; asserted -59.332199154299914 PST_RHF_307 = -59.332199154299914 PST_RHF_307_P = 9 # test_rhf.py:356 test_scf: water cc-pVDZ sph; module mf: RHF conv_tol=1e-10; asserted -76.026765673119627 PST_RHF_356 = -76.02676567311963 PST_RHF_356_P = 9 # test_rhf.py:406 test_nr_rhf_cart: water cc-pVDZ cart (25 AOs); RHF default settings; asserted -76.027107008870573 PST_RHF_406 = -76.02710700887057 PST_RHF_406_P = 9 # test_rhf.py:435 test_level_shift: water cc-pVDZ sph; norm of level_shift(S, seed(1) d+d^T, Hcore, 0.5); asserted 94.230157719053565 PST_RHF_435 = 94.23015771905357 PST_RHF_435_P = 9 # test_rhf.py:444 test_get_veff: water cc-pVDZ sph; norm of get_veff on (d1+d1^T, d2+d2^T), seed(1); asserted 199.66041114502335 PST_RHF_444 = 199.66041114502335 PST_RHF_444_P = 9 # test_rhf.py:477 test_hf_symm: water cc-pVDZ sph symmetry=1; hf_symm RHF; asserted -76.026765673119627 PST_RHF_477 = -76.02676567311963 PST_RHF_477_P = 9 # test_rhf.py:516 test_n2_symm: N2 1 A cc-pVDZ symmetry=1; hf_symm RHF; asserted -108.9298383856092 PST_RHF_516 = -108.9298383856092 PST_RHF_516_P = 9 # test_rhf.py:547 test_dot_eri_dm: water cc-pVDZ sph; norm of J from dot_eri_dm(eri, seed(1) dm, hermi=0); asserted 77.035779188661465 PST_RHF_547 = 77.03577918866146 PST_RHF_547_P = 9 # test_rhf.py:548 test_dot_eri_dm: water cc-pVDZ sph; norm of K from the same call; asserted 46.253491700647963 PST_RHF_548 = 46.25349170064796 PST_RHF_548_P = 9 # test_rhf.py:689 test_complex_orbitals: water cc-pVDZ sph; RHF from a zero complex dm; asserted -76.026765673119627 PST_RHF_689 = -76.02676567311963 PST_RHF_689_P = 9 # test_rhf.py:693 test_complex_orbitals: water cc-pVDZ sph; RHF max_memory=0 from a zero complex dm; asserted -76.026765673119627 PST_RHF_693 = -76.02676567311963 PST_RHF_693_P = 9 # test_rhf.py:697 test_complex_orbitals: water cc-pVDZ sph; ROHF class on the closed shell, zero complex dm; asserted -76.026765673119627 PST_RHF_697 = -76.02676567311963 PST_RHF_697_P = 9 # test_rhf.py:701 test_complex_orbitals: water cc-pVDZ sph; ROHF class, max_memory=0, zero complex dm; asserted -76.026765673119627 PST_RHF_701 = -76.02676567311963 PST_RHF_701_P = 9 # test_rhf.py:711 test_update_from_chk: water cc-pVDZ sph; e_tot restored from the module mf's checkfile; asserted mf.e_tot PST_RHF_711 = -76.02676567311991 PST_RHF_711_P = 12 # test_rhf.py:728 test_as_scanner: water cc-pVDZ sph; scanner(mol) against the module mf; asserted mf.e_tot PST_RHF_728 = -76.02676567311991 PST_RHF_728_P = 9 # test_rhf.py:870 test_get_jk: water cc-pVDZ sph; norm of get_j (max_memory=0) on the seed(1) dm; asserted 77.035779188661465 PST_RHF_870 = 77.03577918866146 PST_RHF_870_P = 9 # test_rhf.py:881 test_get_jk: water cc-pVDZ sph; lib.fp(J) for dm = identity (int); asserted 1.6593323222866125 PST_RHF_881 = 1.6593323222866125 PST_RHF_881_P = 9 # test_rhf.py:882 test_get_jk: water cc-pVDZ sph; lib.fp(K) for dm = identity (int); asserted -1.4662135224053987 PST_RHF_882 = -1.4662135224053987 PST_RHF_882_P = 9 # test_rhf.py:897 test_get_vk_direct_scf: water cc-pVDZ sph; lib.fp(get_k) on the seed(1) dm, hermi=0; asserted -12.365527167710301 PST_RHF_897 = -12.365527167710301 PST_RHF_897_P = 12 # test_moleintor.py:96 test_intor_nr0: benzene cc-pVDZ + custom C4 basis, sph; sum|S| from int1e_ovlp_sph; asserted 622.29059965181796 PST_MOLEINTOR_96 = 622.290599651818 PST_MOLEINTOR_96_P = 11 # test_moleintor.py:100 test_intor_nr1: benzene cc-pVDZ + custom C4 basis, sph; sum|S| from intor_symmetric; asserted 622.29059965181796 PST_MOLEINTOR_100 = 622.290599651818 PST_MOLEINTOR_100_P = 11 # test_moleintor.py:104 test_intor_nr2: benzene cc-pVDZ + custom C4 basis, sph; sum|S| from intor_asymmetric; asserted 622.29059965181796 PST_MOLEINTOR_104 = 622.290599651818 PST_MOLEINTOR_104_P = 11 # test_moleintor.py:109 test_intor_nr_cross: benzene cc-pVDZ + custom C4 basis, sph; sum|S| over the shell slice (0, nbas/4, nbas/4, nbas); asserted 99.38188078749701 PST_MOLEINTOR_109 = 99.38188078749701 PST_MOLEINTOR_109_P = 11 # test_moleintor.py:303 test_nr_s8: He, Ne 3 A apart, cc-pVDZ sph; lib.fp of the s8-packed ERIs; asserted -10.685918926843847 PST_MOLEINTOR_303 = -10.685918926843847 PST_MOLEINTOR_303_P = 9 # test_bz.py:56 test_nr_rhf_high_cost: benzene cc-pVDZ (114 AOs); RHF conv_tol=1e-11; asserted -230.720825199 PST_BZ_56 = -230.720825199 PST_BZ_56_P = 9 # ---- T3: 19 rows ---- # test_h2o.py:72 test_nr_rohf: H2O+ 6-31G spin=1; ROHF conv_tol=1e-11; asserted -75.578396379589748 PST_H2O_72 = -75.57839637958975 PST_H2O_72_P = 9 # test_h2o.py:182 test_nr_rohf_symm: H2O+ 6-31G spin=1 symmetry; scf.RHF dispatches to ROHF, conv_tol=1e-11; asserted -75.578396379589748 PST_H2O_182 = -75.57839637958975 PST_H2O_182_P = 9 # test_h2o.py:80 test_nr_uhf: water 6-31G; UHF conv_tol=1e-11; asserted -75.98394849812 PST_H2O_80 = -75.98394849812 PST_H2O_80_P = 9 # test_h2o.py:124 test_nr_uhf_no_mem: water 6-31G; UHF conv_tol=1e-11 max_memory=0; asserted -75.98394849812 PST_H2O_124 = -75.98394849812 PST_H2O_124_P = 9 # test_h2o.py:138 test_nr_uhf_no_direct: water 6-31G; UHF conv_tol=1e-11 max_memory=0 direct_scf=False; asserted -75.98394849812 PST_H2O_138 = -75.98394849812 PST_H2O_138_P = 9 # test_h2o.py:153 test_level_shift_uhf: water 6-31G; UHF level_shift=0.2; asserted -75.98394849812 PST_H2O_153 = -75.98394849812 PST_H2O_153_P = 9 # test_h2o.py:190 test_nr_uhf_symm: water 6-31G symmetry=1; UHF conv_tol=1e-11; asserted -75.98394849812 PST_H2O_190 = -75.98394849812 PST_H2O_190_P = 9 # test_h2o.py:265 test_init_guess_1e: water 6-31G; norm of the ROHF Hcore-guess alpha density; asserted 5.3700828975288122/numpy.sqrt(2) PST_H2O_265 = 3.7972220323765264 PST_H2O_265_P = 9 # test_h2o.py:270 test_init_guess_1e: water 6-31G; same, from an ROHF object built on the symmetric molecule; asserted 5.3700828975288122/numpy.sqrt(2) PST_H2O_270 = 3.7972220323765264 PST_H2O_270_P = 9 # test_he.py:57 test_nr_uhf: He cc-pVDZ; UHF conv_tol=1e-10; asserted -2.8551604772427379 PST_HE_57 = -2.855160477242738 PST_HE_57_P = 10 # test_rhf.py:386 test_scf_negative_spin: water 6-31G spin=-2; ROHF conv_tol=1e-10; asserted -75.723654936331599 PST_RHF_386 = -75.7236549363316 PST_RHF_386_P = 9 # test_uhf.py:155 test_scf_negative_spin: water 6-31G spin=-2; UHF conv_tol=1e-10; asserted -75.726396909036637 PST_UHF_155 = -75.72639690903664 PST_UHF_155_P = 9 # test_uhf.py:109 test_1e: H atom STO-3G spin=-1; UHF, one electron; asserted -0.46658184955727555 PST_UHF_109 = -0.46658184955727555 PST_UHF_109_P = 9 # test_uhf.py:111 test_1e: H atom STO-3G spin=1 symmetry; UHF, one electron; asserted -0.46658184955727555 PST_UHF_111 = -0.46658184955727555 PST_UHF_111_P = 9 # test_uhf.py:392 test_get_occ_extreme_case: He STO-3G; UHF; asserted -2.8077839575399737 PST_UHF_392 = -2.8077839575399737 PST_UHF_392_P = 12 # test_uhf.py:396 test_get_occ_extreme_case: He2+ STO-3G; UHF with zero electrons; asserted 0 PST_UHF_396 = 0.0 PST_UHF_396_P = 12 # test_uhf.py:374 test_natm_eq_0: model of test_rhf.py:757 with spin=2; UHF on injected h, S and ERIs; asserted 1.0 PST_UHF_374 = 1.0 PST_UHF_374_P = 9 # test_uhf.py:359 test_get_veff: water 6-31G cart; lib.fp(UHF get_veff) on the seed(1) complex dm, hermi=0, direct; asserted -9.9614575705134953 PST_UHF_359 = -9.961457570513495 PST_UHF_359_P = 12 # test_addons.py:261 test_mom_occ: water 6-31G; ROHF + mom_occ from occupation [2,2,2,2,1,1]; asserted -75.723654936331542 PST_ADDONS_261 = -75.72365493633154 PST_ADDONS_261_P = 9 # ---- T2+T3: 30 rows ---- # test_h2o_vdz.py:61 test_nr_rohf: H2O+ cc-pVDZ spin=1; ROHF conv_tol=1e-11; asserted -75.627354109594179 PST_H2O_VDZ_61 = -75.62735410959418 PST_H2O_VDZ_61_P = 9 # test_h2o_vdz.py:66 test_nr_uhf: water cc-pVDZ sph; UHF conv_tol=1e-11; asserted -76.026765673119598 PST_H2O_VDZ_66 = -76.0267656731196 PST_H2O_VDZ_66_P = 9 # test_h2o_vdz.py:104 test_nr_uhf_no_mem: water cc-pVDZ sph; UHF conv_tol=1e-11 max_memory=0; asserted -76.02676567312075 PST_H2O_VDZ_104 = -76.02676567312075 PST_H2O_VDZ_104_P = 9 # test_h2o_vdz.py:118 test_nr_uhf_no_direct: water cc-pVDZ sph; UHF conv_tol=1e-11 max_memory=0 direct_scf=False; asserted -76.02676567311958 PST_H2O_VDZ_118 = -76.02676567311958 PST_H2O_VDZ_118_P = 9 # test_h2o_vdz.py:133 test_level_shift_uhf: water cc-pVDZ sph; UHF level_shift=0.2 (default conv_tol); asserted -76.026765673118078 PST_H2O_VDZ_133 = -76.02676567311808 PST_H2O_VDZ_133_P = 9 # test_h2o_vdz.py:158 test_nr_rohf_symm: H2O+ cc-pVDZ spin=1 symmetry; hf_symm ROHF conv_tol=1e-11; asserted -75.627354109593952 PST_H2O_VDZ_158 = -75.62735410959395 PST_H2O_VDZ_158_P = 9 # test_h2o_vdz.py:166 test_nr_uhf_symm: water cc-pVDZ sph symmetry=1; uhf_symm UHF conv_tol=1e-11; asserted -76.026765673119584 PST_H2O_VDZ_166 = -76.02676567311958 PST_H2O_VDZ_166_P = 9 # test_rhf.py:414 test_nr_rohf: H2O+ cc-pVDZ spin=1; ROHF default settings; asserted -75.627354109594179 PST_RHF_414 = -75.62735410959418 PST_RHF_414_P = 9 # test_rhf.py:498 test_hf_symm_rohf: H2O+ cc-pVDZ spin=1 symmetry=1; hf_symm ROHF; asserted -75.627354109594179 PST_RHF_498 = -75.62735410959418 PST_RHF_498_P = 9 # test_rhf.py:523 test_n2_symm_rohf: N2+ 1 A cc-pVDZ spin=1 symmetry=1; hf_symm ROHF; asserted -108.33899076078299 PST_RHF_523 = -108.33899076078299 PST_RHF_523_P = 9 # test_rhf.py:562 test_ghost_atm_meta_lowdin: O, ghost-H, H cc-pVDZ spin=1 symmetry; scf.RHF dispatches to ROHF; asserted -75.393287998638741 PST_RHF_562 = -75.39328799863874 PST_RHF_562_P = 9 # test_uhf.py:106 test_1e: water cc-pVDZ sph; UHF HF1e; asserted -23.867818585778764 PST_UHF_106 = -23.867818585778764 PST_UHF_106_P = 9 # test_uhf.py:115 test_get_grad: water cc-pVDZ spin=2; max|orbital gradient| of mf2 (UHF conv_tol=1e-10); asserted 0 PST_UHF_115 = 0.0 PST_UHF_115_P = 6 # test_uhf.py:123 test_energy_tot: water cc-pVDZ sph; UHF energy_elec of a seed(1) random dm pair; asserted 57.122667754846844 PST_UHF_123 = 57.122667754846844 PST_UHF_123_P = 9 # test_uhf.py:143 test_scf: water cc-pVDZ sph; module mf: UHF conv_tol=1e-14; asserted -76.026765673119627 PST_UHF_143 = -76.02676567311963 PST_UHF_143_P = 9 # test_uhf.py:175 test_nr_uhf_cart: water cc-pVDZ cart; UHF default settings; asserted -76.027107008870573 PST_UHF_175 = -76.02710700887057 PST_UHF_175_P = 9 # test_uhf.py:183 test_nr_uhf_symm_cart: water cc-pVDZ cart symmetry=1; UHF default settings; asserted -76.027107008870573 PST_UHF_183 = -76.02710700887057 PST_UHF_183_P = 9 # test_uhf.py:186 test_spin_square: water cc-pVDZ sph; of the module mf; asserted 0 PST_UHF_186 = 0.0 PST_UHF_186_P = 9 # test_uhf.py:193 test_uhf_symm: water cc-pVDZ sph symmetry=1; uhf_symm UHF; asserted -76.026765673119627 PST_UHF_193 = -76.02676567311963 PST_UHF_193_P = 9 # test_uhf.py:207 test_n2_symm: N2 1 A cc-pVDZ symmetry=1; uhf_symm UHF, closed shell; asserted -108.9298383856092 PST_UHF_207 = -108.9298383856092 PST_UHF_207_P = 9 # test_uhf.py:213 test_n2_symm: N2+ 1 A cc-pVDZ spin=1 symmetry=1; uhf_symm UHF; asserted -108.34691774091894 PST_UHF_213 = -108.34691774091894 PST_UHF_213_P = 9 # test_uhf.py:297 test_complex_orbitals: water cc-pVDZ sph; UHF from a zero complex dm pair; asserted -76.026765673119627 PST_UHF_297 = -76.02676567311963 PST_UHF_297_P = 9 # test_uhf.py:301 test_complex_orbitals: water cc-pVDZ sph; UHF max_memory=0 from a zero complex dm pair; asserted -76.026765673119627 PST_UHF_301 = -76.02676567311963 PST_UHF_301_P = 9 # test_uhf.py:308 test_make_asm_dm: water cc-pVDZ spin=2; det_ovlp of mf2's orbitals against its alpha/beta swap, closed-shell occupations; asserted 0.95208556738844452 PST_UHF_308 = 0.9520855673884445 PST_UHF_308_P = 6 # test_uhf.py:335 test_get_veff: water cc-pVDZ sph; norm of UHF get_veff on (d1+d1^T, d2+d2^T), seed(1); asserted 398.09239104094513 PST_UHF_335 = 398.09239104094513 PST_UHF_335_P = 9 # test_uhf.py:387 test_energy_tot1: N2 1 A cc-pVDZ symmetry=1; UHF energy_tot(make_rdm1()) against e_tot; asserted n2mf.e_tot PST_UHF_387 = -108.92983838560943 PST_UHF_387_P = 9 # test_uhf.py:453 test_max_cycle0: water cc-pVDZ sph; UHF max_cycle=0 from the minao guess; asserted -75.799022820714526 [path] PST_UHF_453 = -75.79902282071453 PST_UHF_453_P = 9 # test_uhf.py:457 test_max_cycle0: water cc-pVDZ sph; UHF max_cycle=0 again from the previous run's density; asserted -75.983602246415373 [path] PST_UHF_457 = -75.98360224641537 PST_UHF_457_P = 9 # test_uhf.py:465 test_custom_h1e: N2 1 A cc-pVDZ symmetry=1; UHF with get_hcore returning (h, h); asserted -108.9298383856092 PST_UHF_465 = -108.9298383856092 PST_UHF_465_P = 9 # test_uhf.py:471 test_custom_h1e: N2 1 A cc-pVDZ symmetry=1; UHF HF1e with (h, h) against eigh(h, S)[0][0] + E_nuc; asserted eref PST_UHF_471 = -2.2285171488607958 PST_UHF_471_P = 9 #| One row per assertion: tier code, file code, line, places, target, path flag. #| Split by tier so no literal passes the 512-value budget. def pst_rows_t1() { return [[1, 1, 55, 9, -75.98394849812, 0], [1, 1, 118, 9, -75.98394849812, 0], [1, 1, 131, 9, -75.98394849812, 0], [1, 1, 156, 10, 9.18825841775, 0], [1, 1, 164, 9, -75.98394849812, 0], [1, 1, 255, 9, 5.370082897528812, 0], [1, 3, 47, 12, -1.9936233377269388, 0], [1, 3, 52, 10, -2.855160477242738, 0], [1, 4, 264, 9, -0.46658184955727555, 0], [1, 4, 636, 12, -2.8077839575399737, 0], [1, 4, 640, 12, 0.0, 0], [1, 4, 757, 9, 0.2, 0], [1, 6, 89, 9, -75.44606939063496, 0], [1, 9, 942, 12, 1.0557129427350722, 0], [1, 9, 980, 12, 0.0, 0], [1, 9, 520, 12, 0.0, 0], [1, 9, 529, 12, 0.0, 0]] } def pst_rows_t1s() { return [[2, 4, 944, 0, 1.9034224672478643e-09, 0]] } def pst_rows_t1x() { return [[3, 6, 54, 9, -75.98387534169699, 1], [3, 6, 72, 9, -75.44751684382042, 1], [3, 6, 95, 9, -75.44606939063586, 1], [3, 7, 217, 9, -75.98394849810538, 0], [3, 7, 221, 9, -75.17814572754851, 0], [3, 7, 271, 9, -75.91511679613092, 1], [3, 7, 414, 7, -1.629100150305769, 0], [3, 4, 469, 12, 4.902699984922329, 0]] } def pst_rows_t2() { return [[4, 2, 45, 9, -76.02676567311963, 0], [4, 2, 98, 9, -76.02676567312056, 0], [4, 2, 111, 9, -76.02676567311957, 0], [4, 2, 141, 9, -76.02676567311966, 0], [4, 4, 261, 9, -23.867818585778764, 0], [4, 4, 276, 9, -23.867818585778764, 0], [4, 4, 280, 6, 0.0, 0], [4, 4, 301, 9, -108.92983838560946, 0], [4, 4, 307, 9, -59.332199154299914, 0], [4, 4, 356, 9, -76.02676567311963, 0], [4, 4, 406, 9, -76.02710700887057, 0], [4, 4, 435, 9, 94.23015771905357, 0], [4, 4, 444, 9, 199.66041114502335, 0], [4, 4, 477, 9, -76.02676567311963, 0], [4, 4, 516, 9, -108.9298383856092, 0], [4, 4, 547, 9, 77.03577918866146, 0], [4, 4, 548, 9, 46.25349170064796, 0], [4, 4, 689, 9, -76.02676567311963, 0], [4, 4, 693, 9, -76.02676567311963, 0], [4, 4, 697, 9, -76.02676567311963, 0], [4, 4, 701, 9, -76.02676567311963, 0], [4, 4, 711, 12, -76.02676567311991, 0], [4, 4, 728, 9, -76.02676567311991, 0], [4, 4, 870, 9, 77.03577918866146, 0], [4, 4, 881, 9, 1.6593323222866125, 0], [4, 4, 882, 9, -1.4662135224053987, 0], [4, 4, 897, 12, -12.365527167710301, 0], [4, 10, 96, 11, 622.290599651818, 0], [4, 10, 100, 11, 622.290599651818, 0], [4, 10, 104, 11, 622.290599651818, 0], [4, 10, 109, 11, 99.38188078749701, 0], [4, 10, 303, 9, -10.685918926843847, 0], [4, 8, 56, 9, -230.720825199, 0]] } def pst_rows_t3() { return [[5, 1, 72, 9, -75.57839637958975, 0], [5, 1, 182, 9, -75.57839637958975, 0], [5, 1, 80, 9, -75.98394849812, 0], [5, 1, 124, 9, -75.98394849812, 0], [5, 1, 138, 9, -75.98394849812, 0], [5, 1, 153, 9, -75.98394849812, 0], [5, 1, 190, 9, -75.98394849812, 0], [5, 1, 265, 9, 3.7972220323765264, 0], [5, 1, 270, 9, 3.7972220323765264, 0], [5, 3, 57, 10, -2.855160477242738, 0], [5, 4, 386, 9, -75.7236549363316, 0], [5, 5, 155, 9, -75.72639690903664, 0], [5, 5, 109, 9, -0.46658184955727555, 0], [5, 5, 111, 9, -0.46658184955727555, 0], [5, 5, 392, 12, -2.8077839575399737, 0], [5, 5, 396, 12, 0.0, 0], [5, 5, 374, 9, 1.0, 0], [5, 5, 359, 12, -9.961457570513495, 0], [5, 7, 261, 9, -75.72365493633154, 0]] } def pst_rows_t2_t3() { return [[6, 2, 61, 9, -75.62735410959418, 0], [6, 2, 66, 9, -76.0267656731196, 0], [6, 2, 104, 9, -76.02676567312075, 0], [6, 2, 118, 9, -76.02676567311958, 0], [6, 2, 133, 9, -76.02676567311808, 0], [6, 2, 158, 9, -75.62735410959395, 0], [6, 2, 166, 9, -76.02676567311958, 0], [6, 4, 414, 9, -75.62735410959418, 0], [6, 4, 498, 9, -75.62735410959418, 0], [6, 4, 523, 9, -108.33899076078299, 0], [6, 4, 562, 9, -75.39328799863874, 0], [6, 5, 106, 9, -23.867818585778764, 0], [6, 5, 115, 6, 0.0, 0], [6, 5, 123, 9, 57.122667754846844, 0], [6, 5, 143, 9, -76.02676567311963, 0], [6, 5, 175, 9, -76.02710700887057, 0], [6, 5, 183, 9, -76.02710700887057, 0], [6, 5, 186, 9, 0.0, 0], [6, 5, 193, 9, -76.02676567311963, 0], [6, 5, 207, 9, -108.9298383856092, 0], [6, 5, 213, 9, -108.34691774091894, 0], [6, 5, 297, 9, -76.02676567311963, 0], [6, 5, 301, 9, -76.02676567311963, 0], [6, 5, 308, 6, 0.9520855673884445, 0], [6, 5, 335, 9, 398.09239104094513, 0], [6, 5, 387, 9, -108.92983838560943, 0], [6, 5, 453, 9, -75.79902282071453, 1], [6, 5, 457, 9, -75.98360224641537, 1], [6, 5, 465, 9, -108.9298383856092, 0], [6, 5, 471, 9, -2.2285171488607958, 0]] } # ---- the constants test_mole.py:520/529 multiply by: cart2sph's s and p factors ---- PST_C2S_S = 0.28209479177387814 PST_C2S_P = 0.4886025119029199 # ---- the model of test_rhf.py:757 and test_uhf.py:374: no atoms, three orbitals, # h = diag(0, 1, 2), S = I, (ii|ii) = 0.2 and every other integral zero, 2 electrons ---- PST_MODEL_N = 3 PST_MODEL_NELEC = 2 PST_MODEL_U = 0.2 def pst_model_h() { return [[0.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 2.0]] } # ---- the Schwarz case, test_rhf.py:944: (0 2|3 3) against Q_02 Q_33 ---- PST_SCHWARZ_ERI = 2.0806986969282969e-10 PST_SCHWARZ_BOUND = 1.9034224672478643e-09 # ---- systems: atoms[natm,4] = (Z, x, y, z) in Bohr ---- #| water, the geometry of test_h2o/test_rhf/test_uhf (O at the origin, H at (0, -+0.757, 0.587) A) def pst_water_atoms() { return [[8.0, 0.0, 0.0, 0.0], [1.0, 0.0, -1.430522676295752, 1.1092692351196913], [1.0, 0.0, 1.430522676295752, 1.1092692351196913]] } #| stretched water of test_diis.py (H at (0, -+1.757, 1.587) A) def pst_water_stretched_atoms() { return [[8.0, 0.0, 0.0, 0.0], [1.0, 0.0, -3.3202488008608135, 2.998995359684753], [1.0, 0.0, 3.3202488008608135, 2.998995359684753]] } #| a helium atom at the origin def pst_he_atoms() { return [[2.0, 0.0, 0.0, 0.0]] } #| a hydrogen atom at the origin def pst_h_atoms() { return [[1.0, 0.0, 0.0, 0.0]] } #| N2 at 1 A along z def pst_n2_atoms() { return [[7.0, 0.0, 0.0, 0.0], [7.0, 0.0, 0.0, 1.8897261245650618]] } #| the H4 chain of test_addons.py:414, 0.5 A spacing along z def pst_h4_atoms() { return [[1.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.9448630622825309], [1.0, 0.0, 0.0, 1.8897261245650618], [1.0, 0.0, 0.0, 2.8345891868475928]] } #| the two hydrogens of test_rhf.py:944, 4 Bohr apart def pst_h2_schwarz_atoms() { return [[1.0, 0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 4.0]] } #| the water-like molecule of test_mole.py:980; O carries charge 2.5 def pst_frac_atoms() { return [[1.0, 0.0, 1.8897261245650618, 1.8897261245650618], [2.5, 0.0, 0.0, 0.0], [1.0, 1.8897261245650618, 1.8897261245650618, 0.0]] } # ---- the two custom basis sets, in the frozen shells/prims layout: # shells = (atom, l, nprim, p0, cart0, sph0, ncart, nsph), # prims = (exponent, PySCF bas_ctr_coeff) ---- def pst_h4_shells() { return [[0, 0, 3, 0, 0, 0, 1, 1], [0, 0, 1, 3, 1, 1, 1, 1], [1, 0, 3, 4, 2, 2, 1, 1], [1, 0, 1, 7, 3, 3, 1, 1], [2, 0, 3, 8, 4, 4, 1, 1], [2, 0, 1, 11, 5, 5, 1, 1], [3, 0, 3, 12, 6, 6, 1, 1], [3, 0, 1, 15, 7, 7, 1, 1]] } def pst_h4_prims() { return [[3.42525091, 0.15432897070298393], [0.62391373, 0.5353281424384733], [0.1688554, 0.44463454202535485], [0.002, 1.0], [3.42525091, 0.15432897070298393], [0.62391373, 0.5353281424384733], [0.1688554, 0.44463454202535485], [0.002, 1.0], [3.42525091, 0.15432897070298393], [0.62391373, 0.5353281424384733], [0.1688554, 0.44463454202535485], [0.002, 1.0], [3.42525091, 0.15432897070298393], [0.62391373, 0.5353281424384733], [0.1688554, 0.44463454202535485], [0.002, 1.0]] } def pst_h2_schwarz_shells() { return [[0, 0, 1, 0, 0, 0, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1], [1, 0, 1, 2, 2, 2, 1, 1], [1, 0, 1, 3, 3, 3, 1, 1]] } def pst_h2_schwarz_prims() { return [[2.7, 1.0], [100.0, 1.0], [2.7, 1.0], [100.0, 1.0]] } test "the manifest has the tier counts the plan fixes" { pst_n1 = len(pst_rows_t1()) pst_n1s = len(pst_rows_t1s()) pst_n1x = len(pst_rows_t1x()) pst_n2 = len(pst_rows_t2()) pst_n3 = len(pst_rows_t3()) pst_n23 = len(pst_rows_t2_t3()) assert_near(pst_n1, PST_N_T1, 0.0) assert_near(pst_n1s, PST_N_T1S, 0.0) assert_near(pst_n1x, PST_N_T1X, 0.0) assert_near(pst_n2, PST_N_T2, 0.0) assert_near(pst_n3, PST_N_T3, 0.0) assert_near(pst_n23, PST_N_T2_T3, 0.0) assert_near(pst_n1 + pst_n1s + pst_n1x + pst_n2 + pst_n3 + pst_n23, PST_N_ROWS, 0.0) # every row sits in the table of its own tier, and its places are what unittest can use pst_t = pst_rows_t2_t3() for pst_i to len(pst_t) { assert_near(pst_t[pst_i, 0], PST_TIER_T2_T3, 0.0) assert_lt(0.0, pst_t[pst_i, 3]) assert_lt(pst_t[pst_i, 3], 15.0) } # the path rows are the EDIIS, rollback and DIIS-restore rows, the dynamic # level shift and the two max_cycle=0 steps; the rest ask only for a state pst_npath = 0 pst_x = pst_rows_t1x() for pst_i to len(pst_x) { pst_npath = pst_npath + pst_x[pst_i, 5] } pst_y = pst_rows_t2_t3() for pst_i to len(pst_y) { pst_npath = pst_npath + pst_y[pst_i, 5] } assert_near(pst_npath, PST_N_PATH, 0.0) } test "water's nuclear repulsion from the pack is test_h2o.py:156" { # sum over pairs of Z_A Z_B / R_AB, from the Bohr coordinates; the test asks for 10 places pst_a = pst_water_atoms() pst_enuc = 0.0 for pst_i to len(pst_a) { for pst_j to pst_i { pst_dx = pst_a[pst_i, 1] - pst_a[pst_j, 1] pst_dy = pst_a[pst_i, 2] - pst_a[pst_j, 2] pst_dz = pst_a[pst_i, 3] - pst_a[pst_j, 3] pst_enuc = pst_enuc + pst_a[pst_i, 0] * pst_a[pst_j, 0] / sqrt(pst_dx * pst_dx + pst_dy * pst_dy + pst_dz * pst_dz) } } assert_near(pst_enuc, PST_H2O_156, 0.5e-10) } test "the cart2sph factors of test_mole.py:520/529 are 1/(2 sqrt(pi)) and sqrt(3/(4 pi))" { # a unit s function is 1/sqrt(4 pi) times a unit Cartesian one, and a unit p # function sqrt(3/(4 pi)) times x/r; those are the real solid-harmonic norms pst_pi = 4.0 * atan(1.0) assert_near(PST_C2S_S, 1.0 / (2.0 * sqrt(pst_pi)), 1.0e-16) assert_near(PST_C2S_P, sqrt(3.0 / (4.0 * pst_pi)), 1.0e-16) assert_near(PST_MOLE_520, 0.0, 1.0e-15) assert_near(PST_MOLE_529, 0.0, 1.0e-15) } test "the no-atom model's energies follow from h and (ii|ii) alone" { # RHF puts both electrons in orbital 0: E = 2 h00 + (00|00). # UHF with S = 1 puts one in orbital 0 and one in 1: E = h00 + h11 + (00|11) - (01|10), # and both of those integrals are zero in this model. pst_h = pst_model_h() assert_near(2.0 * pst_h[0, 0] + PST_MODEL_U, PST_RHF_757, 1.0e-15) assert_near(pst_h[0, 0] + pst_h[1, 1], PST_UHF_374, 1.0e-15) } test "closed-shell UHF and RHF targets agree, and bare nuclei have zero energy" { assert_near(PST_H2O_80, PST_H2O_55, 1.0e-12) assert_near(PST_HE_57, PST_HE_52, 1.0e-12) assert_near(PST_UHF_392, PST_RHF_636, 1.0e-12) assert_near(PST_UHF_143, PST_RHF_356, 1.0e-12) assert_near(PST_UHF_207, PST_RHF_516, 1.0e-12) assert_near(PST_UHF_175, PST_RHF_406, 1.0e-12) assert_near(PST_UHF_106, PST_RHF_261, 1.0e-12) assert_near(PST_UHF_109, PST_RHF_264, 1.0e-12) assert_near(PST_RHF_640, 0.0, 0.0) assert_near(PST_UHF_396, 0.0, 0.0) } test "orderings and identities among the open-shell and DIIS targets" { # UHF has more freedom than ROHF, so for the same triplet it is at or below it assert_lt(PST_UHF_155, PST_RHF_386) # the ROHF 1e guess splits the RHF density evenly between the two spins assert_near(PST_H2O_265 * sqrt(2.0), PST_H2O_255, 1.0e-14) assert_near(PST_H2O_270, PST_H2O_265, 0.0) # an EDIIS run cut off at four cycles sits above the converged energy assert_lt(PST_H2O_55, PST_DIIS_54) # the MOM triplet and the spin = -2 ROHF are the same state reached two ways assert_near(PST_ADDONS_261, PST_RHF_386, 1.0e-9) # a restored DIIS lands on the same stretched-water state as the first run assert_near(PST_DIIS_95, PST_DIIS_89, 1.0e-9) # That default state is a saddle point: an internal instability leads to a # lower RHF state near -75.4739. So the unconverged rollback energy can sit # below it without breaking the variational principle, and it does. assert_lt(PST_DIIS_72, PST_DIIS_89) } test "the Schwarz row: the integral sits under its bound" { assert_lt(0.0, PST_SCHWARZ_ERI) assert_lt(PST_SCHWARZ_ERI, PST_SCHWARZ_BOUND) } test "the custom basis packs are self-consistent" { # H4: four STO-3G hydrogens (3 primitives) and four diffuse s shells of one primitive pst_s = pst_h4_shells() pst_p = pst_h4_prims() pst_np = 0 for pst_i to len(pst_s) { assert_near(pst_s[pst_i, 3], pst_np, 0.0) assert_near(pst_s[pst_i, 4], pst_i, 0.0) pst_np = pst_np + pst_s[pst_i, 2] } assert_near(pst_np, len(pst_p), 0.0) assert_near(len(pst_s), 8.0, 0.0) assert_near(pst_p[len(pst_p) - 1, 0], 0.002, 0.0) pst_q = pst_h2_schwarz_shells() assert_near(len(pst_q), 4.0, 0.0) pst_a = pst_h2_schwarz_atoms() assert_near(pst_a[1, 3], 4.0, 0.0) }