Skip to content

Commit 635e413

Browse files
committed
mcscf: add OpenMolcas GASCI regression coverage
1 parent 9b05539 commit 635e413

12 files changed

Lines changed: 367 additions & 948 deletions

File tree

‎examples/mcscf/gasci_openmolcas/01_no_plus.py‎

Lines changed: 0 additions & 230 deletions
This file was deleted.

examples/mcscf/gasci_openmolcas/03_o2.py renamed to examples/mcscf/gasci_openmolcas/01_o2_multiroot.py

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Author: Yi Deng <yideng@uchicago.edu>
44
#
55

6-
"""Fixed-orbital GASCI validation against OpenMolcas for triplet O2."""
6+
"""Fixed-orbital multiroot GASCI example using OpenMolcas orbitals."""
77

88
from pathlib import Path
99

@@ -219,11 +219,34 @@
219219
print(f"Compared roots : {ncompare}")
220220
print(f"max |difference| : {max_diff:.3e} Eh")
221221

222-
numpy.testing.assert_allclose(
223-
pyscf_triplet_energies,
224-
reference_energies,
225-
atol=1e-8,
226-
rtol=0,
227-
)
228-
229-
print("Validation passed")
222+
# Example output (final comparison section only):
223+
#
224+
# Numerical values in the last few digits may depend on the platform.
225+
#
226+
# GASCI converged
227+
#
228+
# OpenMolcas/PySCF GASCI comparison
229+
# root E(OpenMolcas) / Eh E(PySCF) / Eh diff / Eh
230+
# 1 -149.765053630000 -149.765053626447 3.553e-09
231+
# 2 -149.537037340000 -149.537037344145 -4.145e-09
232+
# 3 -149.537037340000 -149.537037343830 -3.830e-09
233+
# 4 -149.532153750000 -149.532153753145 -3.145e-09
234+
# 5 -149.385765640000 -149.385765640052 -5.247e-11
235+
# 6 -149.285817750000 -149.285817749263 7.374e-10
236+
# 7 -149.285817220000 -149.285817220731 -7.307e-10
237+
# 8 -149.153949250000 -149.153949254242 -4.242e-09
238+
# 9 -149.110229250000 -149.110229248524 1.476e-09
239+
# 10 -149.110229080000 -149.110229082511 -2.511e-09
240+
# 11 -149.073159140000 -149.073159141160 -1.160e-09
241+
# 12 -149.073156790000 -149.073156787594 2.406e-09
242+
# 13 -149.027679030000 -149.027679032858 -2.858e-09
243+
# 14 -149.027679030000 -149.027679032856 -2.856e-09
244+
# 15 -149.017207800000 -149.017207802629 -2.629e-09
245+
# 16 -149.017203830000 -149.017203833468 -3.468e-09
246+
# 17 -149.003452340000 -149.003452343080 -3.080e-09
247+
# 18 -149.003452340000 -149.003452342985 -2.985e-09
248+
# 19 -148.997477400000 -148.997477403623 -3.623e-09
249+
# 20 -148.997474110000 -148.997474109395 6.051e-10
250+
#
251+
# Compared roots : 20
252+
# max |difference| : 4.242e-09 Eh

examples/mcscf/gasci_openmolcas/06_alfe2o4_plus_m11.py renamed to examples/mcscf/gasci_openmolcas/02_alfe2o4_plus_single_root.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Author: Yi Deng <yideng@uchicago.edu>
44
#
55

6-
"""Fixed-orbital GASCI validation against OpenMolcas for undecet AlFe2O4+."""
6+
"""Fixed-orbital single-root GASCI example for undecet AlFe2O4+."""
77

88
from pathlib import Path
99

@@ -160,17 +160,15 @@
160160
f"{ss:12.8f}"
161161
)
162162

163-
numpy.testing.assert_allclose(
164-
pyscf_energy,
165-
openmolcas_energy,
166-
atol=1e-8,
167-
rtol=0,
168-
)
169-
numpy.testing.assert_allclose(
170-
ss,
171-
30.0,
172-
atol=1e-3,
173-
rtol=0,
174-
)
175-
176-
print("Validation passed")
163+
# Example output (final comparison section only):
164+
#
165+
# Numerical values in the last few digits may depend on the platform.
166+
#
167+
# GASCI converged
168+
# GASCI E = -3064.32294249369
169+
# E(CI) = -179.331711827401
170+
# S^2 = 30.0000000
171+
#
172+
# OpenMolcas/PySCF GASCI comparison
173+
# E(OpenMolcas) / Eh E(PySCF) / Eh diff / Eh <S^2>
174+
# -3064.322942490000 -3064.322942493695 -3.695e-09 30.00000000

0 commit comments

Comments
 (0)