Skip to content

Commit

Permalink
test: add ninact + nact + nsec < nmo in MRCONEE test
Browse files Browse the repository at this point in the history
  • Loading branch information
kohei-noda-qcrg committed Jan 17, 2025
1 parent e95b446 commit 1be5f6a
Show file tree
Hide file tree
Showing 8 changed files with 3,054 additions and 0 deletions.
Binary file added test/dev/c32h_n2_small_nsec_dev/MDCINT
Binary file not shown.
Binary file added test/dev/c32h_n2_small_nsec_dev/MRCONEE
Binary file not shown.
19 changes: 19 additions & 0 deletions test/dev/c32h_n2_small_nsec_dev/active.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.ninact
8
.nact
8
.nsec
!44 ! nmo in MRCONEE is 8 + 8 + 44 = 60
40
.nelec
6
.caspt2_ciroots
33 1
.eshift
0.0
.diracver
22
.subprograms
CASCI
CASPT2
.end
35 changes: 35 additions & 0 deletions test/dev/c32h_n2_small_nsec_dev/dirac_data/N2.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
**DIRAC
.TITLE
N2
.WAVE FUNCTION
.ANALYZE
.4INDEX
.PROPERTIES
**INTEGRALS
.NUCMOD
1
*READIN
.UNCONTRACT
**HAMILTONIAN
.X2C
**WAVE FUNCTIONS
.SCF
.RELCCSD
*SCF
.MAXITR
100
.EVCCNV
1.0E-10
.ERGCNV
1.0E-10
**ANALYZE
.MULPOP
.PRIVEC
**PROPERTIES
.RHONUC
**GENERAL
.PCMOUT
**MOLTRA
.ACTIVE
all
*END OF
9 changes: 9 additions & 0 deletions test/dev/c32h_n2_small_nsec_dev/dirac_data/N2.mol
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
DIRAC


C 1 A
7. 2
N 0.0000000000 0.0000000000 0.0000000000
N2 0.0000000000 0.0000000000 1.0000000000
LARGE BASIS STO-3G
FINISH
2,244 changes: 2,244 additions & 0 deletions test/dev/c32h_n2_small_nsec_dev/dirac_data/N2_N2.out

Large diffs are not rendered by default.

717 changes: 717 additions & 0 deletions test/dev/c32h_n2_small_nsec_dev/reference.c32h_n2_small_nsec_dev.out

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions test/dev/c32h_n2_small_nsec_dev/test_c32h_n2_small_nsec_dev.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import os
import shutil
import pytest
from module_testing import (
run_test_dcaspt2,
get_caspt2_energy_from_output_file,
)


@pytest.mark.dev
def test_c32h_n2_small_nsec_dev(env_setup_caspt2) -> None:

(test_path, ref_output_path, output_path, latest_passed_path, test_command) = env_setup_caspt2

# Get this files path and change directory to this path
os.chdir(test_path) # Change directory to the path of this file
print(test_path, "test start") # Debug output

run_test_dcaspt2(test_command)

ref_energy = get_caspt2_energy_from_output_file(ref_output_path)
test_energy = get_caspt2_energy_from_output_file(output_path)

# Check whether the output of test run
# matches the reference to 7th decimal places.
assert test_energy == pytest.approx(ref_energy, abs=1e-10)

# If it reaches this point, the result of assert is true.
# The latest passed output file is overwritten by the current output file if assert is True.
shutil.copy(output_path, latest_passed_path)

0 comments on commit 1be5f6a

Please sign in to comment.