-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IVO test wit KAPPA information (Ar atom)
- Loading branch information
1 parent
4d3ea46
commit b7555a0
Showing
10 changed files
with
565 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*DFPCMONEW* | ||
ivo_c32h_ar_dev.ivo.out | ||
latest_passed.* | ||
!reference.* |
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
ninact | ||
0 | ||
nact | ||
14 | ||
nelec | ||
14 | ||
nsec | ||
24 | ||
noccg | ||
3 | ||
noccu | ||
6 | ||
nvcutg | ||
10 | ||
nvcutu | ||
15 | ||
nroot | ||
1 | ||
selectroot | ||
1 | ||
totsym | ||
33 | ||
diracver | ||
22 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
1 | ||
|
||
Ar 0 0 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
DCASPT2=/home/noda/develop/dirac_caspt2/bin/dcaspt2 # REPLACE THIS PATH TO YOUR DCASPT2 EXECUTABLE | ||
MOL=Ar | ||
|
||
rm M* DFPCMO* | ||
INPFILE=x2c.inp | ||
MOLFILE=$MOL.mol | ||
LOGFILE=$MOL.log | ||
|
||
# DIRAC HF calculation | ||
module load DIRAC/22.0 | ||
pam --get="MRCONEE MDCIN* DFPCMO" --mol=${MOLFILE} --inp=${INPFILE} >& ${LOGFILE} | ||
module unload DIRAC/22.0 | ||
|
||
# IVO calculation | ||
$DCASPT2 -i active.ivo.inp --ivo --get "DFPCMONEW" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
**DIRAC | ||
.TITLE | ||
UO2 | ||
.WAVE FUNCTION | ||
.4INDEX | ||
.ANALYZE | ||
**GENERAL | ||
.PCMOUT | ||
**HAMILTONIAN | ||
.X2C | ||
**INTEGRALS | ||
*READIN | ||
.UNCONTRACT | ||
**WAVE FUNCTIONS | ||
.SCF | ||
!.RELCCSD | ||
*SCF | ||
.MAXITR | ||
200 | ||
!.EVCCNV | ||
!1.0E-8 | ||
.ERGCNV | ||
1.0E-10 | ||
**RELCCSD | ||
*CCENER | ||
.MAXIT | ||
200 | ||
.NTOL | ||
7 | ||
.NOSD | ||
.NOSDT | ||
**ANALYZE | ||
.PRIVEC | ||
*PRIVEC | ||
.VECPRI | ||
all | ||
all | ||
**MOLECULE | ||
*BASIS | ||
.DEFAULT | ||
6-31G | ||
*END OF |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import os | ||
import shutil | ||
|
||
import pytest | ||
from module_testing import ( | ||
run_test_dcaspt2, | ||
) | ||
|
||
|
||
@pytest.mark.dev | ||
def test_ivo_c32h_ar_dev(env_setup_ivo) -> None: | ||
(test_path, DFPCMONEW_path, ref_DFPCMONEW_path, latest_passed_DFPCMONEW_path, output_path, latest_passed_output_path, test_command) = env_setup_ivo | ||
os.chdir(test_path) # Change directory to the path of this file | ||
run_test_dcaspt2(test_command) | ||
|
||
# DFPCMONEW format | ||
# INFO (DIRAC version >= 21) | ||
# N2 Thu Apr 6 11:00:00 2023 | ||
# 2 15 15 54 15 15 54 | ||
# -0.1075307794799569E+03 | ||
# COEFS (DIRAC version >= 21) | ||
# 0.0783846162631894 -0.0932522358717089 0.2444662687107759 -0.2100050908725506 0.0207980763363816 -0.0061525045832165 | ||
# -0.0001106259309856 -0.0000860939270339 0.0001830653248163 0.0000000555844586 -0.0000000349239622 0.0000000146384444 | ||
# -0.0000000555844586 0.0000000349239622 -0.0000000146384444 -0.4656826540533246 0.2259566676583494 -0.3303017764820634 | ||
# ... | ||
# EVALS (DIRAC version >= 21) | ||
# -0.378466132952E+05 -0.376317160433E+05 -0.375871872904E+05 -0.375847489191E+05 -0.375740444395E+05 -0.375738772125E+05 | ||
# -0.375678183830E+05 -0.375638423228E+05 -0.375612685737E+05 -0.375611284085E+05 -0.375605808599E+05 -0.375591793895E+05 | ||
# -0.375586003412E+05 -0.375585970263E+05 -0.375581434458E+05 -0.155806087301E+02 -0.122487085753E+01 -0.527584459237E+00 | ||
# ... | ||
# SUPERSYM | ||
# 1 1 1 1 -3 1 1 1 -3 1 1 1 -3 1 1 1 1 1 1 -3 1 1 -3 1 1 1 -3 1 1 1 1 1 1 1 1 -3 1 1 1 -3 1 1 1 -3 1 1 1 1 -3 1 1 -3 1 1 1 -3 1 1 1 1 | ||
# 1 2 3 2 | ||
|
||
# Open DFPCMONEW and reference.DFPCMONEW and compare the values (if the values are float, compare the values to 10th decimal places) | ||
with open(DFPCMONEW_path, "r") as DFPCMONEW_file, open(ref_DFPCMONEW_path, "r") as ref_file: | ||
for DFPCMONEW_line, ref_line in zip(DFPCMONEW_file, ref_file): | ||
# if the first value cannot be converted to float, compare the values as strings | ||
DFPCMONEW_values = DFPCMONEW_line.split() | ||
ref_values = ref_line.split() | ||
try: | ||
DFPCMONEW_float_values = [float(value) for value in DFPCMONEW_values] | ||
ref_float_values = [float(value) for value in ref_values] | ||
for DFPCMONEW_float_value, ref_float_value in zip(DFPCMONEW_float_values, ref_float_values): | ||
assert ref_float_value == pytest.approx(DFPCMONEW_float_value, abs=1e-13) | ||
except ValueError: | ||
assert DFPCMONEW_values == ref_values | ||
|
||
# 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_output_path) | ||
shutil.copy(DFPCMONEW_path, latest_passed_DFPCMONEW_path) |