Permalink
Browse files

Merge pull request #1239 from raimis/fix_fsapt_tests

Fix fsapt-allterms and fsapt-terms tests on Windows
  • Loading branch information...
dgasmith committed Sep 27, 2018
2 parents 81b7428 + 3cefa88 commit 287272b9e87b63c181ccc19a64823dc0090a4ee9
Showing with 11 additions and 10 deletions.
  1. +3 −6 appveyor.yml
  2. +4 −2 tests/fsapt-allterms/input.dat
  3. +4 −2 tests/fsapt-terms/input.dat
View
@@ -75,13 +75,11 @@ test_script:
# Failling tests:
# ci-property
# cubeprop
# dfcasscf-fzc-sp
# fsapt-terms sapt-dft1 sapt1 tu5-sapt
# sapt-dft1 sapt1 tu5-sapt
# pywrap-db1
#
- ctest --build-config %CONFIGURATION%
--exclude-regex "^(cbs-delta-energy|cbs-xtpl-gradient|dfmp2-ecp|fnocc2|psimrcc-sp1|pywrap-all|ci-property|cubeprop|dfcasscf-fzc-sp|fsapt-terms|pywrap-db1|sapt-dft1|sapt1|tu5-sapt)$"
--exclude-regex "^(cbs-delta-energy|cbs-xtpl-gradient|dfmp2-ecp|fnocc2|psimrcc-sp1|pywrap-all|ci-property|cubeprop|dfcasscf-fzc-sp|fsapt-terms|pywrap-db1|sapt-dft1|sapt1|tu5-sapt)$"
--exclude-regex "^(cbs-delta-energy|cbs-xtpl-gradient|dfmp2-ecp|fnocc2|mp2-module|scf5|psimrcc-sp1|pywrap-all|pywrap-cbs1|ci-property|cubeprop|pywrap-db1|sapt-dft1|sapt1|tu5-sapt)$"
--label-regex quick
--output-on-failure
--parallel %NUMBER_OF_PROCESSORS%
@@ -90,8 +88,7 @@ after_test:
# Run failling tests, but their results are ignored
# TODO fix the tests
- ctest --build-config %CONFIGURATION%
--tests-regex "^(ci-property|cubeprop|dfcasscf-fzc-sp|fsapt-terms|pywrap-db1|sapt-dft1|sapt1|tu5-sapt)$"
--tests-regex "^(ci-property|cubeprop|dfcasscf-fzc-sp|fsapt-terms|pywrap-db1|sapt-dft1|sapt1|tu5-sapt)$"
--tests-regex "^(ci-property|cubeprop|pywrap-db1|sapt-dft1|sapt1|tu5-sapt)$"
--output-on-failure
--parallel %NUMBER_OF_PROCESSORS% & exit 0
- python %INSTALL_FOLDER%\bin\psi4 --test & exit 0
@@ -73,15 +73,17 @@ for key in keys: #TEST
compare_values(Eref[key], Epsi[key], 6, key) #TEST
import os #TEST
import sys
import subprocess
os.chdir('fsapt/') #TEST
os.chdir('fsapt') #TEST
with open('fA.dat', 'w') as fA: #TEST
fA.write("Methyl1_A 1 2 7 8\n") #TEST
fA.write("Methyl2_A 3 4 5 6") #TEST
with open('fB.dat', 'w') as fB: #TEST
fB.write("Peptide_B 9 10 11 16 26\n") #TEST
fB.write("T-Butyl_B 12 13 14 15 17 18 19 20 21 22 23 24 25") #TEST
os.system('../fsapt.py') #TEST
subprocess.run([sys.executable, os.path.join('..', 'fsapt.py')], check=True) #TEST
refInteractions = {
"Methyl1_A Peptide_B": {"fEelst": 0.463, "fEexch": 0.000, "fEindAB": -0.010,
@@ -55,11 +55,13 @@ for key in keys: #TEST
compare_values(Eref[key], Epsi[key], 6, key) #TEST
import os
import sys
import subprocess
os.chdir('fsapt/')
os.chdir('fsapt')
with open('fA.dat', 'w') as fA: fA.write("MethylA 1 2 3 4 5")
with open('fB.dat', 'w') as fB: fB.write("MethylB 6 7 8 9 10")
os.system('../fsapt.py')
subprocess.run([sys.executable, os.path.join('..', 'fsapt.py')], check=True)
fEnergies = {}
fkeys = ['fEelst', 'fEexch', 'fEindAB', 'fEindBA', 'fEdisp', 'fEtot'] #TEST

0 comments on commit 287272b

Please sign in to comment.