diff --git a/.azure-pipelines/azure-pipelines-windows.yml b/.azure-pipelines/azure-pipelines-windows.yml index dcf674068c9..4fec61571b3 100644 --- a/.azure-pipelines/azure-pipelines-windows.yml +++ b/.azure-pipelines/azure-pipelines-windows.yml @@ -272,7 +272,7 @@ jobs: set INSTALL_DIR=$(Build.BinariesDirectory)\install conda build --python %PYTHON_VERSION% ^ conda\win - copy /y C:\tools\miniconda3\conda-bld\win-64\psi4-*.bz2 $(Build.ArtifactStagingDirectory) + copy /y C:\tools\miniforge3\conda-bld\win-64\psi4-*.bz2 $(Build.ArtifactStagingDirectory) condition: and(succeeded(), or(eq(variables['conda.build'], 'true'), eq(variables['Build.SourceBranch'], 'refs/heads/master'), and(startsWith(variables['Build.SourceBranch'], 'refs/heads/1.'), endsWith(variables['Build.SourceBranch'], '.x')))) displayName: "Build Psi4 package" @@ -290,7 +290,7 @@ jobs: # * error handling may need tweaking as I don't know if failure to upload for lack of space (`echo $?`=1) will fail the workflow. - bash: | set -e - ls -l /c/tools/miniconda3/conda-bld/win-64/*.tar.bz2 + ls -l /c/tools/miniforge3/conda-bld/win-64/*.tar.bz2 echo "Using the mapped env var for this task works and is recommended: $(conda.anaconda_org_token)" anaconda whoami anaconda \ @@ -298,7 +298,7 @@ jobs: upload \ --label dev \ --skip \ - /c/tools/miniconda3/conda-bld/win-64/*.tar.bz2 + /c/tools/miniforge3/conda-bld/win-64/*.tar.bz2 echo $? env: ANACONDA_API_TOKEN: $(conda.anaconda_org_token) diff --git a/.github/workflows/docs-pr.yml b/.github/workflows/docs-pr.yml index 3dafa0be015..2f8064829da 100644 --- a/.github/workflows/docs-pr.yml +++ b/.github/workflows/docs-pr.yml @@ -106,11 +106,13 @@ jobs: - name: Compare Docs (PR generated vs psi4/psi4docs) if: ${{ github.repository == 'psi4/psi4' }} - working-directory: ./docs + working-directory: ./docs/sphinxman id: compare-psi4docs run: | - cp -pR ../code/objdir/doc/sphinxman/html . + cp -pR ../../code/objdir/doc/sphinxman/html . + rm -rf master + mv html master echo "::group::Selective Git Diff" - git diff --color-words -I"Last updated on" -I"psi4/tree" + git diff --color-words -I"Last updated on" -I"psi4/tree" -I"documentation_options" echo "::endgroup::" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a0e0c4e7f93..c61e5e1b621 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -130,6 +130,7 @@ jobs: id: compare-psi4docs run: | cp -pR ../../code/objdir/doc/sphinxman/html . + rm -rf ${{ github.ref_name }} mv html ${{ github.ref_name }} echo "::group::Selective Git Diff" git diff --color-words -I"Last updated on" -I"psi4/tree" diff --git a/.github/workflows/ecosystem.yml b/.github/workflows/ecosystem.yml index 36eed18e987..cdac06209f5 100644 --- a/.github/workflows/ecosystem.yml +++ b/.github/workflows/ecosystem.yml @@ -137,6 +137,9 @@ jobs: # - psi4/label/dev::ambit # - psi4/label/dev::chemps2 # - psi4/label/dev::libecpint + - einsums=*=mkl* + - range-v3 + - zlib - dkh - pygdma # - psi4/label/dev::pcmsolver @@ -161,6 +164,7 @@ jobs: if [[ "${{ runner.os }}" == "Windows" ]]; then sed -i "s;- fortran-compiler;;g" build.yaml sed -i "s;- llvm-openmp;- intel-openmp;g" build.yaml + sed -i "s;- einsums;#- einsums;g" build.yaml fi # # Runtime for single-channel (L, M, W) @@ -195,6 +199,7 @@ jobs: #- psi4/label/dev::chemps2 - dkh #- psi4/label/dev::libecpint + - einsums=*=mkl* - pygdma #- psi4/label/dev::pcmsolver #- psi4/label/dev::simint @@ -250,6 +255,7 @@ jobs: sed -i "s;- openfermion>=1.0;;g" run.yaml sed -i "s;- openfermionpsi4;;g" run.yaml sed -i "s;- memory_profiler;;g" run.yaml + sed -i "s;- einsums;#- einsums;g" run.yaml # not for py312 sed -i "s;- dftd3-python;;g" run.yaml sed -i "s;- dftd4-python;;g" run.yaml @@ -311,6 +317,8 @@ jobs: -D CMAKE_INSIST_FIND_PACKAGE_dkh=ON \ -D ENABLE_ecpint=OFF \ -D CMAKE_INSIST_FIND_PACKAGE_ecpint=ON \ + -D ENABLE_Einsums=ON \ + -D CMAKE_INSIST_FIND_PACKAGE_Einsums=ON \ -D ENABLE_gdma=ON \ -D CMAKE_INSIST_FIND_PACKAGE_gdma=ON \ -D ENABLE_PCMSolver=OFF \ @@ -352,6 +360,8 @@ jobs: -D CMAKE_INSIST_FIND_PACKAGE_dkh=ON \ -D ENABLE_ecpint=OFF \ -D CMAKE_INSIST_FIND_PACKAGE_ecpint=ON \ + -D ENABLE_Einsums=ON \ + -D CMAKE_INSIST_FIND_PACKAGE_Einsums=ON \ -D ENABLE_gdma=ON \ -D CMAKE_INSIST_FIND_PACKAGE_gdma=ON \ -D ENABLE_PCMSolver=OFF \ diff --git a/CMakeLists.txt b/CMakeLists.txt index 2de5a0a3a75..2b0b8c07631 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,7 +69,7 @@ message(STATUS "Building using CMake ${CMAKE_VERSION} Generator ${CMAKE_GENERATO # - Python_INCLUDE_DIR "Path to the python include files (e.g., /path/to/include/python3.7)" # - SPHINX_ROOT "Root directory for Sphinx: 'bin/sphinx-build' (or similar) should be in this dir." # -# For any ${AddOn} of: ambit, CheMPS2, dkh, ecpint, libefp, erd, gau2grid, gdma, Libint2, PCMSolver, pybind11, pylibefp, +# For any ${AddOn} of: ambit, CheMPS2, dkh, ecpint, libefp, Einsums, erd, gau2grid, gdma, Libint2, PCMSolver, pybind11, pylibefp, # qcelemental, qcengine, optking, simint, Libxc # - CMAKE_PREFIX_PATH "Set to list of root directories to look for externally built add-ons and dependencies # (e.g., /path/to/install-libint;/path/to/install-gdma where exists /path/to/install-libint/lib/libderiv.a)" @@ -108,6 +108,7 @@ option(ENABLE_ddx "Enables ddx for domain-decomposition contiuum solvation model option(ENABLE_dkh "Enables DKH integrals (requires Fortran)" OFF) option(ENABLE_ecpint "Enables libecpint for effective core potentials (ECP)" OFF) option(ENABLE_libefp "Enables LIBEFP and PylibEFP for fragments" OFF) +option(ENABLE_Einsums "Enables the Einsums tensor library" OFF) option(ENABLE_erd "Enables use of ERD instead of Libint (requires Fortran)" OFF) option(ENABLE_simint "Enables use of SIMINT two-electron integral library" OFF) option(ENABLE_gdma "Enables Stone's GDMA multipole code (requires Fortran; can also be added at runtime)" OFF) @@ -231,6 +232,7 @@ ExternalProject_Add(psi4-core dkh_external ecpint_external libefp_external + einsums_external erd_external gau2grid_external gdma_external @@ -281,6 +283,7 @@ ExternalProject_Add(psi4-core -DENABLE_dkh=${ENABLE_dkh} -DENABLE_ecpint=${ENABLE_ecpint} -DENABLE_libefp=${ENABLE_libefp} + -DENABLE_Einsums=${ENABLE_Einsums} -DENABLE_erd=${ENABLE_erd} -DENABLE_simint=${ENABLE_simint} -DENABLE_gdma=${ENABLE_gdma} @@ -298,6 +301,7 @@ ExternalProject_Add(psi4-core -Ddkh_DIR=${dkh_DIR} -Decpint_DIR=${ecpint_DIR} -Dlibefp_DIR=${libefp_DIR} + -DEinsums_DIR=${Einsums_DIR} -Derd_DIR=${erd_DIR} -Dgau2grid_DIR=${gau2grid_DIR} -Dgdma_DIR=${gdma_DIR} diff --git a/external/common/hdf5/CMakeLists.txt b/external/common/hdf5/CMakeLists.txt index 02fbaf794b7..43c0d03948c 100644 --- a/external/common/hdf5/CMakeLists.txt +++ b/external/common/hdf5/CMakeLists.txt @@ -1,4 +1,4 @@ -if(ENABLE_ambit OR ENABLE_CheMPS2) +if(ENABLE_ambit OR ENABLE_CheMPS2 OR ENABLE_Einsums) project(TargetHDF5) set(PN ${PROJECT_NAME}) diff --git a/external/common/lapack/CMakeLists.txt b/external/common/lapack/CMakeLists.txt index 7f33a0e7d08..30fbb85fd50 100644 --- a/external/common/lapack/CMakeLists.txt +++ b/external/common/lapack/CMakeLists.txt @@ -30,6 +30,19 @@ foreach(_l IN LISTS LAPACK_LIBRARIES) break() endif() endforeach() +if(isMKL STREQUAL " MKL") + set(_VENDOR "MKL") +else() + set(_VENDOR "All") +endif() +set_target_properties( + lapack + PROPERTIES + VENDOR ${_VENDOR} + INT_INTERFACE lp64 # Psi4 only works with lp64 afaik + ) +set(export_properties "VENDOR;INT_INTERFACE") +set_property(TARGET lapack APPEND PROPERTY EXPORT_PROPERTIES "${export_properties}") # << Detect OpenMP and modify for BLAS/LAPACK >> if(NOT TARGET tgt::MathOpenMP) @@ -47,7 +60,7 @@ list(GET _ill 0 _ill0) message(STATUS "${Cyan}Found LAPACK${isMKL}${ColourReset}: ${_ill0};...") if(NOT (${isMKL} MATCHES "MKL")) - message(WARNING "${Yellow}MKL is the only BLAS/LAPACK distribution thoroughly tested with Psi4. Several others are mostly fine, with problems cropping up in particular modules or when running in threaded mode. When using a non-MKL distribution, please run the test suite in full and also run particular tests in threaded mode, if you plan to run Psi4 threaded. MKL is freely available through conda; see instructions to compile against conda MKL through the 'source' option on the download website page.${ColourReset}") + message(WARNING "${Yellow}MKL is the only BLAS/LAPACK distribution thoroughly tested with Psi4. Several others are mostly fine, with problems cropping up in particular modules or when running in threaded mode. When using a non-MKL distribution, please run the test suite in full and also run particular tests in threaded mode, if you plan to run Psi4 threaded. MKL is freely available through conda; see instructions to compile against conda MKL through the 'source' option on the download website page. OpenBLAS also seems to work, but be sure you're using the OpenMP, not the pthreads, variant.${ColourReset}") endif() unset(BLAS_LIBRARIES) diff --git a/external/upstream/CMakeLists.txt b/external/upstream/CMakeLists.txt index abe8497fd99..1dddeac9068 100644 --- a/external/upstream/CMakeLists.txt +++ b/external/upstream/CMakeLists.txt @@ -8,6 +8,7 @@ foreach(dir dkh ecpint libefp + einsums erd gau2grid gdma diff --git a/external/upstream/einsums/CMakeLists.txt b/external/upstream/einsums/CMakeLists.txt new file mode 100644 index 00000000000..d5b78e3cc5e --- /dev/null +++ b/external/upstream/einsums/CMakeLists.txt @@ -0,0 +1,58 @@ +if(${ENABLE_Einsums}) + find_package(Einsums 0.3 CONFIG) + + if(TARGET Einsums::einsums) + get_property(_loc TARGET Einsums::einsums PROPERTY LOCATION) + message(STATUS "${Cyan}Found Einsums${ColourReset}: ${_loc} (found version ${Einsums_VERSION})") + add_library(einsums_external INTERFACE) # dummy + + # reset below necessary as find_package clears it. better solution sought + set(TargetHDF5_DIR ${STAGED_INSTALL_PREFIX}/share/cmake/TargetHDF5 CACHE PATH "path to externally detected TargetHDF5Config.cmake" FORCE) + else() + if(${CMAKE_INSIST_FIND_PACKAGE_Einsums}) + message(FATAL_ERROR "Suitable Einsums could not be externally located as user insists") + endif() + + include(ExternalProject) + message(STATUS "Suitable Einsums could not be located, ${Magenta}Building Einsums${ColourReset} instead.") + + if(${BUILD_SHARED_LIBS}) + set(_a_only OFF) + else() + set(_a_only ON) + endif() + + set(_einsums_dir "share/cmake/Einsums") + + ExternalProject_Add(einsums_external + DEPENDS lapack_external + hdf5_external + URL https://github.com/Einsums/Einsums/archive/v0.3.tar.gz + UPDATE_COMMAND "" + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${STAGED_INSTALL_PREFIX} + -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} + -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} + -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} + -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR} + -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR} + -DEINSUMS_STATIC_BUILD=${_a_only} + -DEXTRA_C_FLAGS=${CMAKE_C_FLAGS} + -DEXTRA_CXX_FLAGS=${CMAKE_CXX_FLAGS} + -DEINSUMS_INSTALL_CMAKEDIR=${_einsums_dir} +# -DENABLE_XHOST=${ENABLE_XHOST} + -DEINSUMS_ENABLE_TESTING=OFF + -DEINSUMS_USE_HPTT=ON +# -DOpenMP_LIBRARY_DIRS=${OpenMP_LIBRARY_DIRS} + -DTargetLAPACK_DIR=${TargetLAPACK_DIR} + -DTargetHDF5_DIR=${TargetHDF5_DIR} + -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} + -DCMAKE_OSX_SYSROOT=${CMAKE_OSX_SYSROOT} + CMAKE_CACHE_ARGS -DCMAKE_C_FLAGS:STRING=${CMAKE_C_FLAGS} + -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS} + -DTargetOpenMP_FIND_COMPONENTS:STRING=C;CXX) + + set(Einsums_DIR ${STAGED_INSTALL_PREFIX}/${_einsums_dir} CACHE PATH "path to internally built EinsumsConfig.cmake" FORCE) + endif() +else() + add_library(einsums_external INTERFACE) # dummy +endif() diff --git a/psi4/CMakeLists.txt b/psi4/CMakeLists.txt index 35a12fbc9d7..909ff4e1c67 100644 --- a/psi4/CMakeLists.txt +++ b/psi4/CMakeLists.txt @@ -46,7 +46,7 @@ get_property(_illb TARGET tgt::blas PROPERTY INTERFACE_LINK_LIBRARIES) list(APPEND _addons ${_ill} ${_illb}) message(STATUS "${Cyan}Using LAPACK${_isMKL}${ColourReset}: ${_ill0};...") -if(ENABLE_ambit OR ENABLE_CheMPS2) +if(ENABLE_ambit OR ENABLE_CheMPS2 OR ENABLE_Einsums) find_package(TargetHDF5 CONFIG REQUIRED) get_property(_ill TARGET tgt::hdf5 PROPERTY INTERFACE_LINK_LIBRARIES) list(GET _ill 0 _ill0) @@ -117,6 +117,15 @@ else() message(STATUS "Disabled libefp") endif() +if(${ENABLE_Einsums}) + find_package(Einsums 0.3 CONFIG REQUIRED) + get_property(_loc TARGET Einsums::einsums PROPERTY LOCATION) + list(APPEND _addons ${_loc}) + message(STATUS "${Cyan}Using Einsums${ColourReset}: ${_loc} (version ${Einsums_VERSION})") +else() + message(STATUS "Disabled Einsums") +endif () + if(${ENABLE_erd}) find_package(erd 3.0.6 CONFIG REQUIRED) get_property(_loc TARGET erd::erd PROPERTY LOCATION) diff --git a/psi4/extras.py b/psi4/extras.py index 28b2d7e10d4..205fc1e6d5b 100644 --- a/psi4/extras.py +++ b/psi4/extras.py @@ -174,6 +174,7 @@ def psi4_which(command, *, return_bool: bool = False, raise_error: bool = False, "psixas": which_import("psixas", return_bool=True), #"mctc-gcp": psi4_which("mctc-gcp", return_bool=True), "bse": which_import("basis_set_exchange", return_bool=True), + "einsums": _CMake_to_Py_boolean("@ENABLE_Einsums@"), } diff --git a/psi4/src/CMakeLists.txt b/psi4/src/CMakeLists.txt index 68ba242bf12..b5389060f19 100644 --- a/psi4/src/CMakeLists.txt +++ b/psi4/src/CMakeLists.txt @@ -114,6 +114,13 @@ if(TARGET ECPINT::ecpint) ) endif() +if(TARGET Einsums::einsums) + target_compile_definitions(core + PRIVATE + USING_Einsums + ) +endif() + if(TARGET BrianQC::static_wrapper) target_compile_definitions(core PRIVATE diff --git a/psi4/src/core.cc b/psi4/src/core.cc index d4c39d25883..f70af0ef697 100644 --- a/psi4/src/core.cc +++ b/psi4/src/core.cc @@ -198,6 +198,10 @@ SharedWavefunction mcscf(SharedWavefunction, Options&); namespace psimrcc { SharedWavefunction psimrcc(SharedWavefunction, Options&); } +namespace dummy_einsums { +SharedWavefunction dummy_einsums (SharedWavefunction, Options&); +} + // Matrix returns namespace scfgrad { @@ -492,6 +496,17 @@ SharedWavefunction py_psi_psimrcc(SharedWavefunction ref_wfn) { return psimrcc::psimrcc(ref_wfn, Process::environment.options); } +#ifdef USING_Einsums +SharedWavefunction py_psi_dummy_einsums(SharedWavefunction ref_wfn) { + py_psi_prepare_options_for_module("EINSUMS"); + return dummy_einsums::dummy_einsums(ref_wfn, Process::environment.options); +} +#else +double py_psi_dummy_einsums(SharedWavefunction ref_wfn) { + throw PSIEXCEPTION("Einsums not enabled. Recompile with -DENABLE_Einsums"); +} +#endif + void py_psi_clean() { PSIOManager::shared_object()->psiclean(); } void py_psi_print_options() { Process::environment.options.print(); } @@ -1324,6 +1339,7 @@ PYBIND11_MODULE(core, core) { core.def("cceom", py_psi_cceom, "ref_wfn"_a, "Runs the equation of motion coupled cluster code for excited states."); core.def("occ", py_psi_occ, "ref_wfn"_a, "Runs the orbital optimized CC codes."); core.def("dfocc", py_psi_dfocc, "ref_wfn"_a, "Runs the density-fitted orbital optimized CC codes."); + core.def("dummy_einsums", py_psi_dummy_einsums, "ref_wfn"_a, "Runs the einsums placeholder code."); core.def("get_options", py_psi_get_options, py::return_value_policy::reference, "Get options"); core.def("set_output_file", [](const std::string ofname) { if (ofname == "stdout") { diff --git a/psi4/src/psi4/CMakeLists.txt b/psi4/src/psi4/CMakeLists.txt index ab03ed62a03..b55dc1306fe 100644 --- a/psi4/src/psi4/CMakeLists.txt +++ b/psi4/src/psi4/CMakeLists.txt @@ -43,6 +43,7 @@ foreach(dir_name psimrcc sapt scfgrad + dummy_einsums ) add_subdirectory(${dir_name}) endforeach () diff --git a/psi4/src/psi4/dummy_einsums/CMakeLists.txt b/psi4/src/psi4/dummy_einsums/CMakeLists.txt new file mode 100644 index 00000000000..346fe4aa9b3 --- /dev/null +++ b/psi4/src/psi4/dummy_einsums/CMakeLists.txt @@ -0,0 +1,29 @@ +list(APPEND sources + ein_test.cc + ) + +if(TARGET Einsums::einsums) + psi4_add_module(bin dummy_einsums sources) + target_link_libraries( + dummy_einsums + PRIVATE + Einsums::einsums + ) +endif() + +if(DEFINED ENV{CONDA_TOOLCHAIN_BUILD}) + if(APPLE) + # * possibly these should be exported from Einsums somehow + # * when using conda clang, compiling against an old SDK & + # an openmp symbols is absent + # * afaik, envvar above is defined when `conda activate envvar_w_compilers`. + # There's a CONDA_BACKUP_CONDA_TOOLCHAIN_BUILD envvar when not activated. + # So hopefully, this doesn't interfere with system compilers. + target_compile_definitions( + dummy_einsums + PUBLIC + _LIBCPP_DISABLE_AVAILABILITY + H5CPP_USE_OMP_ALIGNED_ALLOC + ) + endif() +endif() diff --git a/psi4/src/psi4/dummy_einsums/ein_test.cc b/psi4/src/psi4/dummy_einsums/ein_test.cc new file mode 100644 index 00000000000..d2897bc98bb --- /dev/null +++ b/psi4/src/psi4/dummy_einsums/ein_test.cc @@ -0,0 +1,80 @@ +/* + * @BEGIN LICENSE + * + * Psi4: an open-source quantum chemistry software package + * + * Copyright (c) 2007-2023 The Psi4 Developers. + * + * The copyrights for code used from other parties are included in + * the corresponding files. + * + * This file is part of Psi4. + * + * Psi4 is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, version 3. + * + * Psi4 is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with Psi4; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * @END LICENSE + */ + +#include +#include + +#include "einsums.hpp" +#include "range/v3/algorithm/for_each.hpp" +#include "range/v3/view/zip.hpp" + +#include "psi4/libmints/wavefunction.h" + +namespace psi { +namespace dummy_einsums { + +SharedWavefunction dummy_einsums(SharedWavefunction ref_wfn, Options& options) { + + using namespace einsums; + using namespace einsums::tensor_algebra; + using namespace einsums::tensor_algebra::index; + + einsums::initialize(); + + // Create a file to hold the data from the DiskTensor tests. + //einsums::state::data = h5::create("Data.h5", H5F_ACC_TRUNC); + + auto [_t, _w] = polynomial::laguerre::gauss_laguerre(40); + println(_t); + println(_w); + + auto weights = create_tensor_like(_w); + { + using namespace element_operations::new_tensor; + einsum(Indices{i}, &_w, Indices{i}, _w, Indices{i}, exp(_t)); + } + println(_w); + + ranges::for_each(ranges::views::zip(_t.vector_data(), _w.vector_data()), [](auto &&v) { + auto t = std::get<0>(v); + auto w = std::get<1>(v); + + println("test : {:14.10f} {:14.10f}", t, w); + }); + + // BEGIN: FFT tests + + // auto result = fft::fftfreq(8, 0.1); + // println(result); + + einsums::finalize(true); + + return ref_wfn; +} +} // namespace dummy_einsums +} // namespace psi diff --git a/pytest.ini b/pytest.ini index cdc4f32b4ff..d8d00a26a72 100644 --- a/pytest.ini +++ b/pytest.ini @@ -144,6 +144,7 @@ markers = dkh: "tests using dkh software; skip if unavailable" ecpint: "tests using ecpint software; skip if unavailable" libefp: "tests using LibEFP software; skip if unavailable" + einsums: "tests using Einsums software; skip if unavailable" erd: "tests using ERD software; skip if unavailable" fockci: "tests using XX software; skip if unavailable" forte diff --git a/tests/pytests/addons.py b/tests/pytests/addons.py index 1f2a80a325d..08691c4c6b7 100644 --- a/tests/pytests/addons.py +++ b/tests/pytests/addons.py @@ -91,6 +91,7 @@ def is_nvidia_gpu_present(): "qcfractal_next": is_qcfractal_new_enough("0.49"), "qcportal": which_import("qcportal", return_bool=True), "bse": which_import("basis_set_exchange", return_bool=True), + "einsums": psi4.addons("einsums"), } diff --git a/tests/pytests/test_addons.py b/tests/pytests/test_addons.py index 8b0080a0dc9..2602827b4f5 100644 --- a/tests/pytests/test_addons.py +++ b/tests/pytests/test_addons.py @@ -1560,3 +1560,19 @@ def test_dftd4(): psi4.set_options({"dft_dispersion_parameters": [1.0]}) psi4.energy('wb97x-d') assert psi4.compare_values(-0.000834247063, psi4.variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene wb97x-d (chg)') + + +@uusing("einsums") +def test_einsums(): + mol = psi4.geometry(""" + O 0.000000 0.000000 0.117176 + H -0.000000 -0.756950 -0.468706 + H -0.000000 0.756950 -0.468706 + noreorient + nocom + """) + + basis = psi4.core.BasisSet.build(mol, "ORBITAL", 'def2-svp', quiet=True) + wfn = psi4.core.Wavefunction(mol, basis) + + psi4.core.dummy_einsums(wfn)