diff --git a/.travis.yml b/.travis.yml index 6f89b400..8bd4a5a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: python python: - 2.7 - + sudo: false matrix: diff --git a/requirements.txt b/requirements.txt index 4da6e8b3..6b1859df 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,3 +4,4 @@ pyparsing pyyaml sphinx sphinx_rtd_theme +git+https://github.com/bast/runtest.git@master diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5dab7808..1e4e87b2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,9 +1,3 @@ -# hack for Travis because we have a strange dependency on numpy header files -# remove this once we get rid of Cython -if(DEFINED ENV{TRAVIS_TEST}) - include_directories(/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/numpy/core/include/) -endif() - include_directories(${CMAKE_BINARY_DIR}) include(ExternalProject) add_subdirectory(libgimic) diff --git a/src/fgimic/gimic.F90 b/src/fgimic/gimic.F90 index dfc65387..2cab8921 100644 --- a/src/fgimic/gimic.F90 +++ b/src/fgimic/gimic.F90 @@ -322,7 +322,7 @@ subroutine program_header call msg_out('*** Written by Jonas Juselius ***') call msg_out('*** ***') call msg_out('*** This software is copyright (c) 2003-2011 by ***') -call msg_out('*** Jonas Juselius, University of Tromsø. ***') +call msg_out('*** Jonas Juselius, University of Tromso. ***') call msg_out('*** ***') call msg_out('*** You are free to distribute this software under the ***') call msg_out('*** terms of the GNU General Public License ***') diff --git a/test/.gitignore b/test/.gitignore new file mode 100644 index 00000000..9a258063 --- /dev/null +++ b/test/.gitignore @@ -0,0 +1,16 @@ +*/*/*.diff +*/*/*.filtered +*/*/*.reference +*/*/stderr +*/*/stdout +*/*/grid.xyz +*/*/mol.xyz +*/*/acid.txt +*/*/jmod.txt +*/*/jvec.txt +*/*/jvec.vti +*/*/acid.cube +*/*/acid.vti +*/*/jmod.cube +*/*/jmod.vti +*/*/jmod_quasi.cube diff --git a/test/C4H4/C4H4-opt-orientedZ.xyz b/test/C4H4/C4H4-opt-orientedZ.xyz deleted file mode 100644 index 23146d65..00000000 --- a/test/C4H4/C4H4-opt-orientedZ.xyz +++ /dev/null @@ -1,10 +0,0 @@ -8 - generated by VMD - C -0.646104 0.096571 0.021951 - C -2.220872 0.096576 0.021901 - C -2.220851 1.426019 0.021949 - C -0.646115 1.426015 0.021904 - H -2.983455 -0.668219 0.021887 - H 0.116471 -0.668229 0.021968 - H -2.983415 2.190804 0.021984 - H 0.116457 2.190796 0.021866 diff --git a/test/C4H4/coord b/test/C4H4/coord deleted file mode 100644 index bda7917b..00000000 --- a/test/C4H4/coord +++ /dev/null @@ -1,11 +0,0 @@ -$coord - -1.22096417569356 0.18248010623987 -0.00000000452657 c - -4.19683469480238 0.18249026466936 0.00000000673309 c - -4.19681774757915 2.69477362225339 -0.00000000677534 c - -1.22096201334696 2.69476591436104 0.00000000453338 c - -5.63789825460400 -1.26274117778748 -0.00000000002375 h - 0.22008567499959 -1.26276132428911 -0.00000000099279 h - -5.63784423248835 4.14003618412387 0.00000000005391 h - 0.22007535981366 4.14001783850487 0.00000000099807 h -$user-defined bonds -$end diff --git a/test/C4H4/int/grid.xyz b/test/C4H4/int/grid.xyz deleted file mode 100644 index 39b49947..00000000 --- a/test/C4H4/int/grid.xyz +++ /dev/null @@ -1,15 +0,0 @@ - 13 - - C -0.6461064630 0.0965643205 -0.0000000024 - C -2.2208694361 0.0965696961 0.0000000036 - C -2.2208604680 1.4260128907 -0.0000000036 - C -0.6461053187 1.4260088119 0.0000000024 - H -2.9834474856 -0.6682139020 -0.0000000000 - H 0.1164643319 -0.6682245631 -0.0000000005 - H -2.9834188983 2.1908129565 0.0000000000 - H 0.1164588734 2.1908032484 0.0000000005 -X -1.4334962173 -3.0632142658 2.6248251355 -X -1.4334962372 -3.0632142469 -2.6248251571 -X -1.4334832142 0.7460054816 2.6248251493 -X -1.4334832340 0.7460055005 -2.6248251434 -Be -1.4334962654 -3.0784964959 3.7042407285 diff --git a/test/C4H4/int/mol.xyz b/test/C4H4/int/mol.xyz deleted file mode 100644 index b0408e45..00000000 --- a/test/C4H4/int/mol.xyz +++ /dev/null @@ -1,10 +0,0 @@ - 8 - - C -0.6461064630 0.0965643205 -0.0000000024 - C -2.2208694361 0.0965696961 0.0000000036 - C -2.2208604680 1.4260128907 -0.0000000036 - C -0.6461053187 1.4260088119 0.0000000024 - H -2.9834474856 -0.6682139020 -0.0000000000 - H 0.1164643319 -0.6682245631 -0.0000000005 - H -2.9834188983 2.1908129565 0.0000000000 - H 0.1164588734 2.1908032484 0.0000000005 diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1d836e38..aa42c156 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -8,8 +8,8 @@ set (PYTHON_INSTDIR ${PROJECT_SOURCE_DIR}/src/gimic) configure_file(${CMAKE_SOURCE_DIR}/src/gimic.in ${CMAKE_CURRENT_BINARY_DIR}/gimic @ONLY ) -execute_process(COMMAND - chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/gimic OUTPUT_QUIET) +execute_process(COMMAND + chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/gimic OUTPUT_QUIET) # Configure input configure_file(${CMAKE_CURRENT_SOURCE_DIR}/vectors.inp.in @@ -24,17 +24,17 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/test.py.in ${CMAKE_CURRENT_BINARY_DIR}/test.py @ONLY ) execute_process( - COMMAND chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/test.py + COMMAND chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/test.py OUTPUT_QUIET - ) + ) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/PyGimicTest.py.in ${CMAKE_CURRENT_BINARY_DIR}/PyGimicTest.py @ONLY ) execute_process( - COMMAND chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/test.py + COMMAND chmod 755 ${CMAKE_CURRENT_BINARY_DIR}/test.py OUTPUT_QUIET - ) + ) # Add tests add_test(NAME Vectors @@ -45,12 +45,18 @@ add_test(NAME BondIntegral COMMAND ${CMAKE_CURRENT_BINARY_DIR}/test.py bondint ) -add_test( - NAME shell-test - COMMAND ${PROJECT_SOURCE_DIR}/test/gimic-test.sh ${PROJECT_BINARY_DIR}/bin -v - ) - -add_test( - NAME 2D-3D - COMMAND ${PROJECT_SOURCE_DIR}/test/gimic-test-2D-3D.sh ${PROJECT_BINARY_DIR}/bin -v - ) +foreach(_name + benzene/integration + benzene/2d + benzene/3d + c4h4/integration + ) + add_test( + NAME ${_name} + COMMAND ./test + --binary-dir=${PROJECT_BINARY_DIR}/bin + --work-dir=${PROJECT_BINARY_DIR}/test/${_name} + --verbose + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/test/${_name} + ) +endforeach() diff --git a/test/benzene/2D/grid.xyz b/test/benzene/2D/grid.xyz deleted file mode 100644 index 04b4df5d..00000000 --- a/test/benzene/2D/grid.xyz +++ /dev/null @@ -1,19 +0,0 @@ - 17 - - C 1.2049777911 0.6956942520 0.0000000000 - C 1.2049777911 -0.6956942520 0.0000000000 - C 0.0000000000 -1.3913885041 0.0000000000 - C -1.2049777911 -0.6956942520 0.0000000000 - C -1.2049777911 0.6956942520 0.0000000000 - C 0.0000000000 1.3913885041 0.0000000000 - H 2.1430161769 1.2372709666 0.0000000000 - H 2.1430161769 -1.2372709666 0.0000000000 - H 0.0000000000 -2.4745419332 0.0000000000 - H -2.1430161769 -1.2372709666 0.0000000000 - H -2.1430161769 1.2372709666 0.0000000000 - H 0.0000000000 2.4745419332 0.0000000000 -X -4.2334179878 -4.2334179878 0.0000000000 -X 4.2334179878 -4.2334179878 0.0000000000 -X -4.2334179878 4.2334179878 0.0000000000 -X 4.2334179878 4.2334179878 0.0000000000 -Be -4.2334179878 -4.2334179878 1.0583544970 diff --git a/test/benzene/2D/jvec-2d-paraview.jpg b/test/benzene/2D/jvec-2d-paraview.jpg deleted file mode 100644 index 478ef914..00000000 Binary files a/test/benzene/2D/jvec-2d-paraview.jpg and /dev/null differ diff --git a/test/benzene/2D/jvec-2d-paraview.pvsm.in b/test/benzene/2D/jvec-2d-paraview.pvsm.in deleted file mode 100644 index 6527fe6d..00000000 --- a/test/benzene/2D/jvec-2d-paraview.pvsm.in +++ /dev/null @@ -1,3802 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benzene/2D/mol.xyz b/test/benzene/2D/mol.xyz deleted file mode 100644 index e0b0fa26..00000000 --- a/test/benzene/2D/mol.xyz +++ /dev/null @@ -1,14 +0,0 @@ - 12 - - C 1.2049777911 0.6956942520 0.0000000000 - C 1.2049777911 -0.6956942520 0.0000000000 - C 0.0000000000 -1.3913885041 0.0000000000 - C -1.2049777911 -0.6956942520 0.0000000000 - C -1.2049777911 0.6956942520 0.0000000000 - C 0.0000000000 1.3913885041 0.0000000000 - H 2.1430161769 1.2372709666 0.0000000000 - H 2.1430161769 -1.2372709666 0.0000000000 - H 0.0000000000 -2.4745419332 0.0000000000 - H -2.1430161769 -1.2372709666 0.0000000000 - H -2.1430161769 1.2372709666 0.0000000000 - H 0.0000000000 2.4745419332 0.0000000000 diff --git a/test/benzene/2d/MOL b/test/benzene/2d/MOL new file mode 120000 index 00000000..4fd18b71 --- /dev/null +++ b/test/benzene/2d/MOL @@ -0,0 +1 @@ +../MOL \ No newline at end of file diff --git a/test/benzene/2d/XDENS b/test/benzene/2d/XDENS new file mode 120000 index 00000000..cdac274e --- /dev/null +++ b/test/benzene/2d/XDENS @@ -0,0 +1 @@ +../XDENS \ No newline at end of file diff --git a/test/benzene/2D/gimic.inp b/test/benzene/2d/gimic.inp similarity index 98% rename from test/benzene/2D/gimic.inp rename to test/benzene/2d/gimic.inp index 3e869e45..0ed09b05 100644 --- a/test/benzene/2D/gimic.inp +++ b/test/benzene/2d/gimic.inp @@ -3,8 +3,8 @@ calc=cdens # cdens, integral, edens, divj ## dryrun=on # don't actually calculate (good for tuning grids, etc.) title="" -basis="../MOL" -xdens="../XDENS" +basis="MOL" +xdens="XDENS" debug=1 # debug print level openshell=false ## show_axis=true # mark "up" axis in .xyz files diff --git a/test/benzene/2D/acid.txt.ref b/test/benzene/2d/reference/acid.txt similarity index 100% rename from test/benzene/2D/acid.txt.ref rename to test/benzene/2d/reference/acid.txt diff --git a/test/benzene/2D/jmod.txt.ref b/test/benzene/2d/reference/jmod.txt similarity index 100% rename from test/benzene/2D/jmod.txt.ref rename to test/benzene/2d/reference/jmod.txt diff --git a/test/benzene/2D/jvec.txt.ref b/test/benzene/2d/reference/jvec.txt similarity index 100% rename from test/benzene/2D/jvec.txt.ref rename to test/benzene/2d/reference/jvec.txt diff --git a/test/benzene/2D/jvec.vti.ref b/test/benzene/2d/reference/jvec.vti similarity index 100% rename from test/benzene/2D/jvec.vti.ref rename to test/benzene/2d/reference/jvec.vti diff --git a/test/benzene/2d/test b/test/benzene/2d/test new file mode 100755 index 00000000..4ec60273 --- /dev/null +++ b/test/benzene/2d/test @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +import os +import sys +sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..')) + +from runtest import version_info, get_filter, cli, run +from runtest_config import configure + +assert version_info.major == 2 + +options = cli() + +# we check entire files +f = [get_filter(rel_tolerance=1.0e-8)] + +ierr = run(options, + configure, + input_files=['gimic.inp'], + filters={'acid.txt': f, + 'jmod.txt': f, + 'jvec.txt': f, + 'jvec.vti': f}) + +sys.exit(ierr) diff --git a/test/benzene/3D/acid-paraview.jpg b/test/benzene/3D/acid-paraview.jpg deleted file mode 100644 index 654c34a4..00000000 Binary files a/test/benzene/3D/acid-paraview.jpg and /dev/null differ diff --git a/test/benzene/3D/acid-paraview.pvsm.in b/test/benzene/3D/acid-paraview.pvsm.in deleted file mode 100644 index f013882b..00000000 --- a/test/benzene/3D/acid-paraview.pvsm.in +++ /dev/null @@ -1,2865 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benzene/3D/grid.xyz b/test/benzene/3D/grid.xyz deleted file mode 100644 index 736c6d2e..00000000 --- a/test/benzene/3D/grid.xyz +++ /dev/null @@ -1,23 +0,0 @@ - 21 - - C 1.2049777911 0.6956942520 0.0000000000 - C 1.2049777911 -0.6956942520 0.0000000000 - C 0.0000000000 -1.3913885041 0.0000000000 - C -1.2049777911 -0.6956942520 0.0000000000 - C -1.2049777911 0.6956942520 0.0000000000 - C 0.0000000000 1.3913885041 0.0000000000 - H 2.1430161769 1.2372709666 0.0000000000 - H 2.1430161769 -1.2372709666 0.0000000000 - H 0.0000000000 -2.4745419332 0.0000000000 - H -2.1430161769 -1.2372709666 0.0000000000 - H -2.1430161769 1.2372709666 0.0000000000 - H 0.0000000000 2.4745419332 0.0000000000 -X -4.2334179878 -4.2334179878 -4.2334179878 -X 4.2334179878 -4.2334179878 -4.2334179878 -X -4.2334179878 4.2334179878 -4.2334179878 -X -4.2334179878 -4.2334179878 4.2334179878 -X 4.2334179878 4.2334179878 -4.2334179878 -X 4.2334179878 -4.2334179878 4.2334179878 -X -4.2334179878 4.2334179878 4.2334179878 -X 4.2334179878 4.2334179878 4.2334179878 -Be -4.2334179878 -4.2334179878 -3.1750634909 diff --git a/test/benzene/3D/jmod-paraview.jpg b/test/benzene/3D/jmod-paraview.jpg deleted file mode 100644 index 45c1fd7d..00000000 Binary files a/test/benzene/3D/jmod-paraview.jpg and /dev/null differ diff --git a/test/benzene/3D/jmod-paraview.pvsm.in b/test/benzene/3D/jmod-paraview.pvsm.in deleted file mode 100644 index 3c36a54c..00000000 --- a/test/benzene/3D/jmod-paraview.pvsm.in +++ /dev/null @@ -1,3889 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/benzene/3D/jvec-paraview-3d.jpg b/test/benzene/3D/jvec-paraview-3d.jpg deleted file mode 100644 index 79220217..00000000 Binary files a/test/benzene/3D/jvec-paraview-3d.jpg and /dev/null differ diff --git a/test/benzene/3D/mol.xyz b/test/benzene/3D/mol.xyz deleted file mode 100644 index e0b0fa26..00000000 --- a/test/benzene/3D/mol.xyz +++ /dev/null @@ -1,14 +0,0 @@ - 12 - - C 1.2049777911 0.6956942520 0.0000000000 - C 1.2049777911 -0.6956942520 0.0000000000 - C 0.0000000000 -1.3913885041 0.0000000000 - C -1.2049777911 -0.6956942520 0.0000000000 - C -1.2049777911 0.6956942520 0.0000000000 - C 0.0000000000 1.3913885041 0.0000000000 - H 2.1430161769 1.2372709666 0.0000000000 - H 2.1430161769 -1.2372709666 0.0000000000 - H 0.0000000000 -2.4745419332 0.0000000000 - H -2.1430161769 -1.2372709666 0.0000000000 - H -2.1430161769 1.2372709666 0.0000000000 - H 0.0000000000 2.4745419332 0.0000000000 diff --git a/test/benzene/3d/MOL b/test/benzene/3d/MOL new file mode 120000 index 00000000..4fd18b71 --- /dev/null +++ b/test/benzene/3d/MOL @@ -0,0 +1 @@ +../MOL \ No newline at end of file diff --git a/test/benzene/3d/XDENS b/test/benzene/3d/XDENS new file mode 120000 index 00000000..cdac274e --- /dev/null +++ b/test/benzene/3d/XDENS @@ -0,0 +1 @@ +../XDENS \ No newline at end of file diff --git a/test/benzene/3D/gimic.inp b/test/benzene/3d/gimic.inp similarity index 98% rename from test/benzene/3D/gimic.inp rename to test/benzene/3d/gimic.inp index 27f8598c..b3a21fa8 100644 --- a/test/benzene/3D/gimic.inp +++ b/test/benzene/3d/gimic.inp @@ -3,8 +3,8 @@ calc=cdens # cdens, integral, edens, divj ## dryrun=on # don't actually calculate (good for tuning grids, etc.) title="" -basis="../MOL" -xdens="../XDENS" +basis="MOL" +xdens="XDENS" debug=1 # debug print level openshell=false ## show_axis=true # mark "up" axis in .xyz files diff --git a/test/benzene/3D/acid.cube.ref b/test/benzene/3d/reference/acid.cube similarity index 100% rename from test/benzene/3D/acid.cube.ref rename to test/benzene/3d/reference/acid.cube diff --git a/test/benzene/3D/acid.txt.ref b/test/benzene/3d/reference/acid.txt similarity index 100% rename from test/benzene/3D/acid.txt.ref rename to test/benzene/3d/reference/acid.txt diff --git a/test/benzene/3D/acid.vti.ref b/test/benzene/3d/reference/acid.vti similarity index 100% rename from test/benzene/3D/acid.vti.ref rename to test/benzene/3d/reference/acid.vti diff --git a/test/benzene/3D/jmod.cube.ref b/test/benzene/3d/reference/jmod.cube similarity index 100% rename from test/benzene/3D/jmod.cube.ref rename to test/benzene/3d/reference/jmod.cube diff --git a/test/benzene/3D/jmod.txt.ref b/test/benzene/3d/reference/jmod.txt similarity index 100% rename from test/benzene/3D/jmod.txt.ref rename to test/benzene/3d/reference/jmod.txt diff --git a/test/benzene/3D/jmod.vti.ref b/test/benzene/3d/reference/jmod.vti similarity index 100% rename from test/benzene/3D/jmod.vti.ref rename to test/benzene/3d/reference/jmod.vti diff --git a/test/benzene/3D/jmod_quasi.cube.ref b/test/benzene/3d/reference/jmod_quasi.cube similarity index 100% rename from test/benzene/3D/jmod_quasi.cube.ref rename to test/benzene/3d/reference/jmod_quasi.cube diff --git a/test/benzene/3D/jvec.txt.ref b/test/benzene/3d/reference/jvec.txt similarity index 100% rename from test/benzene/3D/jvec.txt.ref rename to test/benzene/3d/reference/jvec.txt diff --git a/test/benzene/3D/jvec.vti.ref b/test/benzene/3d/reference/jvec.vti similarity index 100% rename from test/benzene/3D/jvec.vti.ref rename to test/benzene/3d/reference/jvec.vti diff --git a/test/benzene/3d/test b/test/benzene/3d/test new file mode 100755 index 00000000..c09c9123 --- /dev/null +++ b/test/benzene/3d/test @@ -0,0 +1,30 @@ +#!/usr/bin/env python + +import os +import sys +sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..')) + +from runtest import version_info, get_filter, cli, run +from runtest_config import configure + +assert version_info.major == 2 + +options = cli() + +# we check entire files +f = [get_filter(rel_tolerance=1.0e-8)] + +ierr = run(options, + configure, + input_files=['gimic.inp'], + filters={'acid.cube': f, + 'acid.txt': f, + 'acid.vti': f, + 'jmod.cube': f, + 'jmod_quasi.cube': f, + 'jmod.txt': f, + 'jmod.vti': f, + 'jvec.txt': f, + 'jvec.vti': f}) + +sys.exit(ierr) diff --git a/test/benzene/ParaView-README b/test/benzene/ParaView-README deleted file mode 100644 index a27bed60..00000000 --- a/test/benzene/ParaView-README +++ /dev/null @@ -1,13 +0,0 @@ - - Visualizations in ParaView ------------------------------------------------- - -- In order to view the sample ParaView states, it is necessary to give the path to the jvec.vti file on your computer. This can be done from the directory containing the README file in the following way: - -(cd ./2D/ && JVEC=$(pwd) && sedstring="s:@JVEC@:$JVEC/jvec.vti:" && sed "$sedstring" jvec-2d-paraview.pvsm.in > jvec-2d-paraview.pvsm) - -(cd ./3D/ && VTI=$(pwd) && for fname in acid jmod jvec; do sedstring="s:@VTI@:$VTI/$fname.vti:" && sed "$sedstring" $fname-paraview.pvsm.in > $fname-paraview.pvsm; done) - -NOTE: Please do not forget the brackets. They cause all the commands to be exectued in the same shell. - -NOTE 2: If your ParaView is installed under Windows, you need to provide the path manually by replacing @VTI@ in the pvsm.in files with C:\path\to\jvec.vti diff --git a/test/benzene/README b/test/benzene/README deleted file mode 100644 index 9925e56a..00000000 --- a/test/benzene/README +++ /dev/null @@ -1,20 +0,0 @@ - -Example: benzene B3LYP/def2-TZVP - -- Integration over a bond - - J, Jmod, ACID -- 3D cube files and VTK vti files - - JVEC, JMOD, ACID - - JVEC as vector and 3D streamline - - ACID as surface - - paraview examples see files.pvsm - - open paraview, load pvsm file - - paraview needs files.vti as input information - - note ALL vti files contain data in atomic units - therefore you need to convert the mol.xyz file from Angstroem - to bohr - - note this is not the case for the cube files -- 2D VTK vti file for JVEC - - visualization as vectors and streamlines LIC - - note you need to replace NAN in the header of the vti file with zero - - this needs to be fixed diff --git a/test/benzene/int/grid.xyz b/test/benzene/int/grid.xyz deleted file mode 100644 index f60378d6..00000000 --- a/test/benzene/int/grid.xyz +++ /dev/null @@ -1,19 +0,0 @@ - 17 - - C 1.2049777911 0.6956942520 0.0000000000 - C 1.2049777911 -0.6956942520 0.0000000000 - C 0.0000000000 -1.3913885041 0.0000000000 - C -1.2049777911 -0.6956942520 0.0000000000 - C -1.2049777911 0.6956942520 0.0000000000 - C 0.0000000000 1.3913885041 0.0000000000 - H 2.1430161769 1.2372709666 0.0000000000 - H 2.1430161769 -1.2372709666 0.0000000000 - H 0.0000000000 -2.4745419332 0.0000000000 - H -2.1430161769 -1.2372709666 0.0000000000 - H -2.1430161769 1.2372709666 0.0000000000 - H 0.0000000000 2.4745419332 0.0000000000 -X 3.8357000443 -0.0028197160 -2.6248251463 -X 3.8357000443 -0.0028197160 2.6248251463 -X 0.0559518336 -0.0028197160 -2.6248251463 -X 0.0559518336 -0.0028197160 2.6248251463 -Be 3.8508640335 -0.0028197160 -3.7042407393 diff --git a/test/benzene/int/mol.xyz b/test/benzene/int/mol.xyz deleted file mode 100644 index e0b0fa26..00000000 --- a/test/benzene/int/mol.xyz +++ /dev/null @@ -1,14 +0,0 @@ - 12 - - C 1.2049777911 0.6956942520 0.0000000000 - C 1.2049777911 -0.6956942520 0.0000000000 - C 0.0000000000 -1.3913885041 0.0000000000 - C -1.2049777911 -0.6956942520 0.0000000000 - C -1.2049777911 0.6956942520 0.0000000000 - C 0.0000000000 1.3913885041 0.0000000000 - H 2.1430161769 1.2372709666 0.0000000000 - H 2.1430161769 -1.2372709666 0.0000000000 - H 0.0000000000 -2.4745419332 0.0000000000 - H -2.1430161769 -1.2372709666 0.0000000000 - H -2.1430161769 1.2372709666 0.0000000000 - H 0.0000000000 2.4745419332 0.0000000000 diff --git a/test/benzene/integration/MOL b/test/benzene/integration/MOL new file mode 120000 index 00000000..4fd18b71 --- /dev/null +++ b/test/benzene/integration/MOL @@ -0,0 +1 @@ +../MOL \ No newline at end of file diff --git a/test/benzene/integration/XDENS b/test/benzene/integration/XDENS new file mode 120000 index 00000000..cdac274e --- /dev/null +++ b/test/benzene/integration/XDENS @@ -0,0 +1 @@ +../XDENS \ No newline at end of file diff --git a/test/benzene/int/gimic.inp b/test/benzene/integration/gimic.inp similarity index 92% rename from test/benzene/int/gimic.inp rename to test/benzene/integration/gimic.inp index 9449511b..7167ea69 100644 --- a/test/benzene/int/gimic.inp +++ b/test/benzene/integration/gimic.inp @@ -3,10 +3,10 @@ calc=integral # cdens, integral, edens, divj #dryrun=off # don't actually calculate (good for tuning grids, etc.) title="" -basis="../MOL" -xdens="../XDENS" +basis="MOL" +xdens="XDENS" debug=1 # debug print level -openshell=false +openshell=false # show_axis=true # mark "up" axis in .xyz files magnet_axis=X #[-] i,j,k || x,y,z -> align magnet along axis # magnet=[ 0.0, 0.0, -1.0 ] # magnet vector @@ -17,12 +17,12 @@ magnet_axis=X #[-] i,j,k || x,y,z -> align magnet along axis #mofile="mos" # grid type can be: base/std, bond or file (see examples below) -Grid(bond) { # define grid orthogonal to a bond +Grid(bond) { # define grid orthogonal to a bond type=gauss # gauss distribution of grid points bond=[1,2] fixpoint=4 # coord1=[0.0, 0.0, 2.145166] # "atom" coordinates -# coord2=[0.0, 0.0, -2.145166] +# coord2=[0.0, 0.0, -2.145166] # fixcoord=[0.0, 0.0, 0.0] distance=1.32 # place grid 'distance' between atoms gauss_order=9 # order for gauss quadrature @@ -44,7 +44,7 @@ Advanced { diamag=on # turn on/off diamagnetic contributions paramag=on # turn on/off paramagnetic contributions GIAO=on # turn on/off GIAOs. Don't change unless you know why. - screening=on # use screening to speed up + screening=on # use screening to speed up screening_thrs=1.d-8 # Screening threshold } @@ -56,7 +56,7 @@ Essential { ## Grid example collection ############################## -# Grid(bond) { # define grid orthogonal to a bond +# Grid(bond) { # define grid orthogonal to a bond # type=gauss # gauss distribution of grid points # bond=[1,2] # atom indeces for bond # fixpoint=5 @@ -71,8 +71,8 @@ Essential { ## radius=1.0 # round grid: cut off at radius # } -## Read in grid from external file. -# Grid(file) { +## Read in grid from external file. +# Grid(file) { # file=gridfile.grd # } diff --git a/test/benzene/int/gimic.out b/test/benzene/integration/reference/stdout similarity index 88% rename from test/benzene/int/gimic.out rename to test/benzene/integration/reference/stdout index 4b62044c..cc39682d 100644 --- a/test/benzene/int/gimic.out +++ b/test/benzene/integration/reference/stdout @@ -1,100 +1,100 @@ - + **************************************************************** *** *** - *** GIMIC 2.1.4 (6137b14) *** + *** GIMIC 2.1.4 (3dfc440) *** *** Written by Jonas Juselius *** *** *** *** This software is copyright (c) 2003-2011 by *** - *** Jonas Juselius, University of Tromsø. *** + *** Jonas Juselius, University of Tromso. *** *** *** *** You are free to distribute this software under the *** *** terms of the GNU General Public License *** *** *** *** A Pretty Advanced 'Hello World!' Program *** **************************************************************** - - Mon Dec 19 15:29:32 2016 + + Thu Nov 30 17:13:16 2017 TITLE: - + INFO: Detected TURBOMOLE input - + Number of atoms = 12 - + Normalizing basis - + Total number of primitive GTO's 354 Total number of contracted GTO's 252 - + *** Calculating screening coefficients INFO: Screening threshold: 0.1000E-07 - + INFO: Reordering densities [TURBOMOLE] - + Integration grid data ------------------------------------------------ center 2.277078 -0.005328 0.000000 origin 7.277078 -0.005328 -5.000000 - basv1 0.000000 0.000000 1.000000 - basv2 -1.000000 0.000000 0.000000 + basv1 -0.000000 -0.000000 1.000000 + basv2 -1.000000 -0.000000 -0.000000 basv3 0.000000 -1.000000 0.000000 lenghts 10.000000 7.200000 0.000000 magnet 0.000000 0.000000 -1.000000 - + Grid mode = bond INFO: Integration grid selected. INFO: Adjusted number of grid points for quadrature: 36 36 0 Number of grid points : 36 36 1 Total number of grid points : 1296 - + *** Grid plot in grid.xyz INFO: Closed-shell calculation - + Integrating current density ***************************************** *** Integrating |J| - + ************************************************************ Induced mod current (au) : 0.418819 Positive contribution: 0.595170 ( 16.771552 ) Negative contribution: -0.176352 ( -4.969481 ) - + Induced mod current (nA/T) : 11.802071 (conversion factor) : 28.179409 ************************************************************ - - + + *** Integrating current - + ************************************************************ Induced current (au) : 0.418821 Positive contribution: 0.595166 ( 16.771417 ) Negative contribution: -0.176344 ( -4.969283 ) - + Induced current (nA/T) : 11.802134 (conversion factor) : 28.179409 ************************************************************ - - + + *** Integrating ACID density - + ************************************************************ ACID (au) sqrt(delta J^2): 0.118838 ACID (nA/T) : 3.348788 - + ************************************************************ - - + + *** Deallocated grid data INFO: Deallocated basis set and atom data - + ---------------------------------------------------------------------- - wall time: 18.56sec - user: 18.56sec + wall time: 6.62sec + user: 6.62sec sys: 0.00sec ---------------------------------------------------------------------- - Mon Dec 19 15:29:51 2016 + Thu Nov 30 17:13:22 2017 Hello World! (tm) - + done. - + This is F-GIMIC. diff --git a/test/benzene/integration/test b/test/benzene/integration/test new file mode 100755 index 00000000..604b1fb8 --- /dev/null +++ b/test/benzene/integration/test @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +import os +import sys +sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..')) + +from runtest import version_info, get_filter, cli, run +from runtest_config import configure + +assert version_info.major == 2 + +options = cli() + +f = [ + get_filter(from_string=' *** Integrating current', + num_lines=10, + rel_tolerance=1.0e-8), + get_filter(from_string=' *** Integrating ACID density', + num_lines=7, + rel_tolerance=1.0e-8), +] + +ierr = run(options, + configure, + input_files=['gimic.inp'], + filters={'stdout': f}) + +sys.exit(ierr) diff --git a/test/C4H4/MOL b/test/c4h4/MOL similarity index 100% rename from test/C4H4/MOL rename to test/c4h4/MOL diff --git a/test/C4H4/XDENS b/test/c4h4/XDENS similarity index 100% rename from test/C4H4/XDENS rename to test/c4h4/XDENS diff --git a/test/c4h4/integration/MOL b/test/c4h4/integration/MOL new file mode 120000 index 00000000..4fd18b71 --- /dev/null +++ b/test/c4h4/integration/MOL @@ -0,0 +1 @@ +../MOL \ No newline at end of file diff --git a/test/c4h4/integration/XDENS b/test/c4h4/integration/XDENS new file mode 120000 index 00000000..cdac274e --- /dev/null +++ b/test/c4h4/integration/XDENS @@ -0,0 +1 @@ +../XDENS \ No newline at end of file diff --git a/test/C4H4/int/gimic.inp b/test/c4h4/integration/gimic.inp similarity index 98% rename from test/C4H4/int/gimic.inp rename to test/c4h4/integration/gimic.inp index d5368b85..d133b2e8 100644 --- a/test/C4H4/int/gimic.inp +++ b/test/c4h4/integration/gimic.inp @@ -3,8 +3,8 @@ calc=integral # cdens, integral, edens, divj #dryrun=off # don't actually calculate (good for tuning grids, etc.) title="" -basis="../MOL" -xdens="../XDENS" +basis="MOL" +xdens="XDENS" debug=1 # debug print level openshell=false #show_axis=true # mark "up" axis in .xyz files diff --git a/test/C4H4/int/gimic.out b/test/c4h4/integration/reference/stdout similarity index 100% rename from test/C4H4/int/gimic.out rename to test/c4h4/integration/reference/stdout diff --git a/test/c4h4/integration/test b/test/c4h4/integration/test new file mode 100755 index 00000000..3ca774bb --- /dev/null +++ b/test/c4h4/integration/test @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +import os +import sys +sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..')) + +from runtest import version_info, get_filter, cli, run +from runtest_config import configure + +assert version_info.major == 2 + +options = cli() + +f = [ + get_filter(from_string=' *** Integrating current', + num_lines=10, + rel_tolerance=1.0e-8), +] + +ierr = run(options, + configure, + input_files=['gimic.inp'], + filters={'stdout': f}) + +sys.exit(ierr) diff --git a/test/gimic-test-2D-3D.sh b/test/gimic-test-2D-3D.sh deleted file mode 100755 index e02d992f..00000000 --- a/test/gimic-test-2D-3D.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env bash - -# radovan: this is to figure out the location of this script -# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - SCRIPT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located - [[ $SOURCE != /* ]] && SOURCE="$SCRIPT_DIR/$SOURCE" -done -SCRIPT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - -cd $SCRIPT_DIR - -function runtest() { - dim=$1 - - # Make a temporary directory for the test - mkdir ../tmp - - if [ $verbose -eq 1 ] - then - printf "\n\nPerforming test on $testname $dim current density\n\n" - fi - - mkdir ../tmp/$testname - cp ./$testname/MOL ./$testname/XDENS ../tmp - cp ./$testname/$dim/gimic.inp ../tmp/$testname - (cd ../tmp/$testname && $gimicdir/gimic gimic.inp > gimic.test.out ) - - - # variable to track the number of the test executed - i=0 - - if [ $dim = "2D" ]; then - files="jvec.txt jvec.vti acid.txt jmod.txt" - fi - if [ $dim = "3D" ]; then - files="jvec.txt jvec.vti acid.txt jmod.txt acid.cube acid.vti jmod.cube jmod_quasi.cube jmod.vti" - fi - - for file in $files - do - i=$(( $i + 1 )) - if diff ../tmp/$testname/$file ./$testname/$dim/$file.ref >/dev/null - then - if [ $verbose -eq 1 ] - then - echo test$i: $file Same - fi - else - success=$(( $success + 1 )) - if [ $verbose -eq 1 ] - then - echo test$i: $file Different - fi - fi - done - - if [ $verbose -eq 1 ] - then - echo Outcome of the test on $testname - echo $success # successful result is success=0 - fi - - rm -rf ../tmp -} - - -arg="$2" - -if [ -z $arg ] -then - arg=0 # verbose off -fi - -if [ $arg = "-v" ] -then - verbose=1 # verbose on -else - verbose=0 # verbose off -fi - -gimicdir="$1" - -if [ -z $gimicdir ] -then - echo "Gimic directory not specified as a command line argument" - exit -fi - -# Initialize the variable to check the success of the test runs -success=0 - -molecules="benzene" - -for testname in $molecules -do - runtest 2D - runtest 3D -done - -if [ $verbose -eq 1 ] -then - printf "\nSuccess of all tests:\n" -fi - -echo $success diff --git a/test/gimic-test.sh b/test/gimic-test.sh deleted file mode 100755 index f703d4d9..00000000 --- a/test/gimic-test.sh +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env bash - -# radovan: this is to figure out the location of this script -# http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in -SOURCE="${BASH_SOURCE[0]}" -while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink - SCRIPT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - SOURCE="$(readlink "$SOURCE")" - # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located - [[ $SOURCE != /* ]] && SOURCE="$SCRIPT_DIR/$SOURCE" -done -SCRIPT_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" - -cd $SCRIPT_DIR - -function runtest() { - if [ $verbose -eq 1 ] - then - printf "\n\nPerforming test on $testname bond integral\n\n" - fi - - # Create a temporary directory for each test molecule, copy the input file there, then execute the calculation in it - mkdir ../tmp/$testname - - cp ./$testname/int/gimic.inp ../tmp/$testname - cp ./$testname/MOL ./$testname/XDENS ../tmp - (cd ../tmp/$testname && $gimicdir/gimic gimic.inp > gimic.test.out ) - - diatropic=$(grep -A 2 "Induced current" ../tmp/$testname/gimic.test.out | awk '{ if (NR == 2) printf("% f\n", $5); }') - paratropic=$(grep -A 2 "Induced current" ../tmp/$testname/gimic.test.out | awk '{ if (NR == 3) printf("% f\n", $5); }') - total=$(grep "Induced current (nA/T)" ../tmp/$testname/gimic.test.out | awk '{printf("% f\n", $5); }') - - # Debugging - if [ $verbose -eq 1 ] - then - echo Calculated values: - echo $diatropic $paratropic $total - fi - - dia_ref=$(grep -A 2 "Induced current" ./$testname/int/gimic.out | awk '{ if (NR == 2) printf("% f\n", $5); }') - para_ref=$(grep -A 2 "Induced current" ./$testname/int/gimic.out | awk '{ if (NR == 3) printf("% f\n", $5); }') - total_ref=$(grep "Induced current (nA/T)" ./$testname/int/gimic.out | awk '{printf("% f\n", $5); }') - - # Debugging - if [ $verbose -eq 1 ] - then - echo Reference values: - echo $dia_ref $para_ref $total_ref - fi - - # avoid returning success value by default - test1=2 - test2=2 - test3=2 - - test1=$( awk -v diatropic="$diatropic" -v dia_ref="$dia_ref" 'BEGIN{ if ((dia_ref - diatropic) < 1e-5) { print 0; } else {print 1; } }' ) - test2=$( awk -v paratropic="$paratropic" -v para_ref="$para_ref" 'BEGIN{ if ((para_ref - paratropic) < 1e-5) { print 0; } else {print 1; } }' ) - test3=$( awk -v total="$total" -v total_ref="$total_ref" 'BEGIN{ if ((total_ref - total) < 1e-5) { print 0; } else {print 1; } }' ) - - #Debugging - if [ $verbose -eq 1 ] - then - echo "Tests for diatropic, paratropic and total current respectively:" - echo $test1 $test2 $test3 - fi - - success=$(( $success + $test1 + $test2 + $test3 )) - if [ $verbose -eq 1 ] - then - echo Outcome of the test on $testname - echo $success # successful result is success=0 - fi - - rm -rf ../tmp/XDENS ../tmp/MOL -} - - -arg="$2" - -if [ -z $arg ] -then - arg=0 # verbose off -fi - -if [ $arg = "-v" ] -then - verbose=1 # verbose on -else - verbose=0 # verbose off -fi - -gimicdir="$1" - -if [ -z $gimicdir ] -then - echo "Gimic directory not specified as a command line argument" - exit -fi - -# Initialize the variable to check the success of the test runs -success=0 - -# Make a temporary directory for the test -mkdir ../tmp - -molecules="benzene C4H4" - -for testname in $molecules -do - runtest -done - -if [ $verbose -eq 1 ] -then - printf "\nSuccess of all tests:\n" -fi - -rm -rf ../tmp - -echo $success diff --git a/test/runtest_config.py b/test/runtest_config.py new file mode 100644 index 00000000..064abdbd --- /dev/null +++ b/test/runtest_config.py @@ -0,0 +1,20 @@ +def configure(options, input_files, extra_args): + """ + This function is used by runtest to configure runtest + at runtime for GIMIC specific launch command and file naming. + """ + + from os import path + + launcher = 'gimic' + launcher_full_path = path.normpath(path.join(options.binary_dir, launcher)) + + inp = input_files[0] + + full_command = '{0} {1}'.format(launcher_full_path, inp) + + output_prefix = None + + relative_reference_path = 'reference' + + return launcher, full_command, output_prefix, relative_reference_path